Exemplo n.º 1
0
        public void GetPointOfInterestById_ShouldGetIt()
        {
            var poiId             = "42";
            var language          = "en";
            var featureCollection = new FeatureCollection
            {
                Features = { GetValidFeature(poiId, _adapter.Source) }
            };

            _nakebGateway.GetById(42).Returns(featureCollection);

            var results = _adapter.GetPointOfInterestById(poiId, language).Result;

            Assert.IsNotNull(results);
            Assert.IsNotNull(results.SourceImageUrl);
            Assert.IsFalse(results.IsEditable);
            _elevationDataStorage.Received().GetElevation(Arg.Any <Coordinate>());
            _elasticSearchGateway.Received().GetRating(poiId, Arg.Any <string>());
        }
Exemplo n.º 2
0
        public void GetPointOfInterestById_ShouldGetIt()
        {
            var poiId             = "42";
            var language          = "en";
            var featureCollection = new FeatureCollection
            {
                Features = { GetValidFeature(poiId, _adapter.Source) }
            };

            _dataContainerConverterService.ToDataContainer(Arg.Any <byte[]>(), Arg.Any <string>()).Returns(new DataContainer {
                Routes = new List <RouteData>()
            });
            _nakebGateway.GetById("42").Returns(featureCollection);

            var results = _adapter.GetPointOfInterestById(poiId, language).Result;

            Assert.IsNotNull(results);
            Assert.AreEqual(0, results.References.Length);
            Assert.IsFalse(results.IsEditable);
            _elevationDataStorage.Received().GetElevation(Arg.Any <Coordinate>());
            _elasticSearchGateway.Received().GetRating(poiId, Arg.Any <string>());
        }