public static void RetrospectiveWorkflowStatus_HasReachedTimeLimit_ReturnsFalseOnDateInBounds() { // Given var now = new DateTimeOffset(2017, 07, 30, 13, 15, 0, TimeSpan.FromHours(2)); var workflowStatus = new RetrospectiveWorkflowStatus { InitiationTimestamp = new DateTimeOffset(2017, 07, 30, 13, 10, 0, TimeSpan.FromHours(2)), TimeLimitInMinutes = 10 }; // When bool result = workflowStatus.HasReachedTimeLimit(now); // Then Assert.That(result, Is.False); }
public static void RetrospectiveWorkflowStatus_HasReachedTimeLimit_ReturnsTrueOnLaterDate() { // Given DateTimeOffset now = DateTimeOffset.UtcNow; var workflowStatus = new RetrospectiveWorkflowStatus { InitiationTimestamp = new DateTimeOffset(2017, 07, 30, 13, 10, 0, TimeSpan.FromHours(2)), TimeLimitInMinutes = 10 }; // When bool result = workflowStatus.HasReachedTimeLimit(now); // Then Assert.That(result, Is.True); }