Пример #1
0
        public ActionResult AllUsers(int id)
        {
            if (Session["User"] != null)
            {
                List <User> model = new List <User>();

                model = ULogic.AllUsers();
                return(View(model));
            }
            return(RedirectToAction("Login", "User"));
        }
Пример #2
0
        public void TestUserToevoegen()
        {
            // Arrange
            int aantal = ULogic.AllUsers().Count();

            user = new User
            {
                Id              = 1,
                Email           = "*****@*****.**",
                IsEmailVerified = false,
                Password        = "******",
                ConfirmPassword = "******",
                Mobile          = 0684522582,
                RememberMe      = true,
            };

            // Act
            ULogic.AddUser(user);

            // Assert
            Assert.AreEqual(aantal + 1, ULogic.AllUsers().Count());
        }