public void UpdateAutoTest() { var autoDto = AutoTarget.GetById(2); autoDto.Marke = "Jugo"; AutoTarget.Update(autoDto); }
public void DeleteAutoTest() { var autoDto = AutoTarget.GetById(1); AutoTarget.Delete(autoDto); Assert.Throws <FaultException <UnknownFault> >(() => AutoTarget.GetById(1)); }
public void UpdateAutoWithOptimisticConcurrencyTest() { var autoDto = AutoTarget.GetById(2); autoDto.Marke = "Jugo"; AutoTarget.Update(autoDto); autoDto.Marke = "VW"; Assert.Throws <FaultException <OptimisticConcurrencyFault> >(() => AutoTarget.Update(autoDto)); }
public void InsertAutoTest() { var autoDto = new AutoDto { AutoKlasse = (int)AutoKlasse.Luxusklasse, Basistarif = 50, Marke = "Audi C3" }; AutoTarget.Insert(autoDto); var autoDtoInserted = AutoTarget.GetById(5); Assert.Equal(50, autoDtoInserted.Basistarif); }
public void GetAutoByIdWithIllegalIdTest() { Assert.Throws <FaultException <UnknownFault> >(() => AutoTarget.GetById(100)); }
public void GetAutoByIdTest() { Assert.Equal("Fiat Punto", AutoTarget.GetById(1).Marke); }