Created
October 13, 2017 19:52
-
-
Save scottsauber/b31c823032484f2ede7870a138c3f95a to your computer and use it in GitHub Desktop.
Just the constructor
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 ApplicationUsersControllerGetApplicationUser | |
{ | |
private readonly ApplicationDbContext _context; | |
private readonly HttpClient _client; | |
public ApplicationUsersControllerGetApplicationUser() | |
{ | |
var builder = new WebHostBuilder() | |
.UseEnvironment("Testing") | |
.UseStartup<Startup>(); | |
var server = new TestServer(builder); | |
_context = server.Host.Services.GetService(typeof(ApplicationDbContext)) as ApplicationDbContext; | |
_client = server.CreateClient(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment