Last active
December 3, 2019 17:17
-
-
Save codingfab/0083560cc38f53d3236d88afb2fbd115 to your computer and use it in GitHub Desktop.
Simple TestCase attribute usage
This file contains 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
[TestFixture] | |
public class MyComplexLogicShould | |
{ | |
[Test] | |
[TestCase(10,22,32)] | |
public void ReturnExpectedResult(int a, int b, int expected) | |
{ | |
// Arrange | |
var sut = new MyClass(); | |
// Act | |
var result = sut.MyComplexLogic(a,b); | |
// Assert | |
Assert.That(result,Is.EqualTo(expected)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment