Files
speckle-sharp-sdk/tests/Speckle.Sdk.Tests.Unit/ServiceRegistrationTests.cs
T
2025-04-24 08:33:42 +01:00

28 lines
877 B
C#

using FluentAssertions;
using Microsoft.Extensions.DependencyInjection;
namespace Speckle.Sdk.Tests.Unit;
public class ServiceRegistrationTests
{
[Fact]
public void RegisterDependencies_Validation()
{
var serviceCollection = new ServiceCollection();
serviceCollection.AddSpeckleSdk(new("Tests", "test"), "v3");
var serviceProvider = serviceCollection.BuildServiceProvider(new ServiceProviderOptions { ValidateOnBuild = true });
serviceProvider.Should().NotBeNull();
}
[Fact]
public void RegisterDependencies_Scopes()
{
var serviceCollection = new ServiceCollection();
serviceCollection.AddSpeckleSdk(new("Tests", "test"), "v3");
var serviceProvider = serviceCollection.BuildServiceProvider(
new ServiceProviderOptions { ValidateScopes = true, ValidateOnBuild = true }
);
serviceProvider.Should().NotBeNull();
}
}