mirror of
https://bitbucket.org/Mattrixwv/javaclasses.git
synced 2025-12-07 07:23:57 -05:00
Updated more sonarqube findings
This commit is contained in:
@@ -170,8 +170,6 @@ public class TestNumberAlgorithms{
|
||||
|
||||
@Test
|
||||
public void testGetDivisors(){
|
||||
Stopwatch timer = new Stopwatch();
|
||||
timer.start();
|
||||
//Test 1
|
||||
List<Integer> correctAnswer = Arrays.asList(1, 2, 4, 5, 10, 20, 25, 50, 100);
|
||||
Integer topNum = 100;
|
||||
@@ -204,8 +202,6 @@ public class TestNumberAlgorithms{
|
||||
bigTopNum = BigInteger.valueOf(6);
|
||||
bigAnswer = NumberAlgorithms.getDivisors(bigTopNum);
|
||||
assertEquals("getDivisors BigInteger 2 failed", bigCorrectAnswer, bigAnswer);
|
||||
timer.stop();
|
||||
System.out.println("timer = " + timer.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -26,6 +26,7 @@ package mattrixwv;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -39,6 +40,7 @@ public class TestStopwatch{
|
||||
Stopwatch timer = new Stopwatch();
|
||||
timer.start();
|
||||
timer.stop();
|
||||
assertNotNull(timer.toString());
|
||||
//If it gets to here without throwing an exception everything went well
|
||||
}
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user