From a72960e54a89bd31dcb8be8f52e097007dfd23e5 Mon Sep 17 00:00:00 2001 From: crupest Date: Wed, 20 Nov 2019 00:28:53 +0800 Subject: Clean and refactor tests. --- Timeline.Tests/IntegratedTests/I18nTest.cs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'Timeline.Tests/IntegratedTests/I18nTest.cs') diff --git a/Timeline.Tests/IntegratedTests/I18nTest.cs b/Timeline.Tests/IntegratedTests/I18nTest.cs index 67bbea5c..855179af 100644 --- a/Timeline.Tests/IntegratedTests/I18nTest.cs +++ b/Timeline.Tests/IntegratedTests/I18nTest.cs @@ -1,32 +1,28 @@ -using Microsoft.AspNetCore.Mvc.Testing; +using FluentAssertions; +using Microsoft.AspNetCore.Mvc.Testing; using System; -using System.Collections.Generic; -using System.Linq; using System.Net.Http; using System.Net.Http.Headers; using System.Threading.Tasks; using Timeline.Tests.Helpers; using Xunit; -using FluentAssertions; namespace Timeline.Tests.IntegratedTests { [System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1054:Uri parameters should not be strings")] - public class I18nTest : IClassFixture>, IDisposable + public class I18nTest : IntegratedTestBase { - private readonly TestApplication _testApp; private readonly HttpClient _client; public I18nTest(WebApplicationFactory factory) + : base(factory) { - _testApp = new TestApplication(factory); - _client = _testApp.Factory.CreateDefaultClient(); + _client = Factory.CreateDefaultClient(); } - public void Dispose() + protected override void OnDispose() { _client.Dispose(); - _testApp.Dispose(); } private const string DirectUrl = "testing/i18n/direct"; -- cgit v1.2.3