public void ConditionalMath_ShouldAddAndReturnNegativeValue_WhenValuesAreNegativeAndReturnNegativeIsTrue() { //Arrange var firstValue = -1; var secondValue = -2; var returnNegative = true; var expected = -3m; //Act var actual = WeirdCalculator.ConditionalMath(firstValue, secondValue, returnNegative); //Assert Assert.AreEqual(expected, actual); }
public void ConditionalMath_ShouldAddAndReturnPositiveValue_WhenReturnNegativeIsFalse() { //Arrange var firstValue = 1; var secondValue = 2; var returnNegative = false; var expected = 3m; //Act var actual = WeirdCalculator.ConditionalMath(firstValue, secondValue, returnNegative); //Assert Assert.AreEqual(expected, actual); }