first commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc.Testing;
|
||||
using Microsoft.AspNetCore.TestHost;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using SequenceAuth.Lib;
|
||||
|
||||
namespace SequenceAuth.Example.Tests;
|
||||
|
||||
public class CustomWebApplicationFactory : WebApplicationFactory<Program>
|
||||
{
|
||||
protected override void ConfigureWebHost(IWebHostBuilder builder)
|
||||
{
|
||||
builder.ConfigureTestServices(services =>
|
||||
{
|
||||
services.RemoveAll<ISequenceStore>();
|
||||
services.AddSingleton<ISequenceStore, InMemorySequenceStore>();
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user