Пример #1
0
        public async Task CanSuggest()
        {
            var gateway = new GeocodeGateway(new ServiceStackSerializer());
            var suggest = new SuggestGeocode("/World/GeocodeServer/".AsEndpoint())
            {
                Text = "100 Willis Street, Wellington"
            };
            var response = await gateway.Suggest(suggest);

            Assert.Null(response.Error);
            Assert.NotNull(response.Suggestions);
            Assert.True(response.Suggestions.Any());
            var result = response.Suggestions.First();
            Assert.True(!string.IsNullOrWhiteSpace(result.Text));
        }
Пример #2
0
 public Task<SuggestGeocodeResponse> Suggest(SuggestGeocode suggestGeocode)
 {
     return Get<SuggestGeocodeResponse, SuggestGeocode>(suggestGeocode);
 }