diff --git a/src/test/java/CalculationsTest.java b/src/test/java/CalculationsTest.java index 1073c19..3aec84b 100644 --- a/src/test/java/CalculationsTest.java +++ b/src/test/java/CalculationsTest.java @@ -1,5 +1,7 @@ import org.junit.Test; + import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; public class CalculationsTest { @@ -41,5 +43,12 @@ public class CalculationsTest { Calculations fact = new Calculations(); fact.calculateFactorial(-5); // Should throw IllegalArgumentException } + + @Test + public void testIsPrime() { + assertTrue(Calculations.isPrime(2)); // Prime number + assertTrue(Calculations.isPrime(3)); // Prime number + assertTrue(Calculations.isPrime(5)); // Prime number + } }