22 lines
617 B
C#
22 lines
617 B
C#
using Core.Blueprint.Mongo.DependencyInjection;
|
|
using Core.Blueprint.Mongo.Runtime;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace Core.Blueprint.Mongo.UnitTests;
|
|
|
|
public class UnitTest1
|
|
{
|
|
[Fact]
|
|
public void AddBlueprintMongoModule_WhenCalled_RegistersRuntimeSettings()
|
|
{
|
|
var services = new ServiceCollection();
|
|
|
|
services.AddBlueprintMongoModule("catalog-db");
|
|
|
|
using var provider = services.BuildServiceProvider();
|
|
var settings = provider.GetRequiredService<BlueprintMongoRuntimeSettings>();
|
|
|
|
Assert.Equal("catalog-db", settings.DatabaseName);
|
|
}
|
|
}
|