public void Calculate_IneligibleStartTimeButEligibleEndTime_NotEligible() { // ARRANGE var requests = new[] { new CalculateRequest(IncMinStartDateTime.AddMilliseconds(-1), IncMinEndDateTime), new CalculateRequest(ExclMaxStartDateTime, ExclMaxEndDateTime.AddMilliseconds(-1)), }; // ACT var responses = requests.Select(i => SUT.Calculate(i)).ToList(); // ASSERT Assert.IsTrue(responses.All(i => i == null)); }
public void Calculate_EligibleStartTimeAndEligibleEndTime_CorrectPrice() { // ARRANGE var requests = new[] { new CalculateRequest(IncMinStartDateTime, IncMinEndDateTime), new CalculateRequest(ExclMaxStartDateTime.AddMilliseconds(-1), ExclMaxEndDateTime.AddMilliseconds(-1)), }; // ACT var responses = requests.Select(request => SUT.Calculate(request)).ToList(); // ASSERT Assert.IsTrue(responses.All(i => i.Price == 13M)); Assert.IsTrue(responses.All(i => string.Equals(i.RateName, "Early Bird"))); }