diff options
author | 杨宇千 <crupest@outlook.com> | 2019-08-17 20:43:24 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-17 20:43:24 +0800 |
commit | 2d672de8ea109c923d5a8697e44d5cbbf976ead2 (patch) | |
tree | cecc5b93150f7b1e3be792de5c058433b5e40982 /Timeline.Tests/AuthorizationUnitTest.cs | |
parent | 7bbd66270597c7f6f07f1ab5ec6c45b3dcfa388e (diff) | |
parent | 67f42c40c3d4108620119e163a67f2686dd4a6f2 (diff) | |
download | timeline-2d672de8ea109c923d5a8697e44d5cbbf976ead2.tar.gz timeline-2d672de8ea109c923d5a8697e44d5cbbf976ead2.tar.bz2 timeline-2d672de8ea109c923d5a8697e44d5cbbf976ead2.zip |
Merge pull request #42 from crupest/change-username
Add change username api.
Diffstat (limited to 'Timeline.Tests/AuthorizationUnitTest.cs')
-rw-r--r-- | Timeline.Tests/AuthorizationUnitTest.cs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Timeline.Tests/AuthorizationUnitTest.cs b/Timeline.Tests/AuthorizationUnitTest.cs index 6f52a12d..4751e95f 100644 --- a/Timeline.Tests/AuthorizationUnitTest.cs +++ b/Timeline.Tests/AuthorizationUnitTest.cs @@ -1,5 +1,6 @@ using FluentAssertions;
using Microsoft.AspNetCore.Mvc.Testing;
+using System;
using System.Net;
using System.Threading.Tasks;
using Timeline.Tests.Helpers;
@@ -9,17 +10,23 @@ using Xunit.Abstractions; namespace Timeline.Tests
{
- public class AuthorizationUnitTest : IClassFixture<MyWebApplicationFactory<Startup>>
+ public class AuthorizationUnitTest : IClassFixture<MyWebApplicationFactory<Startup>>, IDisposable
{
private const string AuthorizeUrl = "Test/User/Authorize";
private const string UserUrl = "Test/User/User";
private const string AdminUrl = "Test/User/Admin";
private readonly WebApplicationFactory<Startup> _factory;
+ private readonly Action _disposeAction;
public AuthorizationUnitTest(MyWebApplicationFactory<Startup> factory, ITestOutputHelper outputHelper)
{
- _factory = factory.WithTestLogging(outputHelper);
+ _factory = factory.WithTestConfig(outputHelper, out _disposeAction);
+ }
+
+ public void Dispose()
+ {
+ _disposeAction();
}
[Fact]
|