public void Test_UpdateKunde()
 {
     AutoReservationBusinessComponent arvc = new AutoReservationBusinessComponent();
     Kunde original = arvc.GetAllKunden()[0];
     Kunde modified = arvc.GetAllKunden()[0];
     modified.Vorname = "Skoda";
     arvc.UpdateKunde(original, modified);
     Kunde newKunde = arvc.GetAllKunden()[0];
     Assert.AreEqual("Skoda", newKunde.Vorname);
 }
 public void UpdateKundeTest()
 {
     TestEnvironmentHelper.InitializeTestData();
     AutoReservationBusinessComponent autoReservation = new AutoReservationBusinessComponent();
     IList<Kunde> kunden = autoReservation.Kunden;
     Kunde original = kunden[0];
     Kunde modified = kunden[0];
     modified.Vorname = "Test Vorname";
     autoReservation.UpdateKunde(modified, original);
     Kunde modifiedAgain = kunden[0];
     Assert.AreEqual(modified, modifiedAgain);
 }
        public void UpdateKundeTest()
        {
            string modifiedVorname = "Test Vorname";

            TestEnvironmentHelper.InitializeTestData();
            AutoReservationBusinessComponent autoReservation = new AutoReservationBusinessComponent();
            IList<Kunde> kunden = autoReservation.GetKunden();
            Kunde modified = kunden[0];
            Kunde original = Kunde.CreateKunde(modified.Id, modified.Nachname, modified.Vorname, modified.Geburtsdatum);

            modified.Vorname = modifiedVorname;
            int idFromUpdatedKunde = modified.Id;
            autoReservation.UpdateKunde(modified, original);
            Kunde modifiedFetchedFromDb = autoReservation.GetKunde(idFromUpdatedKunde);
            Assert.AreEqual(modified.Vorname, modifiedFetchedFromDb.Vorname);
        }