Conventional Testing for .NET

  • master
  • dev
  • Join the chat at https://gitter.im/fixie/fixie

Quick Start

Create a Class Library project to house your test classes.

Next, Install NuGet and then install the Fixie NuGet package from the package manager console:

PM> Install-Package Fixie

Install a third-party assertion library. The example below assumes you’ve installed Should.

Add test classes and test cases to your testing project, following the Default Convention:

using Should;

public class CalculatorTests
{
    public void ShouldAdd()
    {
        var calculator = new Calculator();
        calculator.Add(2, 3).ShouldEqual(5);
    }

    public void ShouldSubtract()
    {
        var calculator = new Calculator();
        calculator.Subtract(5, 3).ShouldEqual(2);
    }
}

To use a different style, you can create a Custom Convention.

To run your tests from the command line or as part of your continuous integration build, use the Console Runner.

To run your tests from within Visual Studio, use either the TestDriven.NET Runner (requires a third-party plugin) or the Visual Studio Runner.