public void Init(string testName) { TestName = testName; QueryServiceMock queryService = new QueryServiceMock(); WoxContextServiceMock woxContextService = new WoxContextServiceMock(queryService); var constantProvider = new ConstantProvider <ScalarFloat, float>(); IUnitService <ScalarFloat, float> unitService = new UnitService <ScalarFloat, float>(constantProvider); SystemServiceMock systemService = new SystemServiceMock(); IDataAccessConfigurationService dataAccessConfigurationService = new DataAccessConfigurationService(systemService); IDataAccessService dataAccessService = new DataAccessService(dataAccessConfigurationService); IPrefixDefinitionRepository prefixDefinitionRepository = new PrefixDefinitionRepository(dataAccessService); IUnitDefinitionRepository unitDefinitionRepository = new UnitDefinitionRepository(dataAccessService); IFileGeneratorService fileGeneratorService = new FileGeneratorServiceMock(); IFileReaderService fileReaderService = new FileReaderServiceMock(); IUnitConversionService unitConversionService = new UnitConversionService(unitService, dataAccessService, prefixDefinitionRepository, unitDefinitionRepository, fileGeneratorService, fileReaderService); WoxUnitResultFinder woxUnitResultFinder = new WoxUnitResultFinder(woxContextService, unitConversionService, systemService); systemService.ApplicationDataPath = TestPath; dataAccessService.Init(); woxUnitResultFinder.Init(); WoxContextService = woxContextService; QueryService = queryService; WoxUnitResultFinder = woxUnitResultFinder; SystemService = systemService; WoxContextService.AddQueryFetcher("unit", WoxUnitResultFinder); }
public void Init(string testName) { TestName = testName; QueryServiceMock queryService = new QueryServiceMock(); WoxContextServiceMock woxContextService = new WoxContextServiceMock(queryService); SystemWebAppServiceMock systemService = new SystemWebAppServiceMock(); IDataAccessService dataAccessService = new DataAccessService(systemService); IWebAppItemRepository webAppItemRepository = new WebAppItemRepository(dataAccessService); IWebAppConfigurationRepository webAppConfigurationRepository = new WebAppConfigurationRepository(dataAccessService); FileGeneratorServiceMock fileGeneratorService = new FileGeneratorServiceMock(); FileReaderServiceMock fileReaderService = new FileReaderServiceMock(); IHelperService helperService = new HelperService(); ApplicationInformationServiceMock applicationInformationService = new ApplicationInformationServiceMock(); IWebAppService webAppService = new WebAppService(dataAccessService, webAppItemRepository, webAppConfigurationRepository, systemService, fileGeneratorService, fileReaderService, helperService); IWoxResultFinder woxWebAppResultFinder = new WebAppResultFinder(woxContextService, webAppService, helperService, applicationInformationService, systemService); systemService.ApplicationDataPath = GetApplicationDataPath(); WoxContextService = woxContextService; QueryService = queryService; SystemService = systemService; WebAppService = webAppService; FileGeneratorService = fileGeneratorService; FileReaderService = fileReaderService; WoxWebAppResultFinder = woxWebAppResultFinder; HelperService = helperService; ApplicationInformationService = applicationInformationService; WoxContextService.AddQueryFetcher("wap", WoxWebAppResultFinder); }
public void Init(PluginInitContext context) { WoxContextService = new WoxContextService(context); QueryService = new QueryService(); ResultService = new ResultService(WoxContextService); WoxResultFinder = PrepareContext(); WoxResultFinder.Init(); }
public void Init(string testName) { TestName = testName; QueryServiceMock queryService = new QueryServiceMock(); WoxContextServiceMock woxContextService = new WoxContextServiceMock(queryService); SystemServiceMock systemService = new SystemServiceMock(); WorkspacerSystemServiceMock workspacerSystemService = new WorkspacerSystemServiceMock(systemService); IDataAccessService dataAccessService = new DataAccessService(workspacerSystemService); IWorkspacerConfigurationRepository workspacerConfigurationRepository = new WorkspacerConfigurationRepository(dataAccessService); IWorkspacerRepoRepository workspacerRepoRepository = new WorkspacerRepoRepository(dataAccessService); IWorkspacerService workspacerService = new WorkspacerService(dataAccessService, workspacerConfigurationRepository, workspacerRepoRepository, systemService, workspacerSystemService); WorkspacerResultFinder workspacerResultFinder = new WorkspacerResultFinder(woxContextService, workspacerService); systemService.ApplicationDataPath = GetApplicationDataPath(); WoxContextService = woxContextService; QueryService = queryService; SystemService = systemService; WorkspacerSystemService = workspacerSystemService; WorkspacerService = workspacerService; WoxResultFinder = workspacerResultFinder; WoxContextService.AddQueryFetcher("work", WoxResultFinder); }