예제 #1
0
        public void IndexGET_GivenDisclaimer_DisclaimerViewModelBuilderShouldBeCalled()
        {
            var disclaimer = new Disclaimer();

            A.CallTo(() => _queryDispatcher.Dispatch <DisclaimerByUserQuery, Disclaimer>(A <DisclaimerByUserQuery> ._)).Returns(disclaimer);

            _controller.Index();

            A.CallTo(() => _disclaimerViewModelBuilder.BuildDisclaimerViewModel(disclaimer)).MustHaveHappened(Repeated.Exactly.Once);
        }
예제 #2
0
        public virtual ActionResult Index()
        {
            var disclaimer = _queryDispatcher.Dispatch <DisclaimerByUserQuery, Disclaimer>(new DisclaimerByUserQuery()
            {
                AssessorDomainName = _userPrincipalProvider.CurrentUserName
            });

            var model = _disclaimerViewModelBuilder.BuildDisclaimerViewModel(disclaimer);

            return(View(model));
        }