style: include UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_NOT_NULL (#7226)

This commit is contained in:
Piotr Idzik
2026-01-21 10:55:09 +01:00
committed by GitHub
parent 1b014a2ea4
commit 0e8291e669
3 changed files with 4 additions and 6 deletions

View File

@@ -219,9 +219,6 @@
<Match>
<Bug pattern="UTAO_JUNIT_ASSERTION_ODDITIES_INEXACT_DOUBLE" />
</Match>
<Match>
<Bug pattern="UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_NOT_NULL" />
</Match>
<Match>
<Bug pattern="UTAO_JUNIT_ASSERTION_ODDITIES_IMPOSSIBLE_NULL" />
</Match>

View File

@@ -2,6 +2,7 @@ package com.thealgorithms.datastructures.heaps;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import org.junit.jupiter.api.Test;
@@ -39,7 +40,7 @@ class HeapElementTest {
assertEquals(element1, element2); // Same key and info
assertNotEquals(element1, element3); // Different key
assertNotEquals(null, element1); // Check for null
assertNotNull(element1);
assertNotEquals("String", element1); // Check for different type
}

View File

@@ -176,7 +176,7 @@ class LinearDiophantineEquationsSolverTest {
assertEquals(solution1, solution2);
assertNotEquals(solution3, solution1);
assertEquals(solution1, solution1);
assertNotEquals(null, solution1);
assertNotNull(solution1);
assertNotEquals("string", solution1);
}
@@ -217,7 +217,7 @@ class LinearDiophantineEquationsSolverTest {
assertEquals(wrapper1, wrapper2);
assertNotEquals(wrapper3, wrapper1);
assertEquals(wrapper1, wrapper1);
assertNotEquals(null, wrapper1);
assertNotNull(wrapper1);
assertNotEquals("string", wrapper1);
}