Beispiel #1
0
        public void WhenIAskForTheChangeCurrentPassowrdPage_TheViewIsReturnedAndContainsTheRightModel()
        {
            _controller.TempData["username"] = "******";

            var user = new ApplicationUser("Greg");

            this._userService.Setup(x => x.GetApplicationUser(It.IsAny <string>())).Returns(user);

            var result = (ViewResult)_controller.ChangeCurrent();

            result.Model.Should().BeOfType <ChangeCurrentPasswordModel>();

            this._userService.Verify(x => x.GetApplicationUser(It.IsAny <string>()), Times.AtLeastOnce);
        }