/// <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();
 }
        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>());
        }
Example #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;
 }
Example #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;
 }
Example #6
0
        public void TestInitialize()
        {
            _graphHopperGateway          = Substitute.For <IGraphHopperGateway>();
            _elasticSearchGateway        = Substitute.For <IElasticSearchGateway>();
            _osmRepository               = Substitute.For <IOsmRepository>();
            _geoJsonPreprocessorExecutor = Substitute.For <IOsmGeoJsonPreprocessorExecutor>();
            var logger = Substitute.For <ILogger>();

            _updateController = new UpdateController(_graphHopperGateway, _elasticSearchGateway, _geoJsonPreprocessorExecutor, _osmRepository, new List <IPointsOfInterestAdapter>(), logger);
        }
Example #7
0
 public void TestInitialize()
 {
     _elasticSearchGateway           = Substitute.For <IElasticSearchGateway>();
     _elevationDataStorage           = Substitute.For <IElevationDataStorage>();
     _httpGatewayFactory             = Substitute.For <IHttpGatewayFactory>();
     _tagsHelper                     = new TagsHelper(new OptionsWrapper <ConfigurationData>(new ConfigurationData()));
     _osmGeoJsonPreprocessorExecutor = new OsmGeoJsonPreprocessorExecutor(Substitute.For <ILogger>(), new OsmGeoJsonConverter(), _tagsHelper);
     _osmRepository                  = Substitute.For <IOsmRepository>();
     _dataContainerConverterService  = Substitute.For <IDataContainerConverterService>();
     _adapter = new OsmPointsOfInterestAdapter(_elasticSearchGateway, _elevationDataStorage, _httpGatewayFactory, _osmGeoJsonPreprocessorExecutor, _osmRepository, _dataContainerConverterService, _tagsHelper);
 }
 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>());
 }
Example #9
0
 /// <inheritdoc />
 public OsmPointsOfInterestAdapter(IElasticSearchGateway elasticSearchGateway,
                                   IElevationDataStorage elevationDataStorage,
                                   IHttpGatewayFactory httpGatewayFactory,
                                   IOsmGeoJsonPreprocessorExecutor osmGeoJsonPreprocessorExecutor,
                                   IOsmRepository osmRepository,
                                   ITagsHelper tagsHelper) : base(elevationDataStorage, elasticSearchGateway)
 {
     _elasticSearchGateway           = elasticSearchGateway;
     _httpGatewayFactory             = httpGatewayFactory;
     _osmGeoJsonPreprocessorExecutor = osmGeoJsonPreprocessorExecutor;
     _osmRepository = osmRepository;
     _tagsHelper    = tagsHelper;
 }
Example #10
0
 /// <summary>
 /// Controller's constructor
 /// </summary>
 /// <param name="graphHopperGateway"></param>
 /// <param name="elasticSearchGateway"></param>
 /// <param name="osmGeoJsonPreprocessorExecutor"></param>
 /// <param name="osmRepository"></param>
 /// <param name="adapters"></param>
 /// <param name="logger"></param>
 public UpdateController(IGraphHopperGateway graphHopperGateway,
                         IElasticSearchGateway elasticSearchGateway,
                         IOsmGeoJsonPreprocessorExecutor osmGeoJsonPreprocessorExecutor,
                         IOsmRepository osmRepository,
                         IEnumerable <IPointsOfInterestAdapter> adapters,
                         ILogger logger)
 {
     _graphHopperGateway             = graphHopperGateway;
     _elasticSearchGateway           = elasticSearchGateway;
     _osmGeoJsonPreprocessorExecutor = osmGeoJsonPreprocessorExecutor;
     _osmRepository = osmRepository;
     _adapters      = adapters;
     _logger        = logger;
 }
 /// <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="adapters"></param>
 /// <param name="logger"></param>
 public OsmElasticSearchUpdaterService(IHttpGatewayFactory factory,
                                       IElasticSearchGateway elasticSearchGateway,
                                       IOsmGeoJsonPreprocessorExecutor osmGeoJsonPreprocessorExecutor,
                                       ITagsHelper tagsHelper, IOsmRepository osmRepository,
                                       IEnumerable <IPointsOfInterestAdapter> adapters,
                                       ILogger logger)
 {
     _elasticSearchGateway           = elasticSearchGateway;
     _osmGeoJsonPreprocessorExecutor = osmGeoJsonPreprocessorExecutor;
     _tagsHelper    = tagsHelper;
     _osmRepository = osmRepository;
     _adapters      = adapters;
     _logger        = logger;
     _osmGateway    = factory.CreateOsmGateway(new TokenAndSecret("", ""));
 }
        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>());
        }
 public void TestInitialize()
 {
     _graphHopperHelper = Substitute.For<IGraphHopperHelper>();
     _remoteFileFetcherGateway = Substitute.For<IRemoteFileFetcherGateway>();
     var factory = Substitute.For<IHttpGatewayFactory>();
     factory.CreateRemoteFileFetcherGateway(Arg.Any<TokenAndSecret>()).Returns(_remoteFileFetcherGateway);
     _remoteFileSizeFetcherGateway = Substitute.For<IRemoteFileSizeFetcherGateway>();
     _fileSystemHelper = Substitute.For<IFileSystemHelper>();
     _elasticSearchGateway = Substitute.For<IElasticSearchGateway>();
     _elasticSearchHelper = Substitute.For<INssmHelper>();
     _osmRepository = Substitute.For<IOsmRepository>();
     _osmGeoJsonPreprocessor = Substitute.For<IOsmGeoJsonPreprocessor>();
     _osmDataService = new OsmDataService(_graphHopperHelper, factory, _remoteFileSizeFetcherGateway, _fileSystemHelper,
         _elasticSearchGateway, _elasticSearchHelper, _osmRepository, _osmGeoJsonPreprocessor, Substitute.For<ILogger>());
 }
Example #14
0
 public OsmDataService(IGraphHopperHelper graphHopperHelper,
     IHttpGatewayFactory httpGatewayFactory,
     IRemoteFileSizeFetcherGateway remoteFileSizeFetcherGateway,
     IFileSystemHelper fileSystemHelper,
     IElasticSearchGateway elasticSearchGateway,
     INssmHelper elasticSearchHelper,
     IOsmRepository osmRepository,
     IOsmGeoJsonPreprocessor osmGeoJsonPreprocessor,
     ILogger logger)
 {
     _graphHopperHelper = graphHopperHelper;
     _httpGatewayFactory = httpGatewayFactory;
     _remoteFileSizeFetcherGateway = remoteFileSizeFetcherGateway;
     _fileSystemHelper = fileSystemHelper;
     _elasticSearchGateway = elasticSearchGateway;
     _elasticSearchHelper = elasticSearchHelper;
     _osmRepository = osmRepository;
     _osmGeoJsonPreprocessor = osmGeoJsonPreprocessor;
     _logger = logger;
 }
 /// <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("", ""));
 }