Skip to content

Instantly share code, notes, and snippets.

@codingfab
Last active December 1, 2019 19:51
Show Gist options
  • Save codingfab/087bf16ba87d970dbda5ac5544f44066 to your computer and use it in GitHub Desktop.
Save codingfab/087bf16ba87d970dbda5ac5544f44066 to your computer and use it in GitHub Desktop.
Tests multiple data set with repeated TestCase attributes
[TestFixture]
public class MyComplexLogicShould
{
[Test]
[TestCase(10, 22, ExpectedResult = 32)]
[TestCase(20, 44, ExpectedResult = 64)]
[TestCase(15, 17, ExpectedResult = 32)]
public int ReturnExpectedResult(int a, int b)
{
var sut = new MyClass();
return sut.MyComplexLogic(a,b);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment