Created
September 26, 2013 23:07
-
-
Save plioi/6721858 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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