Пример #1
0
        private async Task UpdateFilteredProfileAndGoalsForDelegate(int selfAssessmentId, int candidateId)
        {
            var filteredToken = await GetFilteredToken();

            var profile = selfAssessmentService.GetFilteredProfileForCandidateById(selfAssessmentId, candidateId);
            var goals   = selfAssessmentService.GetFilteredGoalsForCandidateId(selfAssessmentId, candidateId)
                          .ToList();
            var response = await filteredApiHelperService.UpdateProfileAndGoals(filteredToken, profile, goals);
        }
Пример #2
0
        SelfAssessmentResults_redirect_to_expected_action_does_not_call_filtered_api_when_using_signposting()
        {
            // Given
            A.CallTo(() => configuration[ConfigHelper.UseSignposting]).Returns("true");

            // When
            var result = await controller.SelfAssessmentResults(SelfAssessmentId);

            // Then
            using (new AssertionScope())
            {
                A.CallTo(
                    () => filteredApiHelperService.UpdateProfileAndGoals(A <string> ._, A <Profile> ._, A <List <Goal> > ._)
                    ).MustNotHaveHappened();
                result.Should().BeRedirectToActionResult().WithActionName("RecommendedLearning")
                .WithRouteValue("selfAssessmentId", SelfAssessmentId);
            }
        }