Compose coherent Overview snapshots and preserve access ordering

This commit is contained in:
Steffen committed 2026-10-14 12:06:52 +02:00
1 parent cab10c5306
commit cc7f87105d
16 files changed
+38314 -5

No files matched your search

@@ -22,6 +22,7 @@ public class PatientApiFixture : IAsyncLifetime
public HttpClient Client {get;private set;}=null!;
public HttpClient RawClient {get;private set;}=null!;
public AuthenticatedTestClient Authentication {get;}=new();
public Action<IServiceCollection>? ConfigureServices {get;set;}
public Dictionary<string,string?> AdditionalGatewayConfiguration {get;}=new();
public async Task InitializeAsync()
{
@@ -50,7 +51,7 @@ public class PatientApiFixture : IAsyncLifetime
host=new WebApplicationFactory<HealthApp.Program>().WithWebHostBuilder(b=>{
b.UseEnvironment("Development");b.ConfigureKestrel(k=>k.Listen(IPAddress.Loopback,0));
b.ConfigureAppConfiguration((_,c)=>c.AddInMemoryCollection(Authentication.Configuration()).AddInMemoryCollection(AdditionalGatewayConfiguration).AddInMemoryCollection(new Dictionary<string,string?>{["ConnectionStrings:HealthDatabase"]=RuntimeConnectionString}));
b.ConfigureServices(s=>s.PostConfigure<BearerTokenOptions>("Bearer",o=>o.TimeProvider=Authentication.Clock));
b.ConfigureServices(s=>{s.PostConfigure<BearerTokenOptions>("Bearer",o=>o.TimeProvider=Authentication.Clock);ConfigureServices?.Invoke(s);});
});
host.UseKestrel(0);RawClient=host.CreateClient();Client=Authentication.Wrap(RawClient);
}