Created
October 24, 2020 23:39
-
-
Save xximjasonxx/41c3e36157b171b418529adb00414cb0 to your computer and use it in GitHub Desktop.
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
public class given_an_instance_of_calculation_controller | |
{ | |
[Fact] | |
public void assert_that_given_two_numbers_the_result_returned_is_the_correct_sum() | |
{ | |
// arrange | |
var controller = new CalculationController(); | |
var viewModel = new TwoNumberViewModel | |
{ | |
FirstNumber = 10, | |
SecondNumber = 20 | |
}; | |
// act | |
var result = controller.Add(viewModel) as OkObjectResult; | |
// assert | |
Assert.NotNull(result); | |
Assert.Equal("30", result.Value.ToString()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment