From dc5ea6e47c0b8ade4c6983dd34520cab69ba689d Mon Sep 17 00:00:00 2001 From: chopin-fan Date: Sun, 21 Jul 2024 00:56:09 +0800 Subject: [PATCH] Adjust wrong unit test --- test/AElf.CSharp.CodeOps.Tests/ContractAuditorTests.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/test/AElf.CSharp.CodeOps.Tests/ContractAuditorTests.cs b/test/AElf.CSharp.CodeOps.Tests/ContractAuditorTests.cs index 080e48deee..56be0fc22c 100644 --- a/test/AElf.CSharp.CodeOps.Tests/ContractAuditorTests.cs +++ b/test/AElf.CSharp.CodeOps.Tests/ContractAuditorTests.cs @@ -110,13 +110,8 @@ public void AuditTimeout() Should.NotThrow(() => _auditor.Audit(ReadPatchedContractCode(typeof(TokenContract)), true)); var codeOpsOptions = GetRequiredService>(); codeOpsOptions.CurrentValue.AuditTimeoutDuration = 0; - var exception = - Assert.Throws( - () => _auditor.Audit(ReadPatchedContractCode(typeof(TokenContract)), true)); - foreach (var ex in exception.InnerExceptions) - { - ex.GetType().ShouldBe(typeof(ContractAuditTimeoutException)); - } + Should.Throw(() => + _auditor.Audit(ReadPatchedContractCode(typeof(TokenContract)), true)); } [Fact]