public void DeleteReservationTestWithException() { ResetData(); var uow = new Mock <UnitOfWork>(); HotelReservationService hrs = new HotelReservationService(uow.Object); hrs.DeleteReservation(-5); }
public void DeleteReservationTest() { ResetData(); var uow = new Mock <UnitOfWork>(); HotelReservationService hrs = new HotelReservationService(uow.Object); int numEx = uow.Object.HotelReservations.Get().Count - 1; HotelReservation reservation = uow.Object.HotelReservations.Get()[uow.Object.HotelReservations.Get().Count - 1]; hrs.DeleteReservation(reservation.HotelReservationId); Assert.AreEqual(numEx, uow.Object.HotelReservations.Get().Count); }