Example #1
0
 @Test
 /** Test the output of toString() on an full plane. Do not modify this method. */
 public void testToStringWithFullPlane()
     throws AlreadyReservedException, SeatOutOfBoundsException {
   AirplaneSeats seats = new AirplaneSeats(3, 4);
   seats.reserveAll("A1", "B1", "C1", "D1");
   seats.reserveAll("A2", "B2", "C2", "D2");
   seats.reserveAll("A3", "B3", "C3", "D3");
   Assert.assertEquals("  ABCD\n" + "1 ####\n" + "2 ####\n" + "3 ####\n", seats.toString());
 }
Example #2
0
 @Test
 /** Test the output of toString() on an empty plane. Do not modify this method. */
 public void testToStringWithEmptyPlane() {
   AirplaneSeats seats = new AirplaneSeats(3, 4);
   Assert.assertEquals("  ABCD\n" + "1 oooo\n" + "2 oooo\n" + "3 oooo\n", seats.toString());
 }