0
0
RhSolutions-Api/RhSolutions.Api.Tests/TestServiceCollection.cs

23 lines
476 B
C#
Raw Normal View History

2024-01-26 16:48:47 +03:00
using Microsoft.Extensions.DependencyInjection;
namespace RhSolutions.Api.Tests;
[SetUpFixture]
public class TestServiceCollection
{
public static ServiceProvider? ServiceProvider { get; private set; }
[OneTimeSetUp]
public void CreateProvider()
{
var collection = new ServiceCollection();
collection.AddModifiers();
ServiceProvider = collection.BuildServiceProvider();
}
[OneTimeTearDown]
public void DisposeProvider()
{
ServiceProvider?.Dispose();
}
}