public void TestInitialize()
        {
            _elasticSearchGateway = Substitute.For <IElasticSearchGateway>();
            _options = new ConfigurationData();
            var optionsProvider = Substitute.For <IOptions <ConfigurationData> >();

            optionsProvider.Value.Returns(_options);
            var geometryFactory = GeometryFactory.Default;

            _service = new AddibleGpxLinesFinderService(new GpxLoopsSplitterExecutor(geometryFactory), new GpxProlongerExecutor(geometryFactory), new ItmWgs84MathTransfromFactory(), _elasticSearchGateway, optionsProvider, geometryFactory, Substitute.For <ILogger>());
        }
Beispiel #2
0
 public void TestInitialize()
 {
     _httpGatewayFactory = Substitute.For<IHttpGatewayFactory>();
     _dataContainerConverterService = Substitute.For<IDataContainerConverterService>();
     _elasticSearchGateway = Substitute.For<IElasticSearchGateway>();
     _addibleGpxLinesFinderService = Substitute.For<IAddibleGpxLinesFinderService>();
     _osmLineAdderService = Substitute.For<IOsmLineAdderService>();
     _options = new ConfigurationData();
     var optionsProvider = Substitute.For<IOptions<ConfigurationData>>();
     optionsProvider.Value.Returns(_options);
     _controller = new OsmController(_httpGatewayFactory, _dataContainerConverterService, ItmWgs84MathTransfromFactory.Create(), 
         _elasticSearchGateway, _addibleGpxLinesFinderService, _osmLineAdderService, optionsProvider, GeometryFactory.Default,
         new LruCache<string, TokenAndSecret>(optionsProvider, Substitute.For<ILogger>()));
 }
Beispiel #3
0
 /// <summary>
 /// Controller's constructor
 /// </summary>
 /// <param name="httpGatewayFactory"></param>
 /// <param name="dataContainerConverterService"></param>
 /// <param name="itmWgs84MathTransform"></param>
 /// <param name="elasticSearchGateway"></param>
 /// <param name="addibleGpxLinesFinderService"></param>
 /// <param name="osmLineAdderService"></param>
 /// <param name="options"></param>
 /// <param name="geometryFactory"></param>
 /// <param name="cache"></param>
 public OsmController(IHttpGatewayFactory httpGatewayFactory,
                      IDataContainerConverterService dataContainerConverterService,
                      IMathTransform itmWgs84MathTransform,
                      IElasticSearchGateway elasticSearchGateway,
                      IAddibleGpxLinesFinderService addibleGpxLinesFinderService,
                      IOsmLineAdderService osmLineAdderService,
                      IOptions <ConfigurationData> options,
                      IGeometryFactory geometryFactory,
                      LruCache <string, TokenAndSecret> cache)
 {
     _httpGatewayFactory            = httpGatewayFactory;
     _dataContainerConverterService = dataContainerConverterService;
     _itmWgs84MathTransform         = itmWgs84MathTransform;
     _elasticSearchGateway          = elasticSearchGateway;
     _addibleGpxLinesFinderService  = addibleGpxLinesFinderService;
     _osmLineAdderService           = osmLineAdderService;
     _options         = options.Value;
     _geometryFactory = geometryFactory;
     _cache           = cache;
 }
 /// <summary>
 /// Controller's constructor
 /// </summary>
 /// <param name="clentsFactory"></param>
 /// <param name="dataContainerConverterService"></param>
 /// <param name="itmWgs84MathTransfromFactory"></param>
 /// <param name="elasticSearchGateway"></param>
 /// <param name="addibleGpxLinesFinderService"></param>
 /// <param name="osmLineAdderService"></param>
 /// <param name="options"></param>
 /// <param name="geometryFactory"></param>
 /// <param name="cache"></param>
 public OsmController(IClientsFactory clentsFactory,
                      IDataContainerConverterService dataContainerConverterService,
                      IItmWgs84MathTransfromFactory itmWgs84MathTransfromFactory,
                      IElasticSearchGateway elasticSearchGateway,
                      IAddibleGpxLinesFinderService addibleGpxLinesFinderService,
                      IOsmLineAdderService osmLineAdderService,
                      IOptions <ConfigurationData> options,
                      GeometryFactory geometryFactory,
                      LruCache <string, TokenAndSecret> cache)
 {
     _clentsFactory = clentsFactory;
     _dataContainerConverterService = dataContainerConverterService;
     _itmWgs84MathTransform         = itmWgs84MathTransfromFactory.Create();
     _wgs84ItmMathTransform         = itmWgs84MathTransfromFactory.CreateInverse();
     _elasticSearchGateway          = elasticSearchGateway;
     _addibleGpxLinesFinderService  = addibleGpxLinesFinderService;
     _osmLineAdderService           = osmLineAdderService;
     _options         = options.Value;
     _geometryFactory = geometryFactory;
     _cache           = cache;
 }