diff --git a/GFramework.Core.Tests/State/StateMachineSystemTests.cs b/GFramework.Core.Tests/State/StateMachineSystemTests.cs index 9ee084ff..58d818e3 100644 --- a/GFramework.Core.Tests/State/StateMachineSystemTests.cs +++ b/GFramework.Core.Tests/State/StateMachineSystemTests.cs @@ -138,7 +138,7 @@ public class StateMachineSystemTests [Test] public async Task DestroyAsync_Should_Not_Throw_Exception() { - Assert.That(async () => await _stateMachine!.DestroyAsync(), Throws.Nothing); + Assert.That(() => _stateMachine!.DestroyAsync(), Throws.Nothing); } /// diff --git a/GFramework.Core.Tests/State/StateMachineTests.cs b/GFramework.Core.Tests/State/StateMachineTests.cs index 3f854ade..a9f17a50 100644 --- a/GFramework.Core.Tests/State/StateMachineTests.cs +++ b/GFramework.Core.Tests/State/StateMachineTests.cs @@ -216,7 +216,7 @@ public class StateMachineTests [Test] public void ChangeToAsync_ToUnregisteredState_Should_ThrowInvalidOperationException() { - Assert.ThrowsAsync(async () => await _stateMachine.ChangeToAsync()); + Assert.ThrowsAsync(() => _stateMachine.ChangeToAsync()); } /// @@ -601,4 +601,4 @@ public static class StateMachineExtensions .GetValue(stateMachine) is Dictionary states && states.ContainsKey(typeof(T)); } -} \ No newline at end of file +}