Closed pietersap closed 5 years ago
Similar to #99 , test server should be initialized once for all tests using an XUnit fixture, instead of creating it in the test constructor
public ProblemJsonTest() { if (_httpClient != null) { return; } var srv = new TestServer(new WebHostBuilder() .UseEnvironment("Development") .UseStartup<Startup>()); _httpClient = srv.CreateClient(); }
Similar to #99 , test server should be initialized once for all tests using an XUnit fixture, instead of creating it in the test constructor