Пример #1
0
        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);
        }
Пример #2
0
        /*
         * 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);
        }
Пример #3
0
        /*
         * 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);
        }