-
-
Save dcomartin/bc853483a62f8924a3e10e34d887bd7b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Tests | |
| { | |
| [Fact] | |
| public void Shipment_IsLate_Returns_True_When_Past_Date() | |
| { | |
| var shipment = new Shipment | |
| { | |
| DeliveryDate = DateTime.Today.AddDays(-1) | |
| }; | |
| var policy = new StandardDeliveryTiming(DateTime.Today); | |
| Assert.True(shipment.IsLate(policy)); | |
| } | |
| [Fact] | |
| public void Shipment_IsLate_Returns_False_When_Not_Past_Date_With_Buffer() | |
| { | |
| var shipment = new Shipment | |
| { | |
| DeliveryDate = DateTime.UtcNow.AddMinutes(-15) | |
| }; | |
| var policy = new BufferDeliveryTiming(DateTime.UtcNow, TimeSpan.FromMinutes(30)); | |
| Assert.False(shipment.IsLate(policy)); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment