Ejemplo n.º 1
0
        public Participant ProgressParticipant(string evaluationId, Progression newProgression)
        {
            string      azureUniqueId = _authService.GetOID();
            Evaluation  evaluation    = _evaluationService.GetEvaluation(evaluationId);
            Participant participant   = _participantService.GetParticipant(azureUniqueId, evaluation);

            Participant progressedParticipant = _participantService.ProgressParticipant(participant, newProgression);

            return(progressedParticipant);
        }
Ejemplo n.º 2
0
        public Participant ProgressParticipant(string evaluationId, Progression newProgression)
        {
            string      azureUniqueId = _authService.GetOID();
            Evaluation  evaluation    = _evaluationService.GetEvaluation(evaluationId);
            Participant participant   = _participantService.GetParticipant(azureUniqueId, evaluation);

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

            Participant progressedParticipant = _participantService.ProgressParticipant(participant, newProgression);

            return(progressedParticipant);
        }
Ejemplo n.º 3
0
        public void ProgressParticipant()
        {
            ProjectService     projectService     = new ProjectService(_context);
            ParticipantService participantService = new ParticipantService(_context);
            EvaluationService  evaluationService  = new EvaluationService(_context);
            Project            project            = projectService.Create("ProgressParticipant");
            Evaluation         evaluation         = evaluationService.Create("ProgressParticipant", project);
            Participant        participant        = participantService.Create("ProgressParticipant", evaluation, Organization.All, Role.Facilitator);

            Progression progressionBefore = participant.Progression;

            participantService.ProgressParticipant(participant, Progression.Individual);
            Progression progressionAfter = participant.Progression;

            Assert.Equal(Progression.Nomination, progressionBefore);
            Assert.Equal(Progression.Individual, progressionAfter);
        }