diff options
author | crupest <crupest@outlook.com> | 2019-11-17 23:04:21 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-11-17 23:04:21 +0800 |
commit | 5b5bb69c3ba2150816f120860be46d49c5bc37aa (patch) | |
tree | 46282455cd6bdf43bf2215d3918f5803b2a31674 /Timeline.Tests/IntegratedTests/IntegratedTestBase.cs | |
parent | 05f334fba5ac87c24938ac02094da72db9388d26 (diff) | |
download | timeline-5b5bb69c3ba2150816f120860be46d49c5bc37aa.tar.gz timeline-5b5bb69c3ba2150816f120860be46d49c5bc37aa.tar.bz2 timeline-5b5bb69c3ba2150816f120860be46d49c5bc37aa.zip |
Fix typo in path of personal timeline controller actions. Add timeline permission test.
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(); + } + } +} |