Disposing the test fixtures
All checks were successful
Dotnet build and test / build (push) Successful in 6m49s
All checks were successful
Dotnet build and test / build (push) Successful in 6m49s
This commit is contained in:
parent
5b6d2e82db
commit
243c0f2780
5 changed files with 26 additions and 28 deletions
|
|
@ -14,15 +14,10 @@ namespace Yavsc.Blogs.Tests;
|
|||
|
||||
[Collection("JwtClaimMapping")]
|
||||
public sealed class BlogApiMappedClaimsTests :
|
||||
IClassFixture<MappedClaimsBlogsWebServerFixture>,
|
||||
IBackendFixture
|
||||
IClassFixture<MappedClaimsBlogsWebServerFixture>
|
||||
{
|
||||
private readonly MappedClaimsBlogsWebServerFixture _fixture;
|
||||
|
||||
public IReadOnlyList<string> Addresses => throw new NotImplementedException();
|
||||
|
||||
public IServiceProvider Services => throw new NotImplementedException();
|
||||
|
||||
public BlogApiMappedClaimsTests(MappedClaimsBlogsWebServerFixture fixture)
|
||||
{
|
||||
_fixture = fixture;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public sealed class MappedClaimsBlogsWebServerFixture : IDisposable, IBackendFix
|
|||
{
|
||||
private readonly InMemoryDatabaseRoot _inMemoryRoot = new();
|
||||
private readonly Dictionary<string, string> _savedInboundMap;
|
||||
private readonly WebApplication _app;
|
||||
private WebApplication? _app = null;
|
||||
|
||||
public MappedClaimsBlogsWebServerFixture()
|
||||
{
|
||||
|
|
@ -86,6 +86,7 @@ public sealed class MappedClaimsBlogsWebServerFixture : IDisposable, IBackendFix
|
|||
|
||||
public void Dispose()
|
||||
{
|
||||
if (_app is null) return;
|
||||
_app.StopAsync().GetAwaiter().GetResult();
|
||||
_app.DisposeAsync().AsTask().GetAwaiter().GetResult();
|
||||
|
||||
|
|
@ -96,6 +97,7 @@ public sealed class MappedClaimsBlogsWebServerFixture : IDisposable, IBackendFix
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private sealed class NoopFileSystemAuthManager : IFileSystemAuthManager
|
||||
{
|
||||
public FileAccessRight GetFilePathAccess(System.Security.Claims.ClaimsPrincipal user, string fileRelativePath)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue