Learn when static methods can’t be unit tested and how to use wrapper classes and the Moq and xUnit frameworks to unit test them when they can When building or working in .NET applications you might ...
We often need to write unit tests for code that accesses an external resource such as a database or a file file system. If such resources are not available, the only way to ensure that the tests can ...
Unit testing—the process of testing the smallest possible piece of code that can run—has been around for a long time. Unfortunately, Visual Studio itself has never provided this functionality to ...
C# Corner columnist Patrick Steele says writing unit tests can be a time-consuming chore. He looks at some approaches that can make writing unit tests easier and more efficient for C# programmers.
Try to keep units small, use appropriate tools, and pair-up programmers and tester; these are suggestions from Adrian Bolboacă for writing good unit tests. Unit testing is a mixture of programming and ...
I noticed that talking about TDD hardly works. People like to see raw results. Saying that “writing tests will reduce development time” is most likely true, but it might not be enough to get anybody ...