Пример #1
0
 public void ValidateCalculationOfPaymentFromBedtimeToMidnightWhenJobEndsBeforeMidnight()
 {
     Assert.AreEqual(68m, BabysittingRateCalculator.CalculatePayment(DateTime.Parse("1/1/2016 5:00 PM"), DateTime.Parse("1/1/2016 11:00 PM"), DateTime.Parse("1/1/2016 10:00 PM")));
 }
Пример #2
0
 public void ValidateCalculationOfPaymentFromMidnightToEnd()
 {
     Assert.AreEqual(140m, BabysittingRateCalculator.CalculatePayment(DateTime.Parse("1/1/2016 5:00 PM"), DateTime.Parse("1/2/2016 4:00 AM"), DateTime.Parse("1/1/2016 10:00 PM")));
 }
Пример #3
0
 public void ValidatePaymentWhenJobDoneBeforeBedtime()
 {
     Assert.AreEqual(36m, BabysittingRateCalculator.CalculatePayment(DateTime.Parse("1/1/2016 5:00 PM"), DateTime.Parse("1/1/2016 8:00 PM"), DateTime.Parse("1/1/2016 10:00 PM")));
 }
Пример #4
0
 public void ValidateCalculationOfPaymentFromBedtimeToMidnight()
 {
     Assert.AreEqual(76m, BabysittingRateCalculator.CalculatePayment(DateTime.Parse("1/1/2016 5:00 PM"), DateTime.Parse("1/2/2016 12:00 AM"), DateTime.Parse("1/1/2016 10:00 PM")));
 }
Пример #5
0
 public void EnsureNightNotLongerThanADay()
 {
     Assert.Catch <ArgumentException>(() => BabysittingRateCalculator.CalculatePayment(DateTime.Parse("1/1/2016 6:00 PM"), DateTime.Parse("1/3/2016 4:00 AM"), DateTime.Parse("1/1/2016 5:45 PM")));
 }
Пример #6
0
 public void ValidateCalculationOfPaymentFromStartToBedtime()
 {
     Assert.AreEqual(60m, BabysittingRateCalculator.CalculatePayment(DateTime.Parse("1/1/2016 5:00 PM"), DateTime.Parse("1/1/2016 10:00 PM"), DateTime.Parse("1/1/2016 10:00 PM")));
 }
Пример #7
0
 public void EnsureStartTimeBeforeEndTime()
 {
     Assert.Catch <ArgumentException>(() => BabysittingRateCalculator.CalculatePayment(DateTime.Parse("1/2/2016 6:00 PM"), DateTime.Parse("1/2/2016 4:00 AM"), DateTime.Parse("1/1/2016 5:45 PM")));
 }
Пример #8
0
 public void EnsureEndTimeAtFourAmNextDayIsOk()
 {
     Assert.DoesNotThrow(() => BabysittingRateCalculator.CalculatePayment(DateTime.Parse("1/1/2016 6:00 PM"), DateTime.Parse("1/2/2016 4:00 AM"), DateTime.Parse("1/1/2016 5:45 PM")));
 }
Пример #9
0
 public void EnsureEndTimeNoLaterThanFourAmNextDay()
 {
     Assert.Catch <ArgumentOutOfRangeException>(() => BabysittingRateCalculator.CalculatePayment(DateTime.Parse("1/1/2016 6:00 PM"), DateTime.Parse("1/2/2016 5:45 AM"), DateTime.Parse("1/1/2016 5:45 PM")));
 }
Пример #10
0
 public void EnsureBabysittingStartingAtFiveIsOk()
 {
     Assert.DoesNotThrow(() => BabysittingRateCalculator.CalculatePayment(DateTime.Parse("1/1/2016 5:00 PM"), DateTime.Parse("1/1/2016 5:45 PM"), DateTime.Parse("1/1/2016 5:45 PM")));
 }
Пример #11
0
 public void EnsureBabysittingDoesNotStartBeforeFivePm()
 {
     Assert.Catch <ArgumentOutOfRangeException>(() => BabysittingRateCalculator.CalculatePayment(DateTime.Parse("1/1/2016 12:00 PM"), DateTime.Parse("1/1/2016 5:45 PM"), DateTime.Parse("1/1/2016 5:45 PM")));
 }