-
Notifications
You must be signed in to change notification settings - Fork 0
/
TestBase.cs
31 lines (27 loc) · 836 Bytes
/
TestBase.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System;
using CQRS.AspNet.Testing;
using HeatKeeper.Server.WebApi.Tests.Transactions;
using LightInject;
using Microsoft.Extensions.Hosting;
namespace HeatKeeper.Server.WebApi.Tests
{
public class IntegrationTestWebApplicationFactory : TestApplication<Program>
{
public IntegrationTestWebApplicationFactory()
{
}
}
public class TestBase : IDisposable
{
public TestBase()
{
Factory = new IntegrationTestWebApplicationFactory();
Factory.ConfigureHostBuilder(hostBuilder => hostBuilder.ConfigureContainer<IServiceContainer>(c =>
{
c.RegisterRollbackBehavior();
}));
}
public IntegrationTestWebApplicationFactory Factory { get; }
public void Dispose() => Factory.Dispose();
}
}