示例#1
0
 @Test
 public void testGetMaxSeats() {
   System.out.println("testGetMaxSeats");
   Taxi policeCar = new Taxi();
   int expResult = 4;
   int result = policeCar.getSeats();
   assertEquals(expResult, result);
 }
示例#2
0
 @Test
 public void testAddPassengerMax_seatsCheck() {
   System.out.println("testAddPassengerMax_seatsCheck");
   Human human = new Human("test hum");
   Human human2 = new Human("test hum2");
   Human human3 = new Human("test hum3");
   Human human4 = new Human("test hum4");
   Taxi taxi = new Taxi();
   taxi.addPassenger(human);
   taxi.addPassenger(human2);
   taxi.addPassenger(human3);
   taxi.addPassenger(human4);
   int expResult = taxi.getSeats();
   int result = taxi.getUsedSeats();
   assertEquals(expResult, result);
 }