mirror of
https://github.com/TheAlgorithms/Java.git
synced 2026-03-13 08:40:43 +08:00
style: include UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_NOT_NULL (#7226)
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user