blob: 3ea95e882334aff601e3108b7215f5849715a492 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
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.AddProductParsers();
ServiceProvider = collection.BuildServiceProvider();
}
[OneTimeTearDown]
public void DisposeProvider()
{
ServiceProvider?.Dispose();
}
}
|