From 0ae976930207b9f32cf3ce7fb501a396e3fed652 Mon Sep 17 00:00:00 2001 From: yangxiaodong Date: Wed, 28 Jun 2017 16:18:39 +0800 Subject: [PATCH] Remove dependencies of Microsoft.AspNetCore.Testing --- .../DefaultPocoTest.cs | 6 +----- ...tNetCore.CAP.EntityFrameworkCore.Test.csproj | 1 - .../MessageStoreTest.cs | 17 ++--------------- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/test/DotNetCore.CAP.EntityFrameworkCore.Test/DefaultPocoTest.cs b/test/DotNetCore.CAP.EntityFrameworkCore.Test/DefaultPocoTest.cs index f662932..146a452 100644 --- a/test/DotNetCore.CAP.EntityFrameworkCore.Test/DefaultPocoTest.cs +++ b/test/DotNetCore.CAP.EntityFrameworkCore.Test/DefaultPocoTest.cs @@ -1,7 +1,6 @@ using System.Threading.Tasks; using DotNetCore.CAP.Infrastructure; using Microsoft.AspNetCore.Builder.Internal; -using Microsoft.AspNetCore.Testing.xunit; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using Xunit; @@ -33,10 +32,7 @@ namespace DotNetCore.CAP.EntityFrameworkCore.Test } } - [ConditionalFact] - [FrameworkSkipCondition(RuntimeFrameworks.Mono)] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] + [Fact] public async Task EnsureStartupUsageWorks() { var messageStore = _builder.ApplicationServices.GetRequiredService(); diff --git a/test/DotNetCore.CAP.EntityFrameworkCore.Test/DotNetCore.CAP.EntityFrameworkCore.Test.csproj b/test/DotNetCore.CAP.EntityFrameworkCore.Test/DotNetCore.CAP.EntityFrameworkCore.Test.csproj index db49cdf..7605c1a 100644 --- a/test/DotNetCore.CAP.EntityFrameworkCore.Test/DotNetCore.CAP.EntityFrameworkCore.Test.csproj +++ b/test/DotNetCore.CAP.EntityFrameworkCore.Test/DotNetCore.CAP.EntityFrameworkCore.Test.csproj @@ -38,7 +38,6 @@ - diff --git a/test/DotNetCore.CAP.EntityFrameworkCore.Test/MessageStoreTest.cs b/test/DotNetCore.CAP.EntityFrameworkCore.Test/MessageStoreTest.cs index a0262c3..002b2e2 100644 --- a/test/DotNetCore.CAP.EntityFrameworkCore.Test/MessageStoreTest.cs +++ b/test/DotNetCore.CAP.EntityFrameworkCore.Test/MessageStoreTest.cs @@ -3,8 +3,6 @@ using System.Linq; using System.Threading.Tasks; using DotNetCore.CAP.Infrastructure; using DotNetCore.CAP.Test; -using Microsoft.AspNetCore.Testing; -using Microsoft.AspNetCore.Testing.xunit; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using Xunit; @@ -20,11 +18,6 @@ namespace DotNetCore.CAP.EntityFrameworkCore.Test _fixture = fixture; } - protected override bool ShouldSkipDbTests() - { - return TestPlatformHelper.IsMono || !TestPlatformHelper.IsWindows; - } - public class ApplicationDbContext : CapDbContext { public ApplicationDbContext(DbContextOptions options) : base(options) @@ -32,10 +25,7 @@ namespace DotNetCore.CAP.EntityFrameworkCore.Test } } - [ConditionalFact] - [FrameworkSkipCondition(RuntimeFrameworks.Mono)] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] + [Fact] public void CanCreateSentMessageUsingEF() { using (var db = CreateContext()) @@ -54,10 +44,7 @@ namespace DotNetCore.CAP.EntityFrameworkCore.Test } } - [ConditionalFact] - [FrameworkSkipCondition(RuntimeFrameworks.Mono)] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] + [Fact] public async Task CanCreateUsingManager() { var manager = CreateManager();