public async Task CreateAircraft_WhenAircraftValid_ReturnNewAircraft() { AircraftDto aircraft = new AircraftDto() { AircraftName = "TEST", TypeAircraftId = 1 }; AircraftDto aircraftDtoSaved = await service.Create(aircraft); Assert.AreEqual(aircraft.AircraftName, aircraftDtoSaved.AircraftName); Assert.AreEqual(aircraft.TypeAircraftId, aircraftDtoSaved.TypeAircraftId); bool result = await service.Delete <Aircraft>(aircr => aircr.Id == aircraftDtoSaved.Id); Assert.IsTrue(result); }
public async Task Delete() { await AircraftService.Delete(Aircraft.Id); Aircraft = new Aircraft(); NotifyPropertyChanged(() => Aircraft); List <Aircraft> tempAircrafts = await AircraftService.GetAll(); Aircrafts = new ObservableCollection <Aircraft>(); foreach (var fl in tempAircrafts) { Aircrafts.Add(fl); } NotifyPropertyChanged(() => Aircrafts); }