public void WhenSumFiveAndThreeThenGotEight() { // Arrange MathCalculator calculator = new MathCalculator(); // Act var result = calculator.Sum(Five, Three); // Assert Assert.Equal(8, result); }
public void SumSimpleInput() { List <int> simpleList = new List <int>() { 1, 2, 3, 4, 4 }; double actual = MathCalculator.Sum(simpleList); double expected = 14; Assert.AreEqual(expected, actual); }
public void WhenSumMuniusFiveAndThreeThenGotMuniusTwo() { // Arrange(Подготовка данных) MathCalculator calculator = new MathCalculator(); // Act int results = calculator.Sum(-Five, Three); // Assert Assert.Equal(-Five + Three, results); }
public void SumWithEmptyListShouldThrowArgumentException() { List <int> emptyList = new List <int>(); MathCalculator.Sum(emptyList); }
public void SumWithNullListShouldThrowArgumentException() { MathCalculator.Sum(null); }