From 39d1292cc99fa6d1bdf438ba8f64d7699290c68e Mon Sep 17 00:00:00 2001 From: TekH Date: Mon, 3 Aug 2026 17:11:36 +0200 Subject: [PATCH] refactor: simplify test code in ResultQueryTests - Remove unnecessary try-catch block in ShouldRead_Invalid_RecActionView test - Code now directly awaits the query execution without exception handling - Improves test readability and clarity --- .../ReC.Tests/Application/Results/ResultQueryTests.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/ReC.Tests/Application/Results/ResultQueryTests.cs b/tests/ReC.Tests/Application/Results/ResultQueryTests.cs index 7afe4f4..e0ce0df 100644 --- a/tests/ReC.Tests/Application/Results/ResultQueryTests.cs +++ b/tests/ReC.Tests/Application/Results/ResultQueryTests.cs @@ -25,14 +25,11 @@ public class ResultQueryTests : RecApplicationTestBase var invalidActionId = long.MaxValue; - try + await sender.Send(new ReadResultViewQuery { - await sender.Send(new ReadResultViewQuery - { - ActionId = invalidActionId - }); + ActionId = invalidActionId + }); - Assert.Pass("Read completed for unknown action id."); - } + Assert.Pass("Read completed for unknown action id."); } }