public async Task IntegrationDeleteVacation() { VacationsViewModel vacationsViewModel = (onlineMode) ? FactorySingleton.Factory.Get <VacationsViewModel>() : FactorySingleton.FactoryOffline.Get <VacationsViewModel>(); List <VTSModel> vtsList = await vacationsViewModel.GetVTSList(); Assert.IsNotNull(vtsList, "Message: GetVTSList error"); var oldcount = vtsList.Count; Assert.IsTrue(await vacationsViewModel.DeleteVacationInfo(vtsList[vtsList.Count - 1]), "Message: error DeleteVacationInfo"); Assert.AreNotEqual((await vacationsViewModel.GetVTSList()).Count, oldcount, "Message: error after Delete newcount == oldcount"); }
private async Task Delete(VTSModel vts) { var success = await _vacationsViewModel.DeleteVacationInfo(vts); if (success) { LoadListView(); } else { AlertDialog(_vacationsViewModel.Localaizer.Localize("error") + " " + _vacationsViewModel.ErrorMessage, null); } }