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

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();
}
}