#1321 Added UML diagram

This commit is contained in:
Ashish Trivedi
2020-07-27 00:39:53 +05:30
parent 4017c37b6f
commit 12d392931e
5 changed files with 90 additions and 22 deletions

View File

@@ -261,7 +261,6 @@ public class HotelDaoImplTest {
}
}
/**
* An arbitrary number which does not correspond to an active Room id.
*

View File

@@ -63,7 +63,7 @@ public class HotelTest {
@Test()
public void bookingRoomWithInvalidIdShouldRaiseException() {
assertThrows(Exception.class, () -> {
hotel.bookRoom(999);
hotel.bookRoom(getNonExistingRoomId());
});
}
@@ -91,7 +91,7 @@ public class HotelTest {
@Test
public void cancelRoomBookingWithInvalidIdShouldRaiseException() {
assertThrows(Exception.class, () -> {
hotel.cancelRoomBooking(999);
hotel.cancelRoomBooking(getNonExistingRoomId());
});
}
@@ -140,4 +140,13 @@ public class HotelTest {
final var room6 = new Room(6, "Double", 80, false);
return List.of(room1, room2, room3, room4, room5, room6);
}
/**
* An arbitrary number which does not correspond to an active Room id.
*
* @return an int of a room id which doesn't exist
*/
private int getNonExistingRoomId() {
return 999;
}
}