Пример #1
0
        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");
        }
Пример #2
0
        private async Task Delete(VTSModel vts)
        {
            var success = await _vacationsViewModel.DeleteVacationInfo(vts);

            if (success)
            {
                LoadListView();
            }
            else
            {
                AlertDialog(_vacationsViewModel.Localaizer.Localize("error") + " " + _vacationsViewModel.ErrorMessage, null);
            }
        }