public void The_soonest_delivery_date_is_two_days_from_now() { DeliveryService sut = new DeliveryService(); DateTime deliveryDate = DateTime.Now.AddDays(2); Delivery delivery = new Delivery { Date = deliveryDate }; bool isValid = sut.IsDeliveryValid(delivery); Assert.True(isValid); }
public void Detects_an_invalid_delivery_date2(int daysFromNow) { DeliveryService sut = new DeliveryService(); DateTime deliveryDate = DateTime.Now.AddDays(daysFromNow); Delivery delivery = new Delivery { Date = deliveryDate }; bool isValid = sut.IsDeliveryValid(delivery); Assert.False(isValid); }
public void Detects_an_invalid_delivery_date3( DateTime deliveryDate, bool expected) { DeliveryService sut = new DeliveryService(); Delivery delivery = new Delivery { Date = deliveryDate }; bool isValid = sut.IsDeliveryValid(delivery); Assert.Equal(expected, isValid); }