public void GivenInvalidInputs_ThrowsAnException(params int[] expenses) { // Arrange var sut = new ExpensesEngine2(); // Act and Assert Assert.Throws <ArgumentOutOfRangeException>(() => sut.Execute(500, expenses)); }
public void LessThanThreeExpenses_ThrowsAnException(params int[] expenses) { // Arrange var sut = new ExpensesEngine2(); // Act and Assert Assert.Throws <ArgumentException>(() => sut.Execute(2020, expenses)); }
public void GivenValidInputs_CalculatesCorrectOutcomes(int expected, params int[] expenses) { // Arrange var sut = new ExpensesEngine2(); // Act var result = sut.Execute(2020, expenses); // Assert result.Should().Be(expected); }