Skip to content

Commit

Permalink
Fixed failing tests on net462 build
Browse files Browse the repository at this point in the history
  • Loading branch information
phatboyg committed May 30, 2023
1 parent 42347c9 commit 01318fd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/MassTransit.Tests/MessageUrnSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void AttributedMessage_with_null_throws_error()
() => MessageUrn.ForType(typeof(AttributedNull)),
Throws.TypeOf<TypeInitializationException>()
.And.InnerException.TypeOf<ArgumentNullException>()
.And.InnerException.Message.EqualTo("Value cannot be null. (Parameter 'urn')"));
.And.InnerException.Message.StartsWith("Value cannot be null."));
}

[Test]
Expand All @@ -66,7 +66,7 @@ public void AttributedMessage_with_empty_throws_error()
Assert.That(() => MessageUrn.ForType(typeof(AttributedEmpty)),
Throws.TypeOf<TypeInitializationException>()
.And.InnerException.TypeOf<ArgumentException>()
.And.InnerException.Message.EqualTo("Value cannot be empty or whitespace only string. (Parameter 'urn')"));
.And.InnerException.Message.StartsWith("Value cannot be empty or whitespace only string."));
}

[Test]
Expand All @@ -75,7 +75,7 @@ public void AttributedMessage_with_whitespace_throws_error()
Assert.That(() => MessageUrn.ForType(typeof(AttributedWhitespace)),
Throws.TypeOf<TypeInitializationException>()
.And.InnerException.TypeOf<ArgumentException>()
.And.InnerException.Message.EqualTo("Value cannot be empty or whitespace only string. (Parameter 'urn')"));
.And.InnerException.Message.StartsWith("Value cannot be empty or whitespace only string."));
}

[Test]
Expand All @@ -84,7 +84,7 @@ public void AttributedMessage_with_default_prefix_throws_error()
Assert.That(() => MessageUrn.ForType(typeof(AttributedKnownPrefix)),
Throws.TypeOf<TypeInitializationException>()
.And.InnerException.TypeOf<ArgumentException>()
.And.InnerException.Message.EqualTo("Value should not contain the default prefix 'urn:message:'. (Parameter 'urn')"));
.And.InnerException.Message.StartsWith("Value should not contain the default prefix 'urn:message:'."));
}

[Test]
Expand Down

0 comments on commit 01318fd

Please sign in to comment.