public async Task logoutUser() { await loginAPI.LoginUser("buzz", "drowssap"); HttpStatusCode result = await loginAPI.Logout(false); Assert.AreEqual(HttpStatusCode.OK, result); Assert.IsNull(UserController.Instance.LoggedInUser); }
/* * Method which is used when a user logs out, opening the login page again. */ private async void LogoutUser() { // Remove token from server LoginAPI loginAPI = new LoginAPI(); await loginAPI.Logout(false); // Logout any currently stored user UserController.Instance.Logout(); // Open the login page var loginPage = new LoginPage(); await Navigation.PopModalAsync(true); }
/* * Method which is used when a user logs out, opening the login page again. */ private async void LogoutClinician() { // Remove token from server LoginAPI loginAPI = new LoginAPI(); await loginAPI.Logout(true); // Clear any previously selected user UserController.Instance.Logout(); // Logout clinician ClinicianController.Instance.Logout(); // Open the login page var loginPage = new LoginPage(); await Navigation.PopModalAsync(true); }