You want to write a test for your code. The IsPrime function should return true when given an input of 2. There's just one problem: C# doesn't offer a keyword that says "this thing should happen". So how will you record the fact that the test should fail or not depending on some condition?
Tag: Unit Test
Unit Test Frameworks in C#, Part One: The Basics
This begins a series of posts in which I will compare the major testing frameworks available for unit testing (as opposed to UI testing frameworks like Selenium or Cucumber) available for the .NET Framework. The major players here are MSTest, NUnit, and Xunit. There are, of course, ...