/// <summary> /// Service's constructor /// </summary> /// <param name="clinetsFactory"></param> /// <param name="elasticSearchGateway"></param> /// <param name="osmGeoJsonPreprocessorExecutor"></param> /// <param name="tagsHelper"></param> /// <param name="osmRepository"></param> /// <param name="pointsOfInterestAdapterFactory"></param> /// <param name="featuresMergeExecutor"></param> /// <param name="latestFileFetcherExecutor"></param> /// <param name="graphHopperGateway"></param> /// <param name="pointsOfInterestFilesCreatorExecutor"></param> /// <param name="elevationDataStorage"></param> /// <param name="itmWgs84MathTransfromFactory"></param> /// <param name="logger"></param> public DatabasesUpdaterService(IClientsFactory clinetsFactory, IElasticSearchGateway elasticSearchGateway, IOsmGeoJsonPreprocessorExecutor osmGeoJsonPreprocessorExecutor, ITagsHelper tagsHelper, IOsmRepository osmRepository, IPointsOfInterestAdapterFactory pointsOfInterestAdapterFactory, IFeaturesMergeExecutor featuresMergeExecutor, IOsmLatestFileFetcherExecutor latestFileFetcherExecutor, IGraphHopperGateway graphHopperGateway, IPointsOfInterestFilesCreatorExecutor pointsOfInterestFilesCreatorExecutor, IElevationDataStorage elevationDataStorage, IItmWgs84MathTransfromFactory itmWgs84MathTransfromFactory, ILogger logger) { _elasticSearchGateway = elasticSearchGateway; _osmGeoJsonPreprocessorExecutor = osmGeoJsonPreprocessorExecutor; _tagsHelper = tagsHelper; _osmRepository = osmRepository; _pointsOfInterestAdapterFactory = pointsOfInterestAdapterFactory; _pointsOfInterestFilesCreatorExecutor = pointsOfInterestFilesCreatorExecutor; _featuresMergeExecutor = featuresMergeExecutor; _latestFileFetcherExecutor = latestFileFetcherExecutor; _graphHopperGateway = graphHopperGateway; _osmGateway = clinetsFactory.CreateNonAuthClient(); _elevationDataStorage = elevationDataStorage; _logger = logger; _mathTransform = itmWgs84MathTransfromFactory.CreateInverse(); }
public void TestInitialize() { _clientsFactory = Substitute.For <IClientsFactory>(); _osmGateway = Substitute.For <INonAuthClient>(); _clientsFactory.CreateNonAuthClient().Returns(_osmGateway); var options = new ConfigurationData(); var optionsProvider = Substitute.For <IOptions <ConfigurationData> >(); optionsProvider.Value.Returns(options); _elasticSearchGateway = Substitute.For <IElasticSearchGateway>(); _osmRepository = Substitute.For <IOsmRepository>(); _geoJsonPreprocessorExecutor = Substitute.For <IOsmGeoJsonPreprocessorExecutor>(); _featuresMergeExecutor = Substitute.For <IFeaturesMergeExecutor>(); _graphHopperGateway = Substitute.For <IGraphHopperGateway>(); _osmLatestFileFetcherExecutor = Substitute.For <IOsmLatestFileFetcherExecutor>(); _pointsOfInterestFilesCreatorExecutor = Substitute.For <IPointsOfInterestFilesCreatorExecutor>(); _pointsOfInterestAdapterFactory = Substitute.For <IPointsOfInterestAdapterFactory>(); _service = new DatabasesUpdaterService(_clientsFactory, _elasticSearchGateway, _geoJsonPreprocessorExecutor, new TagsHelper(optionsProvider), _osmRepository, _pointsOfInterestAdapterFactory, _featuresMergeExecutor, _osmLatestFileFetcherExecutor, _graphHopperGateway, _pointsOfInterestFilesCreatorExecutor, null, Substitute.For <ILogger>()); }
/// <summary> /// Service's constructor /// </summary> /// <param name="clinetsFactory"></param> /// <param name="elasticSearchGateway"></param> /// <param name="osmGeoJsonPreprocessorExecutor"></param> /// <param name="tagsHelper"></param> /// <param name="osmRepository"></param> /// <param name="pointsOfInterestAdapterFactory"></param> /// <param name="featuresMergeExecutor"></param> /// <param name="latestFileFetcherExecutor"></param> /// <param name="graphHopperGateway"></param> /// <param name="pointsOfInterestFilesCreatorExecutor"></param> /// <param name="imagesUrlsStorageExecutor"></param> /// <param name="logger"></param> public DatabasesUpdaterService(IClientsFactory clinetsFactory, IElasticSearchGateway elasticSearchGateway, IOsmGeoJsonPreprocessorExecutor osmGeoJsonPreprocessorExecutor, ITagsHelper tagsHelper, IOsmRepository osmRepository, IPointsOfInterestAdapterFactory pointsOfInterestAdapterFactory, IFeaturesMergeExecutor featuresMergeExecutor, IOsmLatestFileFetcherExecutor latestFileFetcherExecutor, IGraphHopperGateway graphHopperGateway, IPointsOfInterestFilesCreatorExecutor pointsOfInterestFilesCreatorExecutor, IImagesUrlsStorageExecutor imagesUrlsStorageExecutor, ILogger logger) { _elasticSearchGateway = elasticSearchGateway; _osmGeoJsonPreprocessorExecutor = osmGeoJsonPreprocessorExecutor; _tagsHelper = tagsHelper; _osmRepository = osmRepository; _pointsOfInterestAdapterFactory = pointsOfInterestAdapterFactory; _pointsOfInterestFilesCreatorExecutor = pointsOfInterestFilesCreatorExecutor; _featuresMergeExecutor = featuresMergeExecutor; _latestFileFetcherExecutor = latestFileFetcherExecutor; _graphHopperGateway = graphHopperGateway; _osmGateway = clinetsFactory.CreateNonAuthClient(); _imagesUrlsStorageExecutor = imagesUrlsStorageExecutor; _logger = logger; }
public void TestInitialize() { var logger = Substitute.For <ILogger>(); var reportLogger = Substitute.For <ILogger <FeaturesMergeExecutor> >(); var options = Substitute.For <IOptions <ConfigurationData> >(); options.Value.Returns(new ConfigurationData()); _executor = new FeaturesMergeExecutor(options, new GeometryFactory(), reportLogger, logger); }
public void TestInitialize() { _httpGatewayFactory = Substitute.For <IHttpGatewayFactory>(); var options = new ConfigurationData(); var optionsProvider = Substitute.For <IOptions <ConfigurationData> >(); optionsProvider.Value.Returns(options); _elasticSearchGateway = Substitute.For <IElasticSearchGateway>(); _osmRepository = Substitute.For <IOsmRepository>(); _geoJsonPreprocessorExecutor = Substitute.For <IOsmGeoJsonPreprocessorExecutor>(); _featuresMergeExecutor = Substitute.For <IFeaturesMergeExecutor>(); _graphHopperGateway = Substitute.For <IGraphHopperGateway>(); _osmLatestFileFetcherExecutor = Substitute.For <IOsmLatestFileFetcherExecutor>(); _service = new ElasticSearchUpdaterService(_httpGatewayFactory, _elasticSearchGateway, _geoJsonPreprocessorExecutor, new TagsHelper(optionsProvider), _osmRepository, Substitute.For <IPointsOfInterestAdapterFactory>(), _featuresMergeExecutor, _osmLatestFileFetcherExecutor, _graphHopperGateway, Substitute.For <ILogger>()); }
/// <summary> /// Service's constructor /// </summary> /// <param name="factory"></param> /// <param name="elasticSearchGateway"></param> /// <param name="osmGeoJsonPreprocessorExecutor"></param> /// <param name="tagsHelper"></param> /// <param name="osmRepository"></param> /// <param name="pointsOfInterestAdapterFactory"></param> /// <param name="featuresMergeExecutor"></param> /// <param name="latestFileFetcherExecutor"></param> /// <param name="graphHopperGateway"></param> /// <param name="logger"></param> public ElasticSearchUpdaterService(IHttpGatewayFactory factory, IElasticSearchGateway elasticSearchGateway, IOsmGeoJsonPreprocessorExecutor osmGeoJsonPreprocessorExecutor, ITagsHelper tagsHelper, IOsmRepository osmRepository, IPointsOfInterestAdapterFactory pointsOfInterestAdapterFactory, IFeaturesMergeExecutor featuresMergeExecutor, IOsmLatestFileFetcherExecutor latestFileFetcherExecutor, IGraphHopperGateway graphHopperGateway, ILogger logger) { _elasticSearchGateway = elasticSearchGateway; _osmGeoJsonPreprocessorExecutor = osmGeoJsonPreprocessorExecutor; _tagsHelper = tagsHelper; _osmRepository = osmRepository; _pointsOfInterestAdapterFactory = pointsOfInterestAdapterFactory; _logger = logger; _featuresMergeExecutor = featuresMergeExecutor; _latestFileFetcherExecutor = latestFileFetcherExecutor; _graphHopperGateway = graphHopperGateway; _osmGateway = factory.CreateOsmGateway(new TokenAndSecret("", "")); }