Zebra Game Kata Part 2 - Setup

Create a new C# class library project named "ZebraGameProblem".

Before we write a line of production code, we want to have a failing test to cover it. I will be using NUnit 3 inside of a class library.

Add a new class library project named ZebraGameTests to the solution.

After the project is created, add ZebraProblemTest.cs. ZebraProblem is the name of the class we will be testing, and Test is just a suffix that I like to add to the end of tests.

Now add the [TestFixture] attribute to the top of the class.

ZebraGameTest/ZebraProblemTest.cs
namespace ZebraGameTests
{
    [TestFixture]
    public class ZebraProblemTest
    {
    }
}

Adding the TestFixture attribute causes a compile-time error. To fix it, we need to bring in the NUnit package using NuGet.

Now that NUnit 3 is part of the project, you can add the using statement for the NUnit.Framework namespace.

ZebraGameTest/ZebraProblemTest.cs
using NUnit.Framework;

namespace ZebraGameTests
{
    [TestFixture]
    public class ZebraProblemTest
    {
    }
}