public void RemoveCorrectItem_ShouldBeRemoved() { ConsumptionCalculator calculator = new ConsumptionCalculator(); calculator.Add(120.5f, 9.8f); calculator.Delete(calculator.Consumptions[0]); Assert.AreEqual(0, calculator.Consumptions.Count); }
public void RemoveIncorrectItem_ShouldBeHandled() { Consumption consumption = new Consumption() { Distance = 120.5f, Fuel = 9.8f }; ConsumptionCalculator calculator = new ConsumptionCalculator(); calculator.Add(120.5f, 9.8f); calculator.Delete(consumption); Assert.AreEqual(1, calculator.Consumptions.Count); }