From d2f8fa219e97340fc00b7ff540ddb8a15228b8c4 Mon Sep 17 00:00:00 2001 From: 13xforever Date: Tue, 7 Oct 2025 20:02:43 +0500 Subject: [PATCH] misc tests update --- Tests/MemoryCacheExtensionTests.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Tests/MemoryCacheExtensionTests.cs b/Tests/MemoryCacheExtensionTests.cs index 42d8c454..d318322d 100644 --- a/Tests/MemoryCacheExtensionTests.cs +++ b/Tests/MemoryCacheExtensionTests.cs @@ -17,15 +17,14 @@ public class MemoryCacheExtensionTests const string testVal = "vale13"; cache.Set(13, testVal); cache.Set("bob", 69); - Assert.Multiple(() => - { + using (Assert.EnterMultipleScope()) + { Assert.That(cache.TryGetValue(13, out string? expectedVal), Is.True); Assert.That(expectedVal, Is.EqualTo(testVal)); Assert.That(cache.TryGetValue("bob", out int? expectedValInt), Is.True); Assert.That(expectedValInt, Is.EqualTo(69)); - } - ); - Assert.That(cache.GetCacheKeys(), Has.Count.EqualTo(1)); + Assert.That(cache.GetCacheKeys(), Has.Count.EqualTo(1)); + } } [Test] @@ -36,7 +35,10 @@ public class MemoryCacheExtensionTests cache.Set(13, "val13"); cache.Set("bob", 69); - Assert.That(cache.GetCacheEntries(), Has.Count.EqualTo(1)); - Assert.That(cache.GetCacheEntries(), Has.Count.EqualTo(1)); + using (Assert.EnterMultipleScope()) + { + Assert.That(cache.GetCacheEntries(), Has.Count.EqualTo(1)); + Assert.That(cache.GetCacheEntries(), Has.Count.EqualTo(1)); + } } } \ No newline at end of file