hi,
I am testing existing MVC application, in that they are using private methods, now I need to test those methods using Nunit test, I can't change the code. how to do that.
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sridhar YelagandhulaPosted Jan 15, 2020, 1:18 AM
Munesh SharmaPosted May 2, 2016, 2:29 PM
Generally, unit testing addresses a class's public interface, on the theory that the implementation is immaterial, so long as the results are correct from the client's point of view.
So, NUnit does not provide any mechanism for testing non-public members.
Gowtham KPosted Apr 25, 2016, 9:47 PM