Beispiel #1
0
 public void shouldCalculateForACChargesFor20KmsPeakTime()
 {
     // ((20 * 10 + 17 * 20) * 1.2 + 50 ) * 1.1 = 767.8
     double cost = new Receipt(new Taxi(true, 30, true)).totalCost();
     Assert.AreEqual(698.0D, cost);
 }
Beispiel #2
0
 public void shouldCalculateChargesForNonACTaxiFor20Kms()
 {
     // ((15 * 10 + 12 * 20) + 50 ) * 1.1 = 374.0
     double cost = new Receipt(new Taxi(false, 30, false)).totalCost();
     Assert.AreEqual(440D, cost);
 }
Beispiel #3
0
 public void shouldCalculateChargesForNonACTaxiFor20KmsPeakTime()
 {
     // ((15 * 10 + 12 * 20) * 1.2 + 50 ) * 1.1 = 569.8
     double cost = new Receipt(new Taxi(false, 30, true)).totalCost();
     Assert.AreEqual(518.0D, cost);
 }
Beispiel #4
0
 public void shouldCalculateChargesForACTaxiFor20Kms()
 {
     // ((20 * 10 + 17 * 20) + 50 ) * 1.1 = 649.0
     double cost = new Receipt(new Taxi(true, 30, false)).totalCost();
     Assert.AreEqual(590D, cost);
 }