Coverage Tutorial

Clint Parker edited this page Aug 29, 2013 · 3 revisions

This tutorial is all about coverage. My theory is that all code written should be covered. The reason: you'll have at least 1 test for all lines, and 100% is an easier stat to check for than 80%+.

The tutorial in it's present state has very basic examples. This is so the concepts shown can have more impact than the code itself.

We will be testing a simple [class] (https://github.com/clintcparker/c_sharp_testing/blob/master/FakesTesting/BadIdea.cs) with public and private methods (one of each), that is dependent on the System.Net.Http dll and an external website.

Let's take a look the class to be tested: [Bad Idea] (BadIdea)

[Next Page] (BadIdea)

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.