Created
October 28, 2012 18:57
-
-
Save prabirshrestha/3969466 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
| [Fact] | |
| public void AdditionTest() { | |
| // given | |
| int a = 1; | |
| int b = 2; | |
| // when | |
| var result = Math.Add(a, b); | |
| // then | |
| Assert.Equal(3, result); | |
| } | |
| [Theory] | |
| [InlineData(0, 0)] | |
| [InlineData(0, 1)] | |
| [InlineData(1, 0)] | |
| [InlineData(10, 20)] | |
| public void Result_should_be_0_when_multiplied_by_0(int a, int b) { | |
| // given (from parameters) | |
| // when | |
| var result = Math.Multiply(a, b); | |
| // then | |
| Assert.Equal(0, result); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment