In the same way as printing "hello world" is most programmers first program statement, asserting that 1 + 1 = 2 is perhaps the most common first test executed for those learning unit testing. That's what we'll create in this recipe:
![](https://static.packt-cdn.com/products/9781788471909/graphics/assets/d6ba1b96-51a1-42fc-9439-6619d61ecd02.png)
In the same way as printing "hello world" is most programmers first program statement, asserting that 1 + 1 = 2 is perhaps the most common first test executed for those learning unit testing. That's what we'll create in this recipe:
To create and execute a simple unit test, follow these steps:
using NUnit.Framework;
class SimpleTester
{
[Test]
public void TestOnePlusOneEqualsTwo()
{
// Arrange
int n1 = 1;
int n2 = 1;
int expectedResult...