Ejemplo n.º 1
0
  /** If the guest is checked in, the returned room must be occupied by the specified guest. */
  @Test
  public void testGetRoomAfterCheckIn() {
    hotel.checkIn(correctPassword, GUEST_NAME_1);

    Room room = hotel.getRoom(GUEST_NAME_1);
    assertEquals("Guest 1 checked in", GUEST_NAME_1, room.getGuest().getName());
  }
Ejemplo n.º 2
0
 /** getRoom must not return any room, if the guest is not checked in */
 @Test
 public void testGetRoomBeforeCheckIn() {
   Room room = hotel.getRoom(GUEST_NAME_1);
   assertNull("Guest 1 not checked in", room);
 }