Skip to content

Instantly share code, notes, and snippets.

@StacyGay
Last active April 11, 2021 20:05
Show Gist options
  • Save StacyGay/b923440caf7b3d15fdb728f1230f9d1b to your computer and use it in GitHub Desktop.
Save StacyGay/b923440caf7b3d15fdb728f1230f9d1b to your computer and use it in GitHub Desktop.
Trinity of test - XUnit
[Theory]
[InlineData(2)]
[InlineData(0)]
[InlineData(-1)]
public void Should_Correctly_Detect_Negative(int value)
{
var service = new NegativeService();
if(value < 0)
Assert.True(service.IsNegative(value));
else
Assert.False(service.IsNegative(value));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment