public void SummarySuggestionServiceSetUp() { var recruiter = new User("", "", UserType.Recruiter); var specializations = new List <Specialization>() { new Specialization("Spec1"), new Specialization("Spec2") }; var vacancy = new Vacancy(recruiter, specializations[0], new List <Skill>(), ""); var summaries = new List <Summary>(); for (int i = 0; i < 10; i++) { summaries.Add(new Summary(new User("", "", UserType.Candidate), specializations[i % 2], new List <Skill>(), "")); } _userRepository = Mock.Of <IUserRepository>( x => x.Get(0) == recruiter); _vacancyRepository = Mock.Of <IVacancyRepository>( x => x.GetForUser(0) == vacancy && x.Get(0) == vacancy); _summaryRepository = Mock.Of <ISummaryRepository>( x => x.Get() == summaries); _summarySuggestionRepository = new SummarySuggestionRepositoryMock(new List <SummarySuggestion>()); _summarySuggestionService = new SummarySuggestionService(_summarySuggestionRepository, _vacancyRepository, _userRepository, _summaryRepository, Mock.Of <IMatchService>()); _rule = new SimpleSummaryRule(specializations[0], new List <Skill>()); }
public SummarySuggestionController(ISummarySuggestionService summarySuggestionService, IAccessService accessService) : base(accessService) { _summarySuggestionService = summarySuggestionService ?? throw new ArgumentException(nameof(summarySuggestionService)); }