コード例 #1
0
        public void HomeAbout()
        {
            ViewResult result = _controller.About() as ViewResult;

            Assert.AreEqual("Your application description page.", result.ViewBag.Message);
            ControllerHelper.AssertController(result, _controller);
        }
コード例 #2
0
        public void AccountForgotPasswordPost()
        {
            var result = _controller.ForgotPassword(new UserForgotPasswordViewModel()
            {
                Email = "*****@*****.**"
            });

            ControllerHelper.AssertController(result, _controller);
        }
コード例 #3
0
        public void AccountRegisterPost()
        {
            var result = _controller.Register(new ViewModels.Account.RegisterViewModel()
            {
                Username        = "",
                Password        = "******",
                ConfirmPassword = "******",
                Email           = "*****@*****.**"
            });

            ControllerHelper.AssertController(result, _controller);
        }
コード例 #4
0
        public void AccountLoginPost()
        {
            var result = _controller.Login(new LoginViewModel()
            {
                UserName = "******", Password = "******"
            }, null);

            ControllerHelper.AssertController(result, _controller);

            //Need to be able to login using e-mail address as well as username
            result = _controller.Login(new LoginViewModel()
            {
                UserName = "******", Password = "******"
            }, null);
            ControllerHelper.AssertController(result, _controller);
        }
コード例 #5
0
        public void HomeContact()
        {
            ViewResult result = _controller.Contact() as ViewResult;

            ControllerHelper.AssertController(result, _controller);
        }
コード例 #6
0
        public void HomeIndex()
        {
            ViewResult result = _controller.Index() as ViewResult;

            ControllerHelper.AssertController(result, _controller);
        }
コード例 #7
0
        public void AccountForgotPassword()
        {
            var result = _controller.ForgotPassword();

            ControllerHelper.AssertController(result, _controller);
        }
コード例 #8
0
        public void AccountLogin()
        {
            ViewResult result = _controller.Login("test") as ViewResult;

            ControllerHelper.AssertController(result, _controller);
        }
コード例 #9
0
        public void AccountRegister()
        {
            ViewResult result = _controller.Register() as ViewResult;

            ControllerHelper.AssertController(result, _controller);
        }