public void ProgressEvaluation()
        {
            Project project = GetProject();

            EvaluationService evaluationService = new EvaluationService(fixture.context);
            Evaluation        evaluation        = evaluationService.Create("some_name", project, "");
            Progression       nextEvaluation    = ServiceUtil.NextProgression(evaluation.Progression);

            Progression progressionBefore = evaluation.Progression;

            evaluationService.ProgressEvaluation(evaluation, nextEvaluation);
            Progression progressionAfter = evaluation.Progression;

            Assert.True(ServiceUtil.NextProgression(progressionBefore).Equals(progressionAfter));
        }
Exemple #2
0
        public void ProgressEvaluation()
        {
            ProjectService projectService = new ProjectService(_context);
            Project        project        = projectService.GetAll().First();

            EvaluationService evaluationService = new EvaluationService(_context);
            Evaluation        evaluation        = evaluationService.Create("some_name", project);

            Progression progressionBefore = evaluation.Progression;

            evaluationService.ProgressEvaluation(evaluation.Id);
            Progression progressionAfter = evaluation.Progression;

            Assert.True(ServiceUtil.NextProgression(progressionBefore).Equals(progressionAfter));
        }
Exemple #3
0
        public Evaluation ProgressEvaluation(string evaluationId, Progression newProgression)
        {
            _authService.AssertIsFacilitator(evaluationId);
            Evaluation evaluation = _evaluationService.GetEvaluation(evaluationId);

            _evaluationService.ProgressEvaluation(evaluation, newProgression);

            _participantService.ProgressAllParticipants(evaluation, newProgression);

            if (newProgression.Equals(Progression.FollowUp))
            {
                _answerService.CreateFollowUpAnswers(evaluation);
            }

            return(evaluation);
        }
Exemple #4
0
        public Evaluation ProgressEvaluation(string evaluationId, Progression newProgression)
        {
            Evaluation evaluation = _evaluationService.GetEvaluation(evaluationId);

            Role[] canBePerformedBy = { Role.Facilitator };
            AssertCanPerformMutation(evaluation, canBePerformedBy);

            _evaluationService.ProgressEvaluation(evaluation, newProgression);

            _participantService.ProgressAllParticipants(evaluation, newProgression);

            if (newProgression.Equals(Progression.FollowUp))
            {
                _evaluationService.SetWorkshopCompleteDate(evaluation);
                _answerService.CreateFollowUpAnswers(evaluation);
            }

            return(evaluation);
        }
Exemple #5
0
        public Evaluation ProgressEvaluation(string evaluationId)
        {
            _authService.AssertIsFacilitator(evaluationId);

            return(_evaluationService.ProgressEvaluation(evaluationId));
        }