Exemple #1
0
        public SelectionStep GotoNextSelectionStep(string comment = "")
        {
            SelectionStep nextStep;

            if (CurrentSelectionStep == null)
            {
                SelectionSteps = new List <SelectionStep>();
                nextStep       = new CvScreening();
            }
            else
            {
                if (IsSelectionStepEndOfSelectionProcess())
                {
                    return(null);
                }
                else
                {
                    nextStep = CurrentSelectionStep.GoToNextState();
                }
            }

            if (!string.IsNullOrWhiteSpace(comment))
            {
                nextStep.Comment = comment;
            }

            CurrentSelectionStep = nextStep;
            SelectionSteps.Add(nextStep);

            return(nextStep);
        }
        public void GivenCVScreening_whenGoToNextState_ThenReturnNewPhoneScreening()
        {
            //Given
            var selectionstep = new CvScreening();

            //When
            var nextSelectionStep = selectionstep.GoToNextState();

            //Then
            Assert.IsType <PhoneScreening>(nextSelectionStep);
        }
Exemple #3
0
        public void GivenJobApplication_WhenCurrentSelectionIsnull_ThenFirstSelectionIsSetToCVScreening()
        {
            var newJobApplication = new JobApplicationBuilder()
                                    .WithId(Guid.NewGuid())
                                    .WithCandidateId(Guid.NewGuid())
                                    .WithCampaignId(Guid.NewGuid())
                                    .WithStatus(StatusJobApplication.Active)
                                    .Build();

            var selectionStep = new CvScreening();

            newJobApplication.GotoNextSelectionStep();
            Assert.Equal(selectionStep.Description, newJobApplication.CurrentSelectionStep.Description);
        }