public ErrorTemplatePageViewModel(INavigationService navigationService) : base(navigationService) { _navigationService = navigationService; _applicationProperties = new ApplicationProperties(); NavigateLoginPageCommand = new DelegateCommand(() => { //ログイン済情報の削除 _applicationProperties.ClearPropertie("userId"); _applicationProperties.ClearPropertie("token"); //ログインページに遷移させる _navigationService.NavigateAsync("/NavigationPage/LoginPage"); }); }
public void ApplicationProperties_ClearPropertie_Success() { MockForms.Init(); Application.Current = new CustomApplication(); Application.Current.Properties.Add("testClearKey", "testClearValue"); var applicationProperties = new ApplicationProperties(); applicationProperties.ClearPropertie("testClearKey"); Assert.IsNull(applicationProperties.GetFromProperties <string>("testClearKey")); }