public void UniqueCheeseShouldNotExpire() { Utils.ReceivedDate = new DateTime(2021, 02, 15); var currentDate = Utils.ReceivedDate; Cheese cheese = new Unique("Calcagno", null, null, 18.90, CheeseType.Name.Unique, Utils.ReceivedDate); for (int i = 0; i <= 4; i++) { cheese.SetPrice(cheese, currentDate); currentDate = currentDate.AddDays(1); } Assert.False(cheese.IsExpired(currentDate)); }
public void UniqueCheesePriceShouldNotChange() { Utils.ReceivedDate = new DateTime(2021, 02, 15); var currentDate = Utils.ReceivedDate; Cheese cheese = new Unique("Calcagno", null, null, 18.90, CheeseType.Name.Unique, Utils.ReceivedDate); for (int i = 0; i <= 5; i++) { cheese.SetPrice(cheese, currentDate); currentDate = currentDate.AddDays(1); } Assert.Equal(18.90, PriceFormatter.ShowPriceAsDecimal(cheese.Price)); }