Publish curated Knowledge Hub source from 2ed833f290b439a7bc91e5fd19b042c269e3bee9
This commit is contained in:
1 parent
10f2edcd29
commit
59f15b2d08
218 files changed
+23995
-1849
No files matched your search
@@ -0,0 +1,26 @@
|
||||
using ItWorx.KnowledgeHub.Application.Migration;
|
||||
using ItWorx.KnowledgeHub.Infrastructure;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace ItWorx.KnowledgeHub.Api.Tests;
|
||||
|
||||
public sealed class LeafWikiAdapterLifetimeTests
|
||||
{
|
||||
[Fact]
|
||||
public void Preflight_catalog_resolves_with_scope_validation_enabled()
|
||||
{
|
||||
var configuration = new ConfigurationBuilder().AddInMemoryCollection().Build();
|
||||
var services = new ServiceCollection();
|
||||
services.AddSingleton<IConfiguration>(configuration);
|
||||
services.AddKnowledgeHubInfrastructure(configuration);
|
||||
|
||||
using var provider = services.BuildServiceProvider(new ServiceProviderOptions
|
||||
{
|
||||
ValidateScopes = true
|
||||
});
|
||||
using var scope = provider.CreateScope();
|
||||
|
||||
Assert.NotNull(scope.ServiceProvider.GetRequiredService<ILeafWikiAdapterCatalog>());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user