Exemple #1
0
 public async Task NoAddressCountry()
 {
     var address = new SM.Address
     {
         Row1     = "Regeringsgatan 67",
         PostCode = "11156",
     };
     var resultLocation = await _geocodingFunctionality.GeocodeAsync(address);
 }
Exemple #2
0
        public async Task Success()
        {
            _GeocodingClientMock.Setup(mock => mock.GeocodeAsync(It.IsAny <DM.Address>())).ReturnsAsync(CreateResponseOk());
            var address = new SM.Address
            {
                Row1     = "Regeringsgatan 67",
                PostCode = "11156",
                Country  = "Sweden"
            };
            var location = await _geocodingFunctionality.GeocodeAsync(address);

            Assert.IsNotNull(location);
            Assert.IsNotNull(location.Latitude);
            Assert.IsNotNull(location.Longitude);
        }
Exemple #3
0
        public static DM.Address ToStorage(SM.Address source)
        {
            if (source == null)
            {
                return(null);
            }
            var target = new DM.Address
            {
                Row1     = source.Row1,
                Row2     = source.Row2,
                PostCode = source.PostCode,
                PostTown = source.PostTown,
                Country  = source.Country
            };

            return(target);
        }