diff --git a/GameFrameX.Foundation.Tests/Extensions/DisposableConcurrentDictionaryTests.cs b/GameFrameX.Foundation.Tests/Extensions/DisposableConcurrentDictionaryTests.cs index 797cc79..1e19222 100644 --- a/GameFrameX.Foundation.Tests/Extensions/DisposableConcurrentDictionaryTests.cs +++ b/GameFrameX.Foundation.Tests/Extensions/DisposableConcurrentDictionaryTests.cs @@ -192,8 +192,12 @@ public void Dispose_EmptyDictionary_ShouldNotThrow() // Arrange var dictionary = new DisposableConcurrentDictionary(); - // Act & Assert - dictionary.Dispose(); // Should not throw + // Act + var exception = Record.Exception(() => dictionary.Dispose()); + + // Assert + Assert.Null(exception); // Should not throw + Assert.True(dictionary.IsDisposed); } [Fact]