private static (FileUri service, TestPool <byte> pool) CreateTestService(MockHttpClientTransport transport) { var options = new PipelineOptions(); var pool = new TestPool <byte>(); if (transport.Responses.Count == 0) { transport.Responses.Add(HttpStatusCode.GatewayTimeout); transport.Responses.Add(HttpStatusCode.OK); } options.Transport = transport; options.Pool = pool; var service = new FileUri(baseUri, options); return(service, pool); }
private static (ConfigurationClient service, TestPool <byte> pool) CreateTestService(MockHttpClientTransport transport) { var options = new PipelineOptions(); var testPool = new TestPool <byte>(); options.Pool = testPool; options.Transport = transport; options.Logger = new MockLogger(); var service = new ConfigurationClient(connectionString, options); return(service, testPool); }
private static (ConfigurationClient service, TestPool <byte> pool) CreateTestService(MockHttpClientTransport transport) { HttpPipelineOptions options = ConfigurationClient.CreateDefaultPipelineOptions(); var testPool = new TestPool <byte>(); options.AddService(testPool, typeof(ArrayPool <byte>)); options.Transport = transport; var service = new ConfigurationClient(connectionString, options); return(service, testPool); }