public MainPresenter (Factory factory) { _mainViewModel = factory.Get<MainViewModel> (); Localaizer= factory.Get<LocalizeService> (); Localaizer.LoadLocalization ("en"); MainPage = new NavigationPage (new LoginPresenter (factory, Localaizer)); }
public async void StartTestLoginViewModel() { _localizeService = new LocalizeService(_localizer); _localizeService.Data = new LocalizeModel (); LoginViewModel loginViewModel = new LoginViewModel (_localizer,_platformException); LoginMockModel loginData = new LoginMockModel (); var isValid =await loginViewModel.CheckLoginData (loginData, _testServer); Assert.IsTrue (isValid, "Message: error login data"); }
public async void Integration () { _localizeService = new LocalizeService(_localizer); _localizeService.Data = new LocalizeModel (); LoginViewModel loginViewModel = new LoginViewModel (_localizer,_platformException); VTSViewModel vtsViewModel = new VTSViewModel (_fileSystem, _localizer,new SQLitePlatformWin32()); LoginMockModel loginData = new LoginMockModel (); vtsViewModel.Server = _testServer; var isValid =await loginViewModel.CheckLoginData (loginData, _testServer); Assert.IsTrue (isValid, "Message: error login data"); List<VTSModel> vtsList = await vtsViewModel.GetVTSList (); Assert.IsNotNull (vtsList, "Message GetVTSList error"); }