public void MakeReservation_InvalidRoomId_Throws() { BookingException exception = Assert.Throws <BookingException>(() => _bookingManager.MakeReservation(Guid.NewGuid(), new DateTimeOffset(2019, 1, 1, 0, 0, 0, _cst), new DateTimeOffset(2019, 1, 2, 0, 0, 0, _cst))); StringAssert.Contains("Room Id", exception.Message); }
public void MakeReservation_EndDateBeforeStartDate_Throws() { BookingException exception = Assert.Throws <BookingException>(() => _bookingManager.MakeReservation(_roomId, new DateTimeOffset(2000, 2, 1, 0, 0, 0, _cst), new DateTimeOffset(2000, 1, 1, 0, 0, 0, _cst))); StringAssert.Contains("End Date", exception.Message); }
public void MakeReservation_HasConflict_Throws(DateTimeOffset startDate, DateTimeOffset endDate) { BookingException exception = Assert.Throws <BookingException>(() => _bookingManager.MakeReservation(_roomId, startDate, endDate)); StringAssert.Contains("conflict", exception.Message); }