public void GuideStarCharityCheckResourceWorks() { var charitycheck = CharityCheckResource.GetOrganization("13-1837418"); var result = JsonDocument.Parse(charitycheck); result.RootElement.TryGetProperty("code", out var response); Assert.True(response.TryGetInt32(out int code)); Assert.True(code == 200); }
public async void GetOrganizationAsync_Works() { var charitycheck = await CharityCheckResource.GetOrganizationAsync("13-1837418"); var result = JsonDocument.Parse(charitycheck); result.RootElement.TryGetProperty("code", out var response); Assert.True(response.TryGetInt32(out int code)); Assert.True(code == 200); Assert.NotNull(charitycheck); Assert.Contains("charity", charitycheck); }
public async Task <string> Check(string ein) { return(await CharityCheckResource.GetOrganizationAsync(ein)); }