How do you test private methods with NUnit?

后端 未结 13 2394
春和景丽
春和景丽 2020-12-02 16:00

I am wondering how to use NUnit correctly. First, I created a separate test project that uses my main project as reference. But in that case, I am not able to test private m

相关标签:
13条回答
  • 2020-12-02 17:07

    I'm in favor of having the capability to test private methods. When xUnit started it was intended for testing functionality after the code was written. Testing the interface is sufficient for this purpose.

    Unit testing has evolved to test-driven development. Having the capability to test all methods is useful for that application.

    0 讨论(0)
提交回复
热议问题