Skip to content

Instantly share code, notes, and snippets.

@plioi
Created September 26, 2013 23:07
Show Gist options
  • Save plioi/6721858 to your computer and use it in GitHub Desktop.
Save plioi/6721858 to your computer and use it in GitHub Desktop.
public class CalculatorTests
{
readonly Calculator calculator;
public CalculatorTests()
{
calculator = new Calculator();
}
[Input(2, 3, 5)]
[Input(3, 5, 8)]
public void ShouldAdd(int a, int b, int expectedSum)
{
calculator.Add(a, b).ShouldEqual(expectedSum);
}
[Input(5, 3, 2)]
[Input(8, 5, 3)]
[Input(10, 5, 5)]
public void ShouldSubtract(int a, int b, int expectedDifference)
{
calculator.Subtract(a, b).ShouldEqual(expectedDifference);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment