/// <summary>
 /// Class constructor
 /// </summary>
 /// <param name="elasticSearchGateway"></param>
 /// <param name="elevationDataStorage"></param>
 /// <param name="clentsFactory"></param>
 /// <param name="osmGeoJsonPreprocessorExecutor"></param>
 /// <param name="osmRepository"></param>
 /// <param name="dataContainerConverterService"></param>
 /// <param name="wikipediaGateway"></param>
 /// <param name="itmWgs84MathTransfromFactory"></param>
 /// <param name="latestFileFetcherExecutor"></param>
 /// <param name="tagsHelper"></param>
 /// <param name="options"></param>
 /// <param name="logger"></param>
 public OsmPointsOfInterestAdapter(IElasticSearchGateway elasticSearchGateway,
                                   IElevationDataStorage elevationDataStorage,
                                   IClientsFactory clentsFactory,
                                   IOsmGeoJsonPreprocessorExecutor osmGeoJsonPreprocessorExecutor,
                                   IOsmRepository osmRepository,
                                   IDataContainerConverterService dataContainerConverterService,
                                   IWikipediaGateway wikipediaGateway,
                                   IItmWgs84MathTransfromFactory itmWgs84MathTransfromFactory,
                                   IOsmLatestFileFetcherExecutor latestFileFetcherExecutor,
                                   ITagsHelper tagsHelper,
                                   IOptions <ConfigurationData> options,
                                   ILogger logger) :
     base(dataContainerConverterService,
          logger)
 {
     _clientsFactory = clentsFactory;
     _osmGeoJsonPreprocessorExecutor = osmGeoJsonPreprocessorExecutor;
     _osmRepository             = osmRepository;
     _wikipediaGateway          = wikipediaGateway;
     _tagsHelper                = tagsHelper;
     _latestFileFetcherExecutor = latestFileFetcherExecutor;
     _elevationDataStorage      = elevationDataStorage;
     _wgs84ItmMathTransform     = itmWgs84MathTransfromFactory.CreateInverse();
     _options = options.Value;
     _elasticSearchGateway = elasticSearchGateway;
 }
 /// <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();
 }
Пример #3
0
        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>());
        }
Пример #4
0
 /// <summary>
 /// Class constructor
 /// </summary>
 /// <param name="elasticSearchGateway"></param>
 /// <param name="elevationDataStorage"></param>
 /// <param name="httpGatewayFactory"></param>
 /// <param name="osmGeoJsonPreprocessorExecutor"></param>
 /// <param name="osmRepository"></param>
 /// <param name="dataContainerConverterService"></param>
 /// <param name="wikipediaGateway"></param>
 /// <param name="itmWgs84MathTransfromFactory"></param>
 /// <param name="latestFileFetcherExecutor"></param>
 /// <param name="tagsHelper"></param>
 /// <param name="options"></param>
 /// <param name="logger"></param>
 public OsmPointsOfInterestAdapter(IElasticSearchGateway elasticSearchGateway,
                                   IElevationDataStorage elevationDataStorage,
                                   IHttpGatewayFactory httpGatewayFactory,
                                   IOsmGeoJsonPreprocessorExecutor osmGeoJsonPreprocessorExecutor,
                                   IOsmRepository osmRepository,
                                   IDataContainerConverterService dataContainerConverterService,
                                   IWikipediaGateway wikipediaGateway,
                                   IItmWgs84MathTransfromFactory itmWgs84MathTransfromFactory,
                                   IOsmLatestFileFetcherExecutor latestFileFetcherExecutor,
                                   ITagsHelper tagsHelper,
                                   IOptions <ConfigurationData> options,
                                   ILogger logger) :
     base(elevationDataStorage,
          elasticSearchGateway,
          dataContainerConverterService,
          itmWgs84MathTransfromFactory,
          options,
          logger)
 {
     _httpGatewayFactory             = httpGatewayFactory;
     _osmGeoJsonPreprocessorExecutor = osmGeoJsonPreprocessorExecutor;
     _osmRepository             = osmRepository;
     _wikipediaGateway          = wikipediaGateway;
     _tagsHelper                = tagsHelper;
     _latestFileFetcherExecutor = latestFileFetcherExecutor;
 }
Пример #5
0
 /// <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;
 }
Пример #6
0
        public void TestInitialize()
        {
            _osmLatestFileFetcherExecutor = Substitute.For <IOsmLatestFileFetcherExecutor>();
            var logger = Substitute.For <ILogger>();

            _databasesUpdaterService = Substitute.For <IDatabasesUpdaterService>();
            _controller = new UpdateController(_osmLatestFileFetcherExecutor, _databasesUpdaterService, logger);
        }
Пример #7
0
 /// <summary>
 /// Controller's constructor
 /// </summary>
 /// <param name="osmLatestFileFetcherExecutor"></param>
 /// <param name="elasticSearchUpdaterService"></param>
 /// <param name="logger"></param>
 public UpdateController(
     IOsmLatestFileFetcherExecutor osmLatestFileFetcherExecutor,
     IElasticSearchUpdaterService elasticSearchUpdaterService,
     ILogger logger)
 {
     _osmLatestFileFetcherExecutor = osmLatestFileFetcherExecutor;
     _elasticSearchUpdaterService  = elasticSearchUpdaterService;
     _logger = logger;
 }
Пример #8
0
 /// <summary>
 /// Controller's constructor
 /// </summary>
 /// <param name="osmLatestFileFetcherExecutor"></param>
 /// <param name="databasesUpdaterService"></param>
 /// <param name="logger"></param>
 public UpdateController(
     IOsmLatestFileFetcherExecutor osmLatestFileFetcherExecutor,
     IDatabasesUpdaterService databasesUpdaterService,
     ILogger logger)
 {
     _osmLatestFileFetcherExecutor = osmLatestFileFetcherExecutor;
     _databasesUpdaterService      = databasesUpdaterService;
     _logger = logger;
 }
 public void TestInitialize()
 {
     InitializeSubstitues();
     _httpGatewayFactory             = Substitute.For <IHttpGatewayFactory>();
     _tagsHelper                     = new TagsHelper(_options);
     _osmGeoJsonPreprocessorExecutor = new OsmGeoJsonPreprocessorExecutor(Substitute.For <ILogger>(), new OsmGeoJsonConverter(), _tagsHelper);
     _osmRepository                  = Substitute.For <IOsmRepository>();
     _wikipediaGateway               = Substitute.For <IWikipediaGateway>();
     _latestFileFetcherExecutor      = Substitute.For <IOsmLatestFileFetcherExecutor>();
     _adapter = new OsmPointsOfInterestAdapter(_elasticSearchGateway, _elevationDataStorage, _httpGatewayFactory, _osmGeoJsonPreprocessorExecutor, _osmRepository, _dataContainerConverterService, _wikipediaGateway, _itmWgs84MathTransfromFactory, _latestFileFetcherExecutor, _tagsHelper, _options, Substitute.For <ILogger>());
 }
Пример #10
0
        public void TestInitialize()
        {
            _fileSystemHelper             = Substitute.For <IFileSystemHelper>();
            _processHelper                = Substitute.For <IProcessHelper>();
            _fileProvider                 = Substitute.For <IFileProvider>();
            _remoteFileSizeFetcherGateway = Substitute.For <IRemoteFileSizeFetcherGateway>();
            var options = Substitute.For <IOptions <ConfigurationData> >();

            options.Value.Returns(new ConfigurationData());
            _fetcher = new OsmLatestFileFetcherExecutor(_fileSystemHelper, _processHelper, _fileProvider, options, _remoteFileSizeFetcherGateway, Substitute.For <ILogger>());
        }
        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>());
        }
Пример #12
0
 /// <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("", ""));
 }