diff options
Diffstat (limited to 'Timeline.Tests/IntegratedTests/IntegratedTestBase.cs')
-rw-r--r-- | Timeline.Tests/IntegratedTests/IntegratedTestBase.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Timeline.Tests/IntegratedTests/IntegratedTestBase.cs b/Timeline.Tests/IntegratedTests/IntegratedTestBase.cs new file mode 100644 index 00000000..c4d72faf --- /dev/null +++ b/Timeline.Tests/IntegratedTests/IntegratedTestBase.cs @@ -0,0 +1,27 @@ +using Microsoft.AspNetCore.Mvc.Testing; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Timeline.Tests.Helpers; +using Xunit; + +namespace Timeline.Tests.IntegratedTests +{ + public abstract class IntegratedTestBase : IClassFixture<WebApplicationFactory<Startup>>, IDisposable + { + protected TestApplication TestApp { get; } + + protected WebApplicationFactory<Startup> Factory => TestApp.Factory; + + public IntegratedTestBase(WebApplicationFactory<Startup> factory) + { + TestApp = new TestApplication(factory); + } + + public virtual void Dispose() + { + TestApp.Dispose(); + } + } +} |