File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed
src/test/java/com/thealgorithms Expand file tree Collapse file tree 3 files changed +4
-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 22
33import static org .junit .jupiter .api .Assertions .assertEquals ;
44import static org .junit .jupiter .api .Assertions .assertNotEquals ;
5+ import static org .junit .jupiter .api .Assertions .assertNotNull ;
56import static org .junit .jupiter .api .Assertions .assertNull ;
67
78import org .junit .jupiter .api .Test ;
@@ -39,7 +40,7 @@ void testEquals() {
3940
4041 assertEquals (element1 , element2 ); // Same key and info
4142 assertNotEquals (element1 , element3 ); // Different key
42- assertNotEquals ( null , element1 ); // Check for null
43+ assertNotNull ( element1 );
4344 assertNotEquals ("String" , element1 ); // Check for different type
4445 }
4546
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