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
[Fact(DisplayName = "Given valid numbers, when sum then should succcess.")] | |
public void GivenValidNumbers_WhenSum_ThenShouldSucccess() | |
{ | |
//arrange | |
const int resultExpected = 5; | |
const int firstNumber = 3; | |
const int secondNumber = 2; | |
//act | |
var resultActual = Calculator.Sum(firstNumber, secondNumber); |
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
[Fact(DisplayName = "Given valid numbers, when sum then should succcess.")] |
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
[Fact] | |
public void Test1() | |
{ | |
//arrange | |
//act | |
//assert | |
} |
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 static int Sum(int firstNumber, int secondNumber) | |
{ | |
if (firstNumber < 0 || secondNumber < 0) | |
{ | |
return -1; | |
} | |
return firstNumber + secondNumber; | |
} |