public virtual ActionResult Create(Guid id) { var patient = _patientHelper.GetPatient(id); var roles = _roleHelper.GetRoles(); var viewModel = _assessmentViewModelBuilder.BuildAssessmentViewModel(patient, roles); return(View(viewModel)); }
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); }