public void BookingManager_PlaceBooking_ArrivalDateSunday() { Booking instance = new Booking { ClientName = "John Doe", ArrivalDate = new DateTime(2009, 8, 9), NumberOfGuests = 2 }; // will throw ValidationException BookingManager.PlaceBooking(instance); }
public void BookingManager_PlaceBooking_Valid() { Booking instance = new Booking { ClientName = "John Doe", ArrivalDate = new DateTime(2009, 8, 13), NumberOfGuests = 2 }; try { // should not throw a ValidationException BookingManager.PlaceBooking(instance); } catch (ValidationException) { Assert.Fail(); } }