public void ShouldThroughArgumentException(double consumption) { // Arrange var basicTariff = new BasicTariff(); // Act // Assert Assert.Throws <ArgumentException>(() => basicTariff.GetAnnualCosts(consumption), "Should throw ArgumentException when consumption less 0"); }
public void ShouldReturnValidAnnualCosts(int consumption, int cost) { // Arrange var basicTariff = new BasicTariff(); // Act var annualCosts = basicTariff.GetAnnualCosts(consumption); // Assert Assert.AreEqual(cost, annualCosts, "Annual cost calculated incorrectly"); }