|
|
@@ -1,31 +1,32 @@
|
|
1
|
1
|
import org.junit.Test;
|
|
2
|
2
|
import org.junit.Ignore;
|
|
3
|
3
|
|
|
4
|
|
-import static org.assertj.core.api.Assertions.assertThat;
|
|
|
4
|
+import static org.hamcrest.CoreMatchers.*;
|
|
|
5
|
+import static org.junit.Assert.*;
|
|
5
|
6
|
|
|
6
|
7
|
public class PrimeTest {
|
|
7
|
8
|
|
|
8
|
9
|
@Test
|
|
9
|
10
|
public void testFirstPrime() {
|
|
10
|
|
- assertThat(Prime.nth(1)).isEqualTo(2);
|
|
|
11
|
+ assertThat(Prime.nth(1), is(2));
|
|
11
|
12
|
}
|
|
12
|
13
|
|
|
13
|
14
|
@Ignore
|
|
14
|
15
|
@Test
|
|
15
|
16
|
public void testSecondPrime() {
|
|
16
|
|
- assertThat(Prime.nth(2)).isEqualTo(3);
|
|
|
17
|
+ assertThat(Prime.nth(2), is(3));
|
|
17
|
18
|
}
|
|
18
|
19
|
|
|
19
|
20
|
@Ignore
|
|
20
|
21
|
@Test
|
|
21
|
22
|
public void testSixthPrime() {
|
|
22
|
|
- assertThat(Prime.nth(6)).isEqualTo(13);
|
|
|
23
|
+ assertThat(Prime.nth(6), is(13));
|
|
23
|
24
|
}
|
|
24
|
25
|
|
|
25
|
26
|
@Ignore
|
|
26
|
27
|
@Test
|
|
27
|
28
|
public void testBigPrime() {
|
|
28
|
|
- assertThat(Prime.nth(10001)).isEqualTo(104743);
|
|
|
29
|
+ assertThat(Prime.nth(10001), is(104743));
|
|
29
|
30
|
}
|
|
30
|
31
|
|
|
31
|
32
|
@Ignore
|