public QuestionnaireControllerTests() { #warning hard-coded behaviours of entities in the database repository = new QuestionnaireRepository(null); service = new QuestionnaireService(repository); controller = new QuestionnaireController(service); }
public QuestionnaireViewModel(IQuestionnaireService questionnaireService, QuestionFactory questionFactory, IFrameNavigationService navigationService, IFestivalService festivalService, IOfflineService offlineService, IConfiguration config) { _config = config; _questionnaireService = questionnaireService; _navigationService = navigationService; _questionFactory = questionFactory; _festivalService = festivalService; _offlineService = offlineService; Initialize((int)_navigationService.Parameter); AddedQuestions = new ObservableCollection <Question>(); RemovedQuestions = new ObservableCollection <Question>(); OpenDeleteCheckCommand = new RelayCommand <Question>(DeleteCommandCheck, _ => offlineService.IsOnline, true); AddQuestionCommand = new RelayCommand(AddQuestion, () => SelectedItem != null, true); // DeleteQuestionCommand = new RelayCommand<Question>(DeleteQuestion, _ => offlineService.IsOnline, true); DeleteCommand = new RelayCommand(DeleteQuestion, () => offlineService.IsOnline, true); DeleteQuestionnaireCommand = new RelayCommand(DeleteQuestionnaire, () => offlineService.IsOnline, true); SaveQuestionnaireCommand = new RelayCommand(SaveQuestionnaire, () => offlineService.IsOnline, true); OpenFileWindowCommand = new RelayCommand <Question>(OpenFileWindow, HasAnswers); AddOptionToQuestion = new RelayCommand <Question>(AddOption, _ => offlineService.IsOnline, true); SelectReferenceQuestionCommand = new RelayCommand <ReferenceQuestion>(SelectReferenceQuestion, _ => offlineService.IsOnline, true); SetReferenceQuestionCommand = new RelayCommand <Question>(SetReferenceQuestion, _ => offlineService.IsOnline, true); QuestionList = (CollectionView)CollectionViewSource.GetDefaultView(_allQuestions()); QuestionList.Filter = Filter; }
public ChartController() { employeeService = new EmployeeServer(); questionnaireService = new QuestionnaireServer(); optionService = new OptionServer(); questionService = new QuestionServer(); }
public static QuestionnaireTemplate FillNewQuestionnaireWithAnswers(IQuestionnaireService service, int[] answers, DateTime now, int userId) { GenericError error; QuestionnaireTemplate localizedTemplate = service.GetQuestionnaireTemplate(1, locale, out error, DateTime.Now, userId); Assert.IsTrue(localizedTemplate.QuestionCategories.Count == 7); for (int i = 0; i < localizedTemplate.QuestionCategories.Count; i++) { QuestionCategory q = localizedTemplate.QuestionCategories[i]; q.CategoryQuestion.QuestionAnwer = new QuestionAnwer { Answer = answers[i] }; } localizedTemplate.QuestionCategories.ForEach( cq => cq.Questions.ForEach(q => q.QuestionAnwer = new QuestionAnwer { Answer = 1 })); localizedTemplate.QuestionCategories[5].Questions[3].QuestionAnwer.Answer = -1; service.SubmitAnsweredTemplate(userId, localizedTemplate, now); return(localizedTemplate); }
public HomeController(ILogger <HomeController> logger, IQuestionnaireService QuestionnaireService, IUnitOfWork unitOfWork) { _logger = logger; _QuestionnaireService = QuestionnaireService; _unitOfWork = unitOfWork; }
public DrawController(IQuestionnaireService questionnaireService, IInspectionService inspectionService, IConfiguration configurationService) { _questionnaireService = questionnaireService; _inspectionService = inspectionService; _configurationService = configurationService; }
public QuestionnaireController( IQuestionnaireService questionnaireService, IMapper mapper ) { _questionnaireService = questionnaireService; _mapper = mapper; }
public QuestionController(IQuestionnaireService questionnaireService, IReponseService reponse, IQuestionService quest, ICategorieService categ, IAnalyseService analyse, IUserService user, IEmailService emailService) { _questionnaireService = questionnaireService; reponseService = reponse; questionService = quest; categorieService = categ; analyseService = analyse; userService = user; _emailService = emailService; }
public TiersService( ILimitsService limitsService, ISettingsService settingsService, ITierUpgradeService tierUpgradeService, IQuestionnaireService questionnaireService ) { _limitsService = limitsService; _settingsService = settingsService; _tierUpgradeService = tierUpgradeService; _questionnaireService = questionnaireService; }
public QuestionnaireTests() { // Setup database mocks _dbMock = new Mock <FestispecContext>(); _dbMock.Setup(x => x.Questionnaires) .Returns(MockHelpers.CreateDbSetMock(new ModelMocks().Questionnaires).Object); _dbMock.Setup(x => x.Questions).Returns(MockHelpers.CreateDbSetMock(new ModelMocks().Questions).Object); _dbMock.Setup(x => x.Answers).Returns(MockHelpers.CreateDbSetMock(new ModelMocks().Answers).Object); _dbMock.Setup(x => x.PlannedInspections) .Returns(MockHelpers.CreateDbSetMock(new ModelMocks().PlannedInspections).Object); _dbMock.Setup(x => x.Festivals).Returns(MockHelpers.CreateDbSetMock(new ModelMocks().Festivals).Object); _dbMock.Setup(x => x.Employees).Returns(MockHelpers.CreateDbSetMock(new ModelMocks().Employees).Object); _dbMock.Setup(m => m.SaveChangesAsync()).ReturnsAsync(1); _questionnaireService = new QuestionnaireService(_dbMock.Object, new JsonSyncService <Questionnaire>(_dbMock.Object)); }
public RapportPreviewViewModel( IFrameNavigationService navigationService, IQuestionnaireService questionnaireService, IFestivalService festivalService, IConfiguration config, GraphSelectorFactory graphSelector, IEmployeeService employeeService ) { _questionnaireService = questionnaireService; _navigationService = navigationService; _graphFactory = graphSelector; _config = config; _employeeService = employeeService; SelectedFestival = festivalService.GetFestival((int)navigationService.Parameter); GeneratePdfCommand = new RelayCommand(SavePdf); BackCommand = new RelayCommand(Back); GenerateReport(); }
public FestivalViewModel(IFrameNavigationService navigationService, IFestivalService festivalService, IQuestionnaireService questionnaireService, IInspectionService inspectionService, IOfflineService offlineService) { _festivalService = festivalService; _navigationService = navigationService; _questionnaireService = questionnaireService; _inspectionService = inspectionService; RemoveFestivalCommand = new RelayCommand(OpenDeletePopup, () => offlineService.IsOnline, true); DeleteCommand = new RelayCommand(RemoveFestival, () => offlineService.IsOnline, true); EditFestivalCommand = new RelayCommand(() => _navigationService.NavigateTo("UpdateFestival", Festival.Id), () => offlineService.IsOnline, true); OpenQuestionnaireCommand = new RelayCommand <int>(OpenQuestionnaire); CreateQuestionnaireCommand = new RelayCommand(CreateQuestionnaire, () => offlineService.IsOnline, true); ConfirmDeleteQuestionnaireCommand = new RelayCommand(DeleteQuestionnaire, () => offlineService.IsOnline, true); DeleteQuestionnaireCommand = new RelayCommand <int>(id => _deletetingQuestionnareId = id, _ => offlineService.IsOnline, true); NewQuestionnaireCommand = new RelayCommand(NewQuestionnaire); OpenCopyQuestionnaireCommand = new RelayCommand <int>(OpenCopyQuestionnaire); CloseCopyQuestionnaireCommand = new RelayCommand(CloseCopyQuestionnaire); CopyQuestionnaireCommand = new RelayCommand(CopyQuestionnaire); GenerateReportCommand = new RelayCommand(GenerateReport); EditPlannedInspectionCommand = new RelayCommand <List <PlannedInspection> >(plannedInspections => _navigationService.NavigateTo("Inspection", new { PlannedInspectionId = plannedInspections[0].Id, FestivalId = -1 }), _ => offlineService.IsOnline, true); CreatePlannedInspectionCommand = new RelayCommand( () => _navigationService.NavigateTo("Inspection", new { PlannedInspectionId = -1, FestivalId = Festival.Id }), () => offlineService.IsOnline, true); CanEdit = offlineService.IsOnline; Initialize((int)_navigationService.Parameter); }
public QuestionnaireController(IQuestionnaireService myService) { _myService = myService; }
public QuestionnaireProblemController(IQuestionnaireProblemService newsService, IQuestionnaireService QuestionnaireService, IQuestionnaireAnswerService AnswerService) { this.service = newsService; this.QuestionnaireService = QuestionnaireService; this.AnswerService = AnswerService; }
public QuestionnaireController(IQuestionnaireService questionnaireService) { _questionnaireService = questionnaireService; }
public QuestionnaireRepository(IQuestionnaireService service) { this.service = service; }
public QuestionnaireController(IQuestionnaireService newsService, IQuestionStatisticService Statisticservice) { this.service = newsService; this.Statisticservice = Statisticservice; }
public CompleteQuestionnaire(IQuestionnaireService questionnaireService, IPredictionService predictionService) { _questionnaireService = questionnaireService; _predictionService = predictionService; }
public QuestionsController(IEvidenceService evidenceService, IQuestionnaireService questionnaireService) { _evidenceService = evidenceService; _questionnaireService = questionnaireService; }
public QuestionnaireController(IQuestionnaireService _questionnaireService) { questionnaireService = _questionnaireService; }
public QuestionnaireController(IQuestionnaireService questionnaireService, ITypeMapper typeMapper) { _questionnaireService = questionnaireService; _typeMapper = typeMapper; }
public QuestionnaireController(IQuestionnaireService questionnaireService, IMarkingService markingService) { _questionnaireService = questionnaireService; _markingService = markingService; }
public QuestionnaireController() { questionnaireService = new QuestionnaireServer(); }
public InspectionController(IQuestionnaireService questionnaireService, AnswerFactory answerFactory) { _questionnaireService = questionnaireService; _answerFactory = answerFactory; }
public QuestionnaireController(IQuestionnaireService questionnaireService, IQuestionnaireInteractionService questionnaireInteractionService) { _qService = questionnaireService; _qInteractionService = questionnaireInteractionService; }
public ListQuestionnaireController(IQuestionnaireService questionnaireService, IPdfService pdfService) { _questionnaireService = questionnaireService; _pdfService = pdfService; }