Created
February 12, 2016 21:03
-
-
Save IEvangelist/695e5dae4f5454ba8b72 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
[Theory, ClassData(typeof(Int32CalculatorTestData))] | |
public void AddTest(int leftOperand, int rightOperand, int expected) | |
{ | |
// Arrange | |
var calculator = new Int32Calculator(); | |
// Act | |
var actual = calculator.Add(leftOperand, rightOperand); | |
// Assert | |
Assert.Equal(expected, actual); | |
} | |
public class Int32CalculatorTestData : ClassTestData | |
{ | |
protected override List<object[]> TestData => new List<object[]> | |
{ | |
new object[] { 1, 7, 8 }, | |
new object[] { 2, 2, 4 }, | |
new object[] { -33, -77, -110 }, | |
new object[] { 256, -512, -256 }, | |
new object[] { 0, 0, 0 }, | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment