Skip to content

Instantly share code, notes, and snippets.

@Adolfi

Adolfi/tests2.cs Secret

Last active March 28, 2022 08:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Adolfi/5b75a61f0b9b2fed57a6e78cc33e0dbf to your computer and use it in GitHub Desktop.
Save Adolfi/5b75a61f0b9b2fed57a6e78cc33e0dbf to your computer and use it in GitHub Desktop.
public class Tests
{
private WebApplicationFactory<Program> factory;
[SetUp]
public void Setup()
{
this.factory = new WebApplicationFactory<Program>().WithWebHostBuilder(builder =>
{
builder.ConfigureTestServices(services =>
{
services.AddScoped<IEmailService, FakeEmailService>();
});
});
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment