/// <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>());
        }
Beispiel #3
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;
 }
Beispiel #4
0
 /// <summary>
 /// Controller's constructor
 /// </summary>
 /// <param name="graphHopperGateway"></param>
 /// <param name="osmLatestFileFetcher"></param>
 /// <param name="osmElasticSearchUpdaterService"></param>
 /// <param name="logger"></param>
 public UpdateController(IGraphHopperGateway graphHopperGateway,
                         IOsmLatestFileFetcher osmLatestFileFetcher,
                         IOsmElasticSearchUpdaterService osmElasticSearchUpdaterService,
                         ILogger logger)
 {
     _graphHopperGateway             = graphHopperGateway;
     _osmLatestFileFetcher           = osmLatestFileFetcher;
     _osmElasticSearchUpdaterService = osmElasticSearchUpdaterService;
     _logger = logger;
 }
Beispiel #5
0
 /// <summary>
 /// Controller's constructor
 /// </summary>
 /// <param name="graphHopperGateway"></param>
 /// <param name="elevationDataStorage"></param>
 /// <param name="itmWgs84MathTransfromFactory"></param>
 /// <param name="geometryFactory"></param>
 public RoutingController(IGraphHopperGateway graphHopperGateway,
                          IElevationDataStorage elevationDataStorage,
                          IItmWgs84MathTransfromFactory itmWgs84MathTransfromFactory,
                          GeometryFactory geometryFactory)
 {
     _graphHopperGateway    = graphHopperGateway;
     _elevationDataStorage  = elevationDataStorage;
     _geometryFactory       = geometryFactory;
     _wgs84ItmMathTransform = itmWgs84MathTransfromFactory.CreateInverse();
 }
Beispiel #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);
        }
Beispiel #7
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;
 }
        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("", ""));
 }
Beispiel #10
0
 /// <summary>
 /// Controller's constructor
 /// </summary>
 /// <param name="graphHopperGateway"></param>
 /// <param name="elevationDataStorage"></param>
 public RoutingController(IGraphHopperGateway graphHopperGateway,
                          IElevationDataStorage elevationDataStorage)
 {
     _graphHopperGateway   = graphHopperGateway;
     _elevationDataStorage = elevationDataStorage;
 }
Beispiel #11
0
 public void TestInitialize()
 {
     _graphHopperGateway   = Substitute.For <IGraphHopperGateway>();
     _elevationDataStorage = Substitute.For <IElevationDataStorage>();
     _controller           = new RoutingController(_graphHopperGateway, _elevationDataStorage);
 }
Beispiel #12
0
 public void TestInitialize()
 {
     _graphHopperGateway   = Substitute.For <IGraphHopperGateway>();
     _elevationDataStorage = Substitute.For <IElevationDataStorage>();
     _controller           = new RoutingController(_graphHopperGateway, _elevationDataStorage, new ItmWgs84MathTransfromFactory(), new GeometryFactory());
 }