File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed
src/test/java/com/thealgorithms Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 219219 <Match >
220220 <Bug pattern =" UTAO_JUNIT_ASSERTION_ODDITIES_INEXACT_DOUBLE" />
221221 </Match >
222- <Match >
223- <Bug pattern =" UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_NOT_NULL" />
224- </Match >
225222 <Match >
226223 <Bug pattern =" UTAO_JUNIT_ASSERTION_ODDITIES_IMPOSSIBLE_NULL" />
227224 </Match >
Original file line number Diff line number Diff line change 33import static org .junit .jupiter .api .Assertions .assertEquals ;
44import static org .junit .jupiter .api .Assertions .assertNotEquals ;
55import static org .junit .jupiter .api .Assertions .assertNull ;
6+ import static org .junit .jupiter .api .Assertions .assertNotNull ;
7+
68
79import org .junit .jupiter .api .Test ;
810
@@ -39,7 +41,7 @@ void testEquals() {
3941
4042 assertEquals (element1 , element2 ); // Same key and info
4143 assertNotEquals (element1 , element3 ); // Different key
42- assertNotEquals ( null , element1 ); // Check for null
44+ assertNotNull ( element1 );
4345 assertNotEquals ("String" , element1 ); // Check for different type
4446 }
4547
Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ void testSolutionEquality() {
176176 assertEquals (solution1 , solution2 );
177177 assertNotEquals (solution3 , solution1 );
178178 assertEquals (solution1 , solution1 );
179- assertNotEquals ( null , solution1 );
179+ assertNotNull ( solution1 );
180180 assertNotEquals ("string" , solution1 );
181181 }
182182
@@ -217,7 +217,7 @@ void testGcdSolutionWrapperEquality() {
217217 assertEquals (wrapper1 , wrapper2 );
218218 assertNotEquals (wrapper3 , wrapper1 );
219219 assertEquals (wrapper1 , wrapper1 );
220- assertNotEquals ( null , wrapper1 );
220+ assertNotNull ( wrapper1 );
221221 assertNotEquals ("string" , wrapper1 );
222222 }
223223
You can’t perform that action at this time.
0 commit comments