public async Task NoAddressCountry() { var address = new SM.Address { Row1 = "Regeringsgatan 67", PostCode = "11156", }; var resultLocation = await _geocodingFunctionality.GeocodeAsync(address); }
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); }
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); }