Example #1
0
 @Test
 public void testTimePrice() {
   PriceCal timePriceCal = new TimePriceCal();
   timePriceCal.calculate(order);
   assertEquals(1.25, order.getPrice());
 }
Example #2
0
 @Test
 public void testMiddlePrice() {
   PriceCal middlePriceCal = new MiddlePriceCal();
   middlePriceCal.calculate(order);
   assertEquals(4.8, order.getPrice());
 }
Example #3
0
 @Test
 public void testExtraPrice() {
   PriceCal extraPriceCal = new ExtraPriceCal();
   extraPriceCal.calculate(order);
   assertEquals(4.8, order.getPrice());
 }
Example #4
0
 @Test
 public void testStartPrice() {
   PriceCal startPriceCal = new StartPriceCal();
   startPriceCal.calculate(order);
   assertEquals(6.0, order.getPrice());
 }