public async Task CustomServiceProviderReplacesApplicationServices() { var server = new TestServer(TestServer.CreateBuilder().UseStartup <CustomContainerStartup>()); string result = await server.CreateClient().GetStringAsync("/path"); Assert.Equal("ApplicationServicesEqual:True", result); }
public async Task CanCreateViaStartupType() { TestServer server = new TestServer(TestServer.CreateBuilder().UseStartup <TestStartup>()); HttpResponseMessage result = await server.CreateClient().GetAsync("/"); Assert.Equal(HttpStatusCode.OK, result.StatusCode); Assert.Equal("FoundService:True", await result.Content.ReadAsStringAsync()); }