public PackageMetadataClientTests() { var httpClient = new HttpClient(new HttpClientHandler { AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate }); var serviceIndex = new ServiceIndexClient(httpClient, "https://api.nuget.org/v3/index.json"); var urlGeneratorFactory = new UrlGeneratorClientFactory(serviceIndex); _target = new PackageMetadataClient(urlGeneratorFactory, httpClient); }
public ProtocolFixture() { var httpClient = new HttpClient(new HttpClientHandler { AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate, }); ServiceIndexClient = new ServiceIndexClient(httpClient, "https://api.nuget.org/v3/index.json"); ContentClient = new PackageContentClient(httpClient, "https://api.nuget.org/v3-flatcontainer"); MetadataClient = new PackageMetadataClient(httpClient, "https://api.nuget.org/v3/registration3-gz-semver2"); SearchClient = new SearchClient( httpClient, "https://azuresearch-usnc.nuget.org/query", "https://azuresearch-ussc.nuget.org/autocomplete"); }
public PackageMetadataClientTests(ProtocolFixture fixture) { _target = fixture.MetadataClient; }