How can I unit test a Windows Service?

前端 未结 7 1689
青春惊慌失措
青春惊慌失措 2020-12-08 13:03

.NET Framework: 2.0 Preferred Language: C#

I am new to TDD (Test Driven Development).

First of all, is it even possible to unit test Windows Service?

7条回答
  •  一向
    一向 (楼主)
    2020-12-08 13:36

    Guy's probably the best answer.

    Anyway, if you really want to, you could just invoke in the unit test these two method as described by MSDN documentation but, since they are protected, you'll need to use Reflection.

提交回复
热议问题