From e0b4c538228864c314900affae08df72edc9cd60 Mon Sep 17 00:00:00 2001 From: crupest Date: Mon, 15 Jun 2020 00:05:02 +0800 Subject: refactor(back): Use generic host. --- Timeline.Tests/IntegratedTests/TimelineTest.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Timeline.Tests/IntegratedTests/TimelineTest.cs') diff --git a/Timeline.Tests/IntegratedTests/TimelineTest.cs b/Timeline.Tests/IntegratedTests/TimelineTest.cs index d8017b8a..b6a56e94 100644 --- a/Timeline.Tests/IntegratedTests/TimelineTest.cs +++ b/Timeline.Tests/IntegratedTests/TimelineTest.cs @@ -1,5 +1,4 @@ using FluentAssertions; -using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using SixLabors.ImageSharp; @@ -45,8 +44,7 @@ namespace Timeline.Tests.IntegratedTests public class TimelineTest : IntegratedTestBase { - public TimelineTest(WebApplicationFactory factory) - : base(factory, 3) + public TimelineTest() : base(3) { } @@ -1112,7 +1110,7 @@ namespace Timeline.Tests.IntegratedTests } { - using var scope = TestApp.Factory.Services.CreateScope(); + using var scope = TestApp.Host.Services.CreateScope(); var database = scope.ServiceProvider.GetRequiredService(); var count = await database.Data.CountAsync(); count.Should().Be(0); -- cgit v1.2.3