diff --git a/src/NServiceBus.Core.Tests/Pipeline/PipelineTests.cs b/src/NServiceBus.Core.Tests/Pipeline/PipelineTests.cs index 7976316c86..8cd41a739e 100644 --- a/src/NServiceBus.Core.Tests/Pipeline/PipelineTests.cs +++ b/src/NServiceBus.Core.Tests/Pipeline/PipelineTests.cs @@ -22,6 +22,11 @@ public class PipelineTests [Test] public async Task ShouldExecutePipeline() { + if (Environment.OSVersion.Platform != PlatformID.Win32NT) + { + Assert.Ignore("ApprovalTests only works on Windows"); + } + var stringWriter = new StringWriter(); var pipelineModifications = new PipelineModifications(); @@ -45,6 +50,11 @@ public async Task ShouldExecutePipeline() [Test] public async Task ShouldNotCacheContext() { + if (Environment.OSVersion.Platform != PlatformID.Win32NT) + { + Assert.Ignore("ApprovalTests only works on Windows"); + } + var stringWriter = new StringWriter(); var pipelineModifications = new PipelineModifications(); @@ -79,6 +89,11 @@ public async Task ShouldNotCacheContext() [Test] public void ShouldCreateCachedExecutionPlan() { + if (Environment.OSVersion.Platform != PlatformID.Win32NT) + { + Assert.Ignore("ApprovalTests only works on Windows"); + } + var stringWriter = new StringWriter(); var behaviors = new IBehavior[] diff --git a/src/NServiceBus.Core.Tests/Sagas/When_saga_has_multiple_correlated_properties.cs b/src/NServiceBus.Core.Tests/Sagas/When_saga_has_multiple_correlated_properties.cs index e8fd13726f..40f093fc19 100644 --- a/src/NServiceBus.Core.Tests/Sagas/When_saga_has_multiple_correlated_properties.cs +++ b/src/NServiceBus.Core.Tests/Sagas/When_saga_has_multiple_correlated_properties.cs @@ -13,6 +13,11 @@ public class When_saga_has_multiple_correlated_properties [Test] public void Should_throw() { + if (Environment.OSVersion.Platform != PlatformID.Win32NT) + { + Assert.Ignore("ApprovalTests only works on Windows"); + } + var exception = Assert.Throws(() => SagaMetadata.Create(typeof(SagaWithMultipleCorrelatedProperties), new List(), new Conventions())); Approvals.Verify(exception.Message); } diff --git a/src/NServiceBus.Core.Tests/StructConventionsTests.cs b/src/NServiceBus.Core.Tests/StructConventionsTests.cs index fd2ac2db60..40be19f6e8 100644 --- a/src/NServiceBus.Core.Tests/StructConventionsTests.cs +++ b/src/NServiceBus.Core.Tests/StructConventionsTests.cs @@ -15,6 +15,11 @@ public class StructConventionsTests [Test] public void ApproveStructsWhichDontFollowStructGuidelines() { + if (Environment.OSVersion.Platform != PlatformID.Win32NT) + { + Assert.Ignore("ApprovalTests only works on Windows"); + } + var approvalBuilder = new StringBuilder(); approvalBuilder.AppendLine(@"-------------------------------------------------- REMEMBER -------------------------------------------------- CONSIDER defining a struct instead of a class if instances of the type are small and commonly short-lived or are commonly embedded in other objects. diff --git a/src/NServiceBus.Core.Tests/Transports/Learning/HeaderSerializerTests.cs b/src/NServiceBus.Core.Tests/Transports/Learning/HeaderSerializerTests.cs index ad2c6be69d..7dc9d81f13 100644 --- a/src/NServiceBus.Core.Tests/Transports/Learning/HeaderSerializerTests.cs +++ b/src/NServiceBus.Core.Tests/Transports/Learning/HeaderSerializerTests.cs @@ -1,5 +1,6 @@ namespace NServiceBus.Core.Tests.Transports.Learning { + using System; using System.Collections.Generic; using ApprovalTests; using NUnit.Framework; @@ -9,6 +10,11 @@ public class HeaderSerializerTests [Test] public void Can_round_trip_headers() { + if (Environment.OSVersion.Platform != PlatformID.Win32NT) + { + Assert.Ignore("ApprovalTests only works on Windows"); + } + var input = new Dictionary { {