forked from exercism/java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPrimeTest.java
More file actions
36 lines (29 loc) · 709 Bytes
/
PrimeTest.java
File metadata and controls
36 lines (29 loc) · 709 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
import org.junit.Test;
import org.junit.Ignore;
import static org.assertj.core.api.Assertions.assertThat;
public class PrimeTest {
@Test
public void testFirstPrime() {
assertThat(Prime.nth(1)).isEqualTo(2);
}
@Ignore
@Test
public void testSecondPrime() {
assertThat(Prime.nth(2)).isEqualTo(3);
}
@Ignore
@Test
public void testSixthPrime() {
assertThat(Prime.nth(6)).isEqualTo(13);
}
@Ignore
@Test
public void testBigPrime() {
assertThat(Prime.nth(10001)).isEqualTo(104743);
}
@Ignore
@Test(expected = IllegalArgumentException.class)
public void testUndefinedPrime() {
Prime.nth(0);
}
}