コード例 #1
0
        public void IndexGET_GivenPatientId_AssessmentsBuilderShouldBeCalled()
        {
            var patientId = Guid.NewGuid();

            var assessments = new Assessments();

            A.CallTo(() => _assessmentHelper.GetAssessmentsByPatient(A <Guid> ._)).Returns(assessments);

            _assessmentController.Index(patientId);

            A.CallTo(() => _assessmentBuilder.BuildAssessmentListViewModel(patientId, assessments)).MustHaveHappened(Repeated.Exactly.Once);
        }
コード例 #2
0
        public virtual ActionResult Index(Guid id)
        {
            var result = _assessmentHelper.GetAssessmentsByPatient(id);

            var model = _assessmentViewModelBuilder.BuildAssessmentListViewModel(id, result);

            return(View(model));
        }