public void TestLogin_ValidInput()
        {
            //var result = (RedirectToRouteResult)controller.Register(registrModel);

            /*result.RouteValues["action"].Equals("Index");
            result.RouteValues["controller"].Equals("Home");

            Assert.AreEqual("Index", action.RouteValues["action"]);
            Assert.AreEqual("Home", action.RouteValues["controller"]);*/

            UsersController userController = new UsersController();
            HomeController homeController = new HomeController();
            // Act

            ViewResult result = userController.Login("gary", "nicolson") as ViewResult;
            ViewResult result2 = homeController.Index() as ViewResult;
            // Assert

            Assert.AreEqual("Valid", result2.ViewBag.message);
        }
        public void TestLogin_InvalidPassword()
        {
            UsersController userController = new UsersController();

            // Act
            ViewResult result = userController.Login("gary", "nicol") as ViewResult;

            // Assert
            Assert.AreEqual("Invalid Password", result.ViewBag.message);
        }
        public void TestLogin_Null_Entry()
        {
            UsersController userController = new UsersController();

            // Act
            ViewResult result = userController.Login(null, null) as ViewResult;

            // Assert
            Assert.AreEqual("Invalid UserName", result.ViewBag.message);
        }
        public void TestLogin_IncorrectUserName()
        {
            UsersController userController = new UsersController();

            // Act
            ViewResult result = userController.Login("gazaz", "nicolson") as ViewResult;

            // Assert
            Assert.AreEqual("Invalid UserName", result.ViewBag.message);
        }