Last active
June 6, 2017 19:57
-
-
Save zbartl/683c53d6a0e138d7acbe9a130b16dcd9 to your computer and use it in GitHub Desktop.
aspnetcore integration test - fixture
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TestServerFixture | |
{ | |
public TestServer Server { get; private set; } | |
public HttpClient Client { get; private set; } | |
public TestServerFixture() | |
{ | |
var builder = new WebHostBuilder() | |
.UseStartup(typeof(Startup)); | |
Server = new TestServer(builder); | |
Client = Server.CreateClient(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment