Added some exception handling

This commit is contained in:
2020-08-24 14:50:04 -04:00
parent 019ed3244b
commit bf97b78219
5 changed files with 59 additions and 22 deletions

View File

@@ -32,6 +32,8 @@ import java.util.Arrays;
import org.junit.Test;
import mattrixwv.exceptions.InvalidResult;
public class TestAlgorithms{
@Test
@@ -75,7 +77,7 @@ public class TestAlgorithms{
assertEquals("getNumPrimes BigInteger failed", bigCorrectAnswer, bigAnswer);
}
@Test
public void testGetFactors(){
public void testGetFactors() throws InvalidResult{
//Test 1
ArrayList<Integer> correctAnswer = new ArrayList<Integer>(Arrays.asList(2, 2, 5, 5));
Integer number = 100;