public ShortTraitDataProcessorTests()
        {
            _siteFinityHttpService = Substitute.For <ISiteFinityHttpService>();
            _shortTraitRepository  = Substitute.For <IShortTraitRepository>();
            _logger = Substitute.For <ILogger>();

            _sut = new ShortTraitDataProcessor(_siteFinityHttpService, _shortTraitRepository);
        }
 public AssessmentCalculationService(
     IJobCategoryRepository jobCategoryRepository,
     IShortTraitRepository traitRepository,
     IQuestionRepository questionRepository,
     IQuestionSetRepository questionSetRepository)
 {
     _jobCategoryRepository = jobCategoryRepository;
     _traitRepository       = traitRepository;
     _questionRepository    = questionRepository;
     _questionSetRepository = questionSetRepository;
 }
        public ResultTests()
        {
            _jobFamilyRepository   = Substitute.For <IJobCategoryRepository>();
            _shortTraitRepository  = Substitute.For <IShortTraitRepository>();
            _questionSetRepository = Substitute.For <IQuestionSetRepository>();
            _questionRepository    = Substitute.For <IQuestionRepository>();

            _logger = Substitute.For <ILogger>();

            _assessmentCalculationService = new AssessmentCalculationService(
                _jobFamilyRepository,
                _shortTraitRepository,
                _questionRepository,
                _questionSetRepository);

            _shortTraitRepository.GetTraits().Returns(
                Task.FromResult(ResultTestMockData.Traits.ToArray())
                );

            _jobFamilyRepository.GetJobCategories("job-categories").Returns(
                Task.FromResult(ResultTestMockData.JobFamilies.ToArray())
                );

            _questionSetRepository.GetCurrentQuestionSet("filtered").Returns(
                Task.FromResult(new QuestionSet
            {
                Title              = "qs-1",
                QuestionSetKey     = "qs-1",
                QuestionSetVersion = "qs-1",
                MaxQuestions       = 3
            }));

            _questionRepository.GetQuestions("qs-1").Returns(Task.FromResult(new []
            {
                new Question {
                    TraitCode        = "Self Control",
                    IsFilterQuestion = true,
                    QuestionId       = "1", Order = 1, Texts = new []
                    {
                        new QuestionText {
                            LanguageCode = "en", Text = "Question 1"
                        }
                    }
                }
            }));
        }
 public ShortTraitDataProcessor(ISiteFinityHttpService sitefinity, IShortTraitRepository shortTraitRepository)
 {
     _sitefinity           = sitefinity;
     _shortTraitRepository = shortTraitRepository;
 }