Example #1
0
 public AccountController(IUserService userService, IAuthorizationService authService, IAnswerService answerService, ITaskService taskService)
 {
     this.userService = userService;
     this.authService = authService;
     this.answerService = answerService;
     this.taskService = taskService;
 }
Example #2
0
 public TestService(IUnitOfWork uow, IRepository<DalTest> tRepo, IQuestionService qService, IAnswerService aService)
 {
     this.uow = uow;
     this.testRepo = tRepo;
     this.questionService = qService;
     this.answerService = aService;
 }
Example #3
0
 public TestController(ITestService service, IUserService uService, IQuestionService qService, IAnswerService aService)
 {
     this.testService = service;
     this.userService = uService;
     this.questionService = qService;
     this.answerService = aService;
 }
Example #4
0
 public TaskController(ITaskService taskService, IAuthorizationService authorizationService, ITagService tagService, IPhotoService photoService, IAnswerService answerService,IUserService userService)
 {
     this.taskService = taskService;
     this.authorizationService = authorizationService;
     this.tagService = tagService;
     this.photoService = photoService;
     this.answerService = answerService;
     this.userService = userService;
 }
 public ApiController(
     IAnswerService answerService, 
     IExerciseService exerciseService, 
     IObjectiveService objectiveService, 
     IStudentService studentService,
     IStudentAnswerService studentAnswerService,
     IStudentDeviationsService studentDeviationService)
 {
     _answerService = answerService;
     _exerciseService = exerciseService;
     _objectiveService = objectiveService;
     _studentService = studentService;
     _studentAnswerService = studentAnswerService;
     _studentDeviationService = studentDeviationService;
 }
Example #6
0
 public AdminController(ITestService tService, IAnswerService aService, IQuestionService qService)
 {
     testService = tService;
     answerService = aService;
     questionService = qService;
 }
 public QuestionsController(IQuestionService questionService, ISearchService searchService, IUserService userService, IPurgeService purgeService, IAnswerService answerService)
 {
     _logger  = LogManager.GetCurrentClassLogger();
     _service = new QuestionsControllerService(questionService, searchService, userService, purgeService, answerService);
 }
 public AnswersController(IAnswerService _answerService)
 {
     this.AnswerService = _answerService;
 }
Example #9
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="subjectServiceService"></param>
        /// <param name="homeworkService"></param>
        /// <param name="answerService"></param>
        /// <param name="studentService"></param>
        /// <param name="schoolClassService"></param>
        /// <param name="textService"></param>
        /// all neccesery services
        public StudentsController(ISubjectService subjectServiceService, IHomeworkService homeworkService, IAnswerService answerService, IStudentService studentService, ISchoolClassService schoolClassService, ITextService textService, IWordDefinitionService wordDefinitionService)
        {
            _textService           = textService;
            _schoolClassService    = schoolClassService;
            _subjectServiceService = subjectServiceService;
            _homeworkService       = homeworkService;
            _answerService         = answerService;
            _studentService        = studentService;
            _wordDefinitionService = wordDefinitionService;

            foreach (var wordDef in _wordDefinitionService.All())
            {
                dictionary.Add(wordDef.Word, wordDef.Definition);
            }

            dictionary.Add("סירותיהם", "הסירות שלהם, פירוש מעניין..");
            dictionary.Add("נמרצות", "מלא מרץ, מלא חיות, אנרגטי");
            dictionary.Add("עמך", "יחד, בצוותא, בשיתוף; אחד עם השני");
            dictionary.Add("שטה", "מפליגה בים");
            // dictionary.Add("יפהפייה", "מהממת ביופיה");
        }
Example #10
0
        public KnowledgeService(IUnitOfWork UnitOfWork, IMapper Mapper, IKnowledgeToKnowledgeModel KnowledgeToKnowledgeModel, IQuestionService QuestionService, IAnswerService AnswerService)
        {
            this.UnitOfWork = UnitOfWork;
            this.Mapper     = Mapper;
            this.KnowledgeToKnowledgeModel = KnowledgeToKnowledgeModel;


            this.AnswerService   = AnswerService;
            this.QuestionService = QuestionService;
        }
 public EditingController(ITestService testService, IQuestionService questionService, ICategoryService categoryService, IAnswerService answerService)
 {
     this.testService     = testService;
     this.questionService = questionService;
     this.categoryService = categoryService;
     this.answerService   = answerService;
     handler = new Handler();
 }
