diff --git a/GFramework.Core.Tests/Coroutine/AsyncOperationTests.cs b/GFramework.Core.Tests/Coroutine/AsyncOperationTests.cs index d246c7cf..6f3b080b 100644 --- a/GFramework.Core.Tests/Coroutine/AsyncOperationTests.cs +++ b/GFramework.Core.Tests/Coroutine/AsyncOperationTests.cs @@ -104,7 +104,7 @@ public class AsyncOperationTests op.SetException(expectedException); - Assert.That(async () => await op.Task, Throws.InstanceOf()); + Assert.That(() => op.Task, Throws.InstanceOf()); } /// @@ -339,4 +339,4 @@ public class AsyncOperationTests Assert.DoesNotThrow(() => op.SetCompleted()); } -} \ No newline at end of file +} diff --git a/GFramework.Core.Tests/Extensions/ResultExtensionsTests.cs b/GFramework.Core.Tests/Extensions/ResultExtensionsTests.cs index 9d363da5..aaa78210 100644 --- a/GFramework.Core.Tests/Extensions/ResultExtensionsTests.cs +++ b/GFramework.Core.Tests/Extensions/ResultExtensionsTests.cs @@ -487,7 +487,7 @@ public class ResultExtensionsTests [Test] public void TryAsync_Should_Throw_ArgumentNullException_When_Function_Is_Null() { - Assert.ThrowsAsync(async () => await ResultExtensions.TryAsync(null!)); + Assert.ThrowsAsync(() => ResultExtensions.TryAsync(null!)); } ///