public async Task CanSuggest(string rootUrl, string relativeUrl, string text) { var gateway = new PortalGateway(rootUrl); var suggest = new SuggestGeocode(relativeUrl.AsEndpoint()) { Text = text }; 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)); }
public async Task CanSuggest(string rootUrl, string relativeUrl, string text) { var gateway = new PortalGateway(rootUrl); var suggest = new SuggestGeocode(relativeUrl) { Text = text }; var response = await IntegrationTestFixture.TestPolicy.ExecuteAsync(() => { return(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)); }