public void Authorize_LogoutUser_ReturnsCurrentUserIsNull()
        {
            var controller = new UsersController(data, user);

            controller.Logout();
            var result = controller.CurrentUser;

            Assert.IsNull(result);
        }
        public void Logout_LogoutExistingUser_ShouldLogoutUser()
        {
            var controller = new UsersController(data, user);

            controller.Logout();
            var result = controller.CurrentUser;

            Assert.IsNull(result);
        }
 public void Logout_LogoutNonExistingUser_ShouldThrow()
 {
     var controller = new UsersController(data, null);
     controller.Logout();
 }
        public void TestLogout_WithoutLoggedUser_ShouldThrow()
        {
            var db = new HotelBookingSystemData();
            var controller = new UsersController(db, null);

            controller.Logout();
        }
        public void TestLogout_WithLoggedUser_CurrentUserIsNull()
        {
            var db = new HotelBookingSystemData();
            var controller = new UsersController(db, null);

            controller.Logout();
            var user = controller.CurrentUser;
            Assert.IsNull(user);
        }