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.
More Related Contents:
- How do I run NUnit in debug mode from Visual Studio?
- Recommended unit testing tool to test web services, api calls and sql calls [closed]
- How can we run a test method with multiple parameters in MSTest?
- Compare equality between two objects in NUnit
- NUnit vs. Visual Studio 2008’s test projects for unit testing [closed]
- Unit testing and checking private variable value
- What’s a good way to overwrite DateTime.Now during testing?
- MSTest Equivalent for NUnit’s Parameterized Tests?
- C# – Asserting two objects are equal in unit tests
- Unit Testing File I/O
- How do I test database-related code with NUnit?
- Unit test for thread safe-ness?
- Is it a good way of unit testing to use another, tested function to make preparations for the actual test?
- Using IoC for Unit Testing
- Mocking Extension Methods with Moq
- Mocking Static Methods
- C# “internal” access modifier when doing unit testing
- Mock static property with moq
- How to mock the new HttpClientFactory in .NET Core 2.1 using Moq
- Mock HttpContext for unit testing a .NET core MVC controller?
- How can I write output from a unit test?
- Moq + Unit Testing – System.Reflection.TargetParameterCountException: Parameter count mismatch
- Assert an Exception using XUnit
- How to test method call order with Moq
- How do I use Assert to verify that an exception has been thrown with MSTest?
- Test method is inconclusive: Test wasn’t run. Error?
- Using DI container in unit tests
- Creating recursive tree with AutoFixture
- How to write this EF Mock setup code as a reusable Generic Boilerplate?
- How to find path of active app.config file?