From 28247b20521440da6f1fc44e4dc1440ea4d28bf5 Mon Sep 17 00:00:00 2001 From: Andrzej Ochodek Date: Fri, 30 Oct 2026 18:54:46 +0100 Subject: [PATCH] Drop the useless null cast in OpenUrzednikValidationExceptionTest The exception has one single-argument constructor, so null! needs no cast (the CodeQL cs/useless-upcast pattern fixed in #181). Co-Authored-By: Claude Opus 5.5 --- .../Exceptions/OpenUrzednikValidationExceptionTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/OpenUrzednik.Core.Tests/Exceptions/OpenUrzednikValidationExceptionTest.cs b/tests/OpenUrzednik.Core.Tests/Exceptions/OpenUrzednikValidationExceptionTest.cs index b4a4231..393bc14 100644 --- a/tests/OpenUrzednik.Core.Tests/Exceptions/OpenUrzednikValidationExceptionTest.cs +++ b/tests/OpenUrzednik.Core.Tests/Exceptions/OpenUrzednikValidationExceptionTest.cs @@ -52,7 +52,7 @@ public void Ctor_NoErrors_ThrowsArgumentException() public void Ctor_NullErrors_ThrowsArgumentNullException() { // Act && Assert - Should.Throw(() => new OpenUrzednikValidationException((IReadOnlyList)null!)); + Should.Throw(() => new OpenUrzednikValidationException(null!)); } [Fact]