public void UpdateReservationTestWithOptimisticConcurrency()
 {
     TestEnvironmentHelper.InitializeTestData();
     AutoReservationService service = new AutoReservationService();
     ReservationDto originalReservation = service.Reservationen[0];
     ReservationDto modifiedReservation = (ReservationDto)originalReservation.Clone();
     ReservationDto modifiedReservation2 = (ReservationDto)originalReservation.Clone();
     modifiedReservation.Von = System.DateTime.Today;
     modifiedReservation2.Von = System.DateTime.Today;
     service.UpdateReservation(modifiedReservation, originalReservation);
     try
     {
         service.UpdateReservation(modifiedReservation2, originalReservation);
         Assert.Fail();
     }
     catch (LocalOptimisticConcurrencyException<Reservation> ex)
     {
         Assert.IsNotNull(ex);
     }
 }
 public void UpdateReservationTest()
 {
     TestEnvironmentHelper.InitializeTestData();
     AutoReservationService service = new AutoReservationService();
     ReservationDto originalReservation = service.Reservationen[0];
     ReservationDto modifiedReservation = (ReservationDto)originalReservation.Clone();
     modifiedReservation.Von = System.DateTime.Today;
     service.UpdateReservation(modifiedReservation, originalReservation);
     Assert.AreEqual(service.Reservationen[0], modifiedReservation);
 }