コード例 #1
0
        public void SignIn_Post_Failure()
        {
            Models.SignInUser login = new Models.SignInUser() { Email = "*****@*****.**", Password = "******", RememberMe = false };

            const string ReturnUrl = "returnUrl";
            ViewResult view = this.UserController.SignIn(login, ReturnUrl) as ViewResult;
            Assert.AreEqual(view.ViewName, "SignIn");
        }
コード例 #2
0
        public void SignIn_Post_Ok()
        {
            Models.SignInUser login = new Models.SignInUser() { Email = "*****@*****.**", Password = "******", RememberMe = false };

            const string ReturnUrl = "returnUrl";
            RedirectResult redirect = this.UserController.SignIn(login, ReturnUrl) as RedirectResult;
            Assert.AreEqual(redirect.Url, ReturnUrl);
        }