Skip to content

Commit aa0924c

Browse files
committed
fix SynchronizedCacheTests.Add_WhenItemExistsInCache_ThrowsArgumentException test
1 parent b71a2e0 commit aa0924c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/NHapi.Base.NUnit/Util/SynchronizedCacheTests.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,12 @@ public void Add_WhenItemExistsInCache_ThrowsArgumentException()
8989
var sut = new SynchronizedCache<string, string> { { "key", "value" } };
9090

9191
// Act / Assert
92-
#if WINDOWS
9392
var expectedExceptionMessage = "An item with the same key has already been added.";
94-
#else
95-
var expectedExceptionMessage = "An item with the same key has already been added. Key: key";
96-
#endif
93+
9794
Assert.That(
9895
() => sut.Add("key", "value"),
9996
Throws.ArgumentException
100-
.With.Message.EqualTo(expectedExceptionMessage));
97+
.With.Message.StartsWith(expectedExceptionMessage));
10198
}
10299

103100
[Test]

0 commit comments

Comments
 (0)