Exemplo n.º 1
0
        public virtual ActionResult Create(Guid id)
        {
            var patient = _patientHelper.GetPatient(id);

            var roles = _roleHelper.GetRoles();

            var viewModel = _assessmentViewModelBuilder.BuildAssessmentViewModel(patient, roles);

            return(View(viewModel));
        }
Exemplo n.º 2
0
        public void CreateGET_GivenPatientId_AssessmentBuilderShouldBeCalled()
        {
            var assessment = new Assessment();
            var patient    = new Patient();
            var id         = Guid.NewGuid();
            var roles      = new Roles();

            A.CallTo(() => _assessmentHelper.GetAssessment(A <Guid> ._)).Returns(assessment);
            A.CallTo(() => _patientHelper.GetPatient(A <Guid> ._)).Returns(patient);
            A.CallTo(() => _roleHelper.GetRoles()).Returns(roles);

            _assessmentController.Create(id);

            A.CallTo(() => _assessmentBuilder.BuildAssessmentViewModel(patient, roles)).MustHaveHappened(Repeated.Exactly.Once);
        }