Skip to content

Commit

Permalink
Skip ApprovalTests-based tests when not on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
bording committed Jul 19, 2017
1 parent 7759020 commit 08bf18e
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/NServiceBus.Core.Tests/Pipeline/PipelineTests.cs
Expand Up @@ -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();
Expand All @@ -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();
Expand Down Expand Up @@ -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[]
Expand Down
Expand Up @@ -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<Exception>(() => SagaMetadata.Create(typeof(SagaWithMultipleCorrelatedProperties), new List<Type>(), new Conventions()));
Approvals.Verify(exception.Message);
}
Expand Down
5 changes: 5 additions & 0 deletions src/NServiceBus.Core.Tests/StructConventionsTests.cs
Expand Up @@ -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.
Expand Down
@@ -1,5 +1,6 @@
namespace NServiceBus.Core.Tests.Transports.Learning
{
using System;
using System.Collections.Generic;
using ApprovalTests;
using NUnit.Framework;
Expand All @@ -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<string, string>
{
{
Expand Down

0 comments on commit 08bf18e

Please sign in to comment.