public void CandidateSearchService_Should_Ignore_Duplicate_Skills() { var jobBusinessService = new JobBusinessServices <IgnoreRepeatedSkills>(HttpClientManagerMock.Object, ConfigurationMock.Object); var candidateBusinessService = new CandidateBusinessServices <IgnoreRepeatedSkills>(HttpClientManagerMock.Object, ConfigurationMock.Object); var candidateSearchService = new CandidateSearchServices <IgnoreRepeatedSkills, IgnoreRepeatedSkills>( candidateBusinessService, jobBusinessService); var candidateSkillWeights = candidateSearchService.CandidateSkillWeights.ToList(); Assert.NotNull(candidateSkillWeights); }
public void Setup() { InitFakes(); ConfigurationMock = new Mock <IConfiguration>(); ConfigurationMock.Setup(x => x.GetSection(It.IsAny <string>())[It.IsAny <string>()]).Returns(FakeApiEndpoint); HttpClientManagerMock = new Mock <IHttpClientManager>(MockBehavior.Default); HttpClientManagerMock.Setup(x => x.GetAsync <IEnumerable <Job> >(It.IsAny <string>())).Returns(() => Task.FromResult(FakeJobs.AsEnumerable())); HttpClientManagerMock.Setup(x => x.GetAsync <IEnumerable <Candidate> >(It.IsAny <string>())).Returns(() => Task.FromResult(FakeCandidates.AsEnumerable())); CandidateBusinessServices = new CandidateBusinessServices <AddValueForRepeatedSkills>(HttpClientManagerMock.Object, ConfigurationMock.Object); JobBusinessService = new JobBusinessServices <AddValueForRepeatedSkills>(HttpClientManagerMock.Object, ConfigurationMock.Object); }