Example #1
0
        public void MatchServiceSetUp()
        {
            var candidate       = new User("", "", UserType.Candidate);
            var recruiter       = new User("", "", UserType.Recruiter);
            var specialization  = new Specialization("spec");
            var summary         = new Summary(candidate, specialization, new List <Skill>(), "");
            var vacancy         = new Vacancy(recruiter, specialization, new List <Skill>(), "");
            var matchRepository = new MatchRepositoryMock(new List <Match>());
            var userRepository  = Mock.Of <IUserRepository>(x =>
                                                            x.Get(0) == candidate);
            var summaryRepository = Mock.Of <ISummaryRepository>(x =>
                                                                 x.GetForUser(0) == summary &&
                                                                 x.Get(0) == summary);
            var vacancyRepository = Mock.Of <IVacancyRepository>(x =>
                                                                 x.Get(0) == vacancy);

            _matchService = new MatchService(matchRepository, userRepository, summaryRepository, vacancyRepository);
        }
Example #2
0
 public MatchesControllerTest()
 {
     _repository = new MatchRepositoryMock();
     _mapper     = new Mapper(new MapperConfiguration(conf => { conf.AddProfile(new MappingProfile()); }));
     _controller = new MatchesController(_repository, _mapper);
 }