- Move login and refresh endpoints under a unified /auth route group
- Relocate institution connection logic from /accounts to /institutions
- Implement GET /institutions/{id}/available to fetch real-time Plaid
accounts
- Introduce HttpRequestBuilder utility to streamline integration testing
- Enhance PlaidService with GetAccountsAsync to support account fetching
- Clean up global usings and project structure for better domain
isolation
29 lines
798 B
C#
29 lines
798 B
C#
namespace FiscalOS.API.Tests.Infra;
|
|
|
|
public class TestApi : WebApplicationFactory<Program>
|
|
{
|
|
protected override void ConfigureWebHost(IWebHostBuilder builder)
|
|
{
|
|
base.ConfigureWebHost(builder);
|
|
|
|
builder.ConfigureLogging(static c => c.ClearProviders());
|
|
|
|
builder.ConfigureAppConfiguration(static c =>
|
|
{
|
|
var testConfigPath = Path.Combine(AppContext.BaseDirectory, "appsettings.Test.json");
|
|
c.AddJsonFile(testConfigPath, optional: false);
|
|
});
|
|
|
|
builder.ConfigureTestServices(static c =>
|
|
{
|
|
c.AddSingleton(Options.Create(new AppDbContextOptions()
|
|
{
|
|
DatabaseFilePath = $"{Guid.NewGuid()}.db",
|
|
}));
|
|
|
|
c.AddSingleton(Options.Create(JwtTokenBuilder.DefaultJwtOptions));
|
|
|
|
c.AddSingleton<IKeyRing>(TestKeyRing.From);
|
|
});
|
|
}
|
|
} |