Exemplo n.º 1
0
        public virtual ActionResult AddCompletionDetails(TerminatedViewModel model)
        {
            _workflowHandler.AddCompletionDetails(model.AssessmentId, model.DateAssessmentEnded, model.TerminatedAssessmentReason);

            var assessment = _assessmentHelper.GetAssessment(model.AssessmentId);
            var viewModel  = _assessmentViewModelBuilder.BuildAssessmentViewModel(assessment);

            _workflowHandler.CompleteAssessment(model.AssessmentId);
            return(View(MVC.Assessment.Views.Complete, viewModel));
        }
Exemplo n.º 2
0
        public void AddCompletionDetailsPost_GivenAssessmentId_AssessmentMustBeMarkedComplete()
        {
            var assessmentId = Guid.NewGuid();

            var model = new TerminatedViewModel {
                AssessmentId = assessmentId
            };

            _assessmentController.AddCompletionDetails(model);

            A.CallTo(() => _workflowHandler.CompleteAssessment(assessmentId)).MustHaveHappened(Repeated.Exactly.Once);
        }