23 lines
476 B
C#
23 lines
476 B
C#
|
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();
|
||
|
}
|
||
|
}
|