public void VerifyBusInfoGet() { ITranslinkService _testTransService = new TranslinkService(); IDialogService _dummyDialogService = new TestDialogService(); INavigationService _dummyNavigationService = new TestNavigationService(); MainViewModel vm = new MainViewModel(_testTransService, _dummyDialogService, _dummyNavigationService); vm.RefreshCommand.Execute(null); Assert.IsNotNull(vm.NextBusList); }
public ViewModelLocator() { IDialogService dialogService = new DialogService(); INavigationService navigationService = new NavigationService(); ITranslinkService translinkService; if (ViewModelBase.IsInDesignModeStatic) { translinkService = new DesignTranslinkInfoService(); } else { translinkService = new TranslinkService(); } //Cache Service code - TODO translinkService.CacheUserPreference("0"); Main = new MainViewModel(translinkService, dialogService, navigationService); //Initializing User Preference storage }