forked from TheAlgorithms/Java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPrimeCheckTest.java
More file actions
43 lines (34 loc) · 836 Bytes
/
PrimeCheckTest.java
File metadata and controls
43 lines (34 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package com.thealgorithms.maths.prime;
import com.thealgorithms.maths.Prime.PrimeCheck;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class PrimeCheckTest {
@Test
void test1() {
Assertions.assertTrue(PrimeCheck.isPrime(2));
}
@Test
void test2() {
Assertions.assertFalse(PrimeCheck.isPrime(-1));
}
@Test
void test3() {
Assertions.assertFalse(PrimeCheck.isPrime(4));
}
@Test
void test4() {
Assertions.assertTrue(PrimeCheck.isPrime(5));
}
@Test
void test5() {
Assertions.assertFalse(PrimeCheck.isPrime(15));
}
@Test
void test6() {
Assertions.assertTrue(PrimeCheck.isPrime(11));
}
@Test
void test7() {
Assertions.assertFalse(PrimeCheck.isPrime(49));
}
}