public void ShouldReturnResourcesIds() { CkanClient client = CkanApiHelper.GetCkanClient(); var parameters = new ResourceSearchParameters(); parameters.Description = "city"; var response = client.SearchResources <string>(parameters); Assert.NotEmpty(response.Results); }
public void ShouldReturnResourcesWithLimitAndOffset() { CkanClient client = CkanApiHelper.GetCkanClient(); var parameters = new ResourceSearchParameters(); parameters.Limit = 1; parameters.Offset = 1; parameters.Description = "city"; var response = client.SearchResources <Resource>(parameters); Assert.True(response.Results.Count == 1); }
public void ShouldReturnResourcesByDescription() { CkanClient client = CkanApiHelper.GetCkanClient(); var parameters = new ResourceSearchParameters(); parameters.Description = "city"; var response = client.SearchResources <Resource>(parameters); Assert.NotEmpty(response.Results); Assert.Contains("city", response.Results[0].Description, StringComparison.InvariantCultureIgnoreCase); }
public void ShouldReturnResourcesByFormat() { CkanClient client = CkanApiHelper.GetCkanClient(); var parameters = new ResourceSearchParameters(); parameters.Format = "kml"; var response = client.SearchResources <Resource>(parameters); Assert.NotEmpty(response.Results); foreach (var result in response.Results) { Assert.Contains("kml", result.Format, StringComparison.InvariantCultureIgnoreCase); } }