void resetData()
 {
     _services.Preferences.ResetPrefs();
     AppUserData.Clear();
     DataAccess.ResetData();
     _services.Navigation.OpenLogin();
 }
示例#2
0
 void changeServer(ServerPageModel server)
 {
     Servers.SetCurrent(server.Address);
     _services.Preferences.IsLoggedIn = false;
     AppUserData.Clear();
     DataAccess.ResetData();
     toggleServer(server);
 }
示例#3
0
 public void ClearTest()
 {
     AppUserData.SetProfileData(_mocked, _profile);
     AppUserData.Clear();
     Assert.AreEqual(0, AppUserData.UserId);
     Assert.AreEqual(null, AppUserData.Name);
     Assert.AreEqual(0, AppUserData.GroupId);
     Assert.AreEqual(null, AppUserData.Avatar);
     Assert.AreEqual(null, AppUserData.Username);
     Assert.AreEqual(null, AppUserData.GroupName);
     Assert.AreEqual(true, AppUserData.IsProfileLoaded);
     Assert.AreEqual(UserTypeEnum.Student, AppUserData.UserType);
 }