public void DeleteReservationTest() { TestEnvironmentHelper.InitializeTestData(); AutoReservationService service = new AutoReservationService(); int count = service.Reservationen.Count; ReservationDto delete = service.Reservationen[0]; int nr = delete.ReservationNr; service.DeleteReservation(delete); Assert.AreEqual(count - 1, service.Reservationen.Count); Assert.IsNull(service.GetReservationByNr(nr)); }
public void GetReservationByIllegalNr() { TestEnvironmentHelper.InitializeTestData(); AutoReservationService service = new AutoReservationService(); ReservationDto reservationById = service.GetReservationByNr(9999999); Assert.IsNull(reservationById); }
public void GetReservationByNrTest() { TestEnvironmentHelper.InitializeTestData(); AutoReservationService service = new AutoReservationService(); IList<ReservationDto> reservationen = service.Reservationen; ReservationDto first = reservationen[0]; int nr = first.ReservationNr; ReservationDto reservationById = service.GetReservationByNr(nr); Assert.AreEqual(first, reservationById); }