O'Reilly logo

ASP.NET Core Essentials by Shahed Chowdhuri

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing unit tests

In addition to DI, it is also important to write unit tests to build robust software. By automating your tests, you can minimize the chances of bugs in your code and generate confidence when adding new features.

Many articles and a few books have been written on unit testing, so this section is by no means a comprehensive reference on it. Instead, its intent is to introduce you to the possibilities of automated testing in your code.

Setting up a test project

ASP.NET developers have been using various unit testing frameworks over the years. The list of testing frameworks includes nUnit, xUnit.net, and Microsoft's own MSTest. All of these products have the same basic capabilities and some advanced capabilities as well. To extend ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required