Updated more sonarqube findings

This commit is contained in:
2022-06-26 12:04:42 -04:00
parent 4ec1346476
commit 51456c7533
3 changed files with 10 additions and 12 deletions

View File

@@ -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

View File

@@ -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