Example #12
0
 public AnswerController(IAnswerService answerService, IUserService userService, IMapper mapper)
 {
     _userService   = userService ?? throw new ArgumentNullException(nameof(userService));
     _answerService = answerService ?? throw new ArgumentNullException(nameof(answerService));
     _mapper        = mapper ?? throw new ArgumentNullException(nameof(mapper));
 }
        public ApplicationController(IApiClient apiClient, IApplicationApiClient applyApiClient, IQnaApiClient qnaApiClient, IHttpContextAccessor contextAccessor, IAnswerService answerService, IAnswerInjectionService answerInjectionService, ILogger <ApplicationController> logger)
        {
            _apiClient       = apiClient;
            _applyApiClient  = applyApiClient;
            _qnaApiClient    = qnaApiClient;
            _contextAccessor = contextAccessor;

            _answerService          = answerService;
            _answerInjectionService = answerInjectionService;
            _logger = logger;
        }
Example #14
0
 public QaController(IQaService qa, ISubDomainService subDomain, IDomainService domain, IQuestionService question, IAnswerService answer)
 {
     qaService        = qa;
     subDomainService = subDomain;
     domainService    = domain;
     questionService  = question;
     answerService    = answer;
 }
Example #15
0
        //   private readonly ICandidatService _candidatService;

        public TestService(ITestRepository testRepository, IPositionRepository positionRepository, IAnswerService answerService)
        {
            this._testRepository     = testRepository;
            this._positionRepository = positionRepository;
            this._answerService      = answerService;
            //    _candidatService = candidatService;
        }
Example #16
0
 public AnswerController(IAnswerService answerService, ICyberSecurityProvider cyberSecurity)
 {
     _sqlAnswerService = answerService;
     _cyberSecurity    = cyberSecurity;
 }
Example #17
0
 public AnswerController(IAnswerService answerService, IQuestionService questionService)
 {
     _answerService   = answerService;
     _questionService = questionService;
 }
Example #18
0
        public HomeController(ILogger <HomeController> log, IQuestionService questService, IAnswerService answerService, IFacultyService facultyService, UserManager <ApplicationUser> userManager)
        {
            this._logger          = log;
            this._questionService = questService;
            this._answerService   = answerService;
            this._facultyService  = facultyService;
            this._userManager     = userManager;
            var config = new MapperConfiguration(cfg => cfg.CreateMap <QuestionDTO, QuestionShortViewModel>());

            this._mapper = new Mapper(config);
        }
 public AnswersController(IAnswerService service)
 {
     _service = service;
 }
Example #20
0
 public TrendingOverallOpinionViewComponent(IAnswerService answerService)
 {
     _answerService = answerService;
 }
Example #21
0
 public AnswersController(IAnswerService answerService) => _answerService = answerService;
Example #22
0
 public AnswerController(IAnswerService answer)
 {
     _answer = answer;
 }
 public AnswerController(IAnswerService answerService)
 {
     _answerService = answerService ?? throw new ArgumentNullException(nameof(answerService));
 }
Example #24
0
 public AnswersController(IAnswerService Answerserv)
 {
     AnswerService = Answerserv;
 }
Example #25
0
 public QuestionService(IUnitOfWork uow, IQuestionRepository qRepo, IAnswerService ansService)
 {
     this.uow = uow;
     this.questionRepo = qRepo;
     this.answerService = ansService;
 }
 public KnowledgeTestController(IKnowledgeTestService knowledgeTestService, IQueryableRepository <KnowledgeTest> queryableRepository, IQueryableRepository <vwRP_StockCount> totalRowsRepository, IQueryableRepository <Answer> answerQueryableRepository, IAnswerService answerService, IScoreService scoreService)
 {
     _knowledgeTestService      = knowledgeTestService;
     _queryableRepository       = queryableRepository;
     _totalRowsRepository       = totalRowsRepository;
     _answerQueryableRepository = answerQueryableRepository;
     _answerService             = answerService;
     _scoreService = scoreService;
 }
 public AnswerController(IAnswerService service)
 {
     this.answerService = service;
 }
 public AnswerController(IAnswerService answerService)
 {
     this.AnswerService = answerService;
 }
		public AnswerController(IAnswerService answerService)
		{
			_answerService = answerService;
		}
 public RecordService(IApplicationUserService appUserService, IConsultService consultService, IQuestionService questionService, IAnswerService answerService)
 {
     _appUserService  = appUserService;
     _questionService = questionService;
     _consultService  = consultService;
     _answerService   = answerService;
 }
 public AnswersController(IAnswerService answerService, IQuestionGroupService questionGroupService)
 {
     _answerService = answerService;
     _questionGroupService = questionGroupService;
 }
 public QuestionController(IQuestionService questionService, IAnswerService answerService)
 {
     this._questionService = questionService;
     this._answerService   = answerService;
 }
Example #33
0
 public AnswerController(IAnswerService AnswerService)
 {
     _AnswerService = AnswerService;
 }
 public AnswersController(IAnswerService answers)
 {
     this.answers = answers;
 }
Example #35
0
 public async Task PlayGame_VariousPlayerCount(ISessionService sessionService, IPlayerService playerService, IQuestionService questionService, IAnswerService answerService)
 {
     for (var i = 2; i <= 11; i++)
     {
         await PlayGame(sessionService, playerService, questionService, answerService, i);
     }
 }
Example #36
0
        private async Task PlayGame(ISessionService sessionService, IPlayerService playerService, IQuestionService questionService, IAnswerService answerService, int playerAndCardCount)
        {
            var session = await sessionService.Create();

            var players = new List <PlayerDto>();

            session.CardAmount = playerAndCardCount;
            for (var i = 0; i < session.CardAmount; i++)
            {
                var player = await playerService.Create(i.ToString(), session.Id, i == 0);

                players.Add(player);
            }

            await sessionService.Start(session.Id, session.CardAmount);

            var questionIndex = 0;

            foreach (var player in players)
            {
                var questions = new List <string>();
                for (var i = 0; i < session.CardAmount; i++)
                {
                    questions.Add(questionIndex.ToString());
                    questionIndex++;
                }


                await questionService.SubmitQuestions(player.Id, questions);
            }

            await questionService.AssignQuestions(session.Id);

            var answerIndex = 0;

            foreach (var player in players)
            {
                var questions = await questionService.GetQuestionsToAnswer(player.Id);

                Assert.Equal(session.CardAmount, questions.Count);

                await answerService.SubmitAnswers(player.Id, questions.Select(x =>
                {
                    var request = new SubmitAnswerRequest
                    {
                        Answer = x.Content,
                        QuestionId = x.Id
                    };
                    answerIndex++;
                    return(request);
                }).ToList());
            }

            await answerService.AssignAnswersAndQuestions(session.Id);

            var allQuestionAnswerDtos = new List <QuestionAnswerDto>();

            foreach (var player in players)
            {
                var answerQuestions = await answerService.GetQuestionAnswersForPlayer(player.Id);

                Assert.True(answerQuestions.DistinctBy(x => x.Question.AssignedAnswerId).Count() == answerQuestions.Count);
                Assert.True(answerQuestions.DistinctBy(x => x.Answer.Id).Count() == answerQuestions.Count);
                Assert.True(answerQuestions.All(x => answerQuestions.All(y => y.Answer.Id != x.Question.AssignedAnswerId)));
                allQuestionAnswerDtos.AddRange(answerQuestions);
            }

            var question      = allQuestionAnswerDtos.First().Question;
            var readQuestions = new HashSet <Guid> {
                question.Id
            };

            while (true)
            {
                var answer = allQuestionAnswerDtos.First(x => x.Answer.Id == question.AssignedAnswerId);
                Assert.NotEqual(answer.Answer.Content, question.Content);
                question = answer.Question;
                Assert.DoesNotContain(question.Id, readQuestions);

                readQuestions.Add(question.Id);
                if (readQuestions.Count == allQuestionAnswerDtos.Count)
                {
                    break;
                }
            }

            Assert.Equal(session.CardAmount * session.CardAmount, allQuestionAnswerDtos.Select(x => x.Question.AssignedAnswerId).Distinct().Count());
        }
 public HomeController(IMapper mapper, IAnswerService answerService, UserManager <User> userManager)
     : base(mapper, answerService, userManager)
 {
 }
Example #38
0
 public AnswerController(IAnswerService answerService, IUserService userService)
 {
     this.answerService = answerService;
     this.userService = userService;
 }
Example #39
0
 public QuestionService(IAnswerService answerService, ApplicationDbContext context)
 {
     _context           = context;
     this.answerService = answerService;
 }