Sha256: 66a1e7f70f9f8d6f2046ea078d821d6e9eaef75cb071f3963fb4d6e508853457

Contents?: true

Size: 704 Bytes

Versions: 59

Compression:

Stored size: 704 Bytes

Contents

import org.junit.Test;
import org.junit.Ignore;

import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;

public class PrimeTest {

    @Test
    public void testFirstPrime() {
        assertThat(Prime.nth(1), is(2));
    }

    @Ignore
    @Test
    public void testSecondPrime() {
        assertThat(Prime.nth(2), is(3));
    }

    @Ignore
    @Test
    public void testSixthPrime() {
        assertThat(Prime.nth(6), is(13));
    }

    @Ignore
    @Test
    public void testBigPrime() {
        assertThat(Prime.nth(10001), is(104743));
    }

    @Ignore
    @Test(expected = IllegalArgumentException.class)
    public void testUndefinedPrime() {
        Prime.nth(0);
    }
}

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
trackler-2.0.6.41 tracks/java/exercises/nth-prime/src/test/java/PrimeTest.java
trackler-2.0.6.40 tracks/java/exercises/nth-prime/src/test/java/PrimeTest.java
trackler-2.0.6.39 tracks/java/exercises/nth-prime/src/test/java/PrimeTest.java
trackler-2.0.6.38 tracks/java/exercises/nth-prime/src/test/java/PrimeTest.java
trackler-2.0.6.37 tracks/java/exercises/nth-prime/src/test/java/PrimeTest.java
trackler-2.0.6.36 tracks/java/exercises/nth-prime/src/test/java/PrimeTest.java
trackler-2.0.6.35 tracks/java/exercises/nth-prime/src/test/java/PrimeTest.java
trackler-2.0.6.34 tracks/java/exercises/nth-prime/src/test/java/PrimeTest.java
trackler-2.0.6.33 tracks/java/exercises/nth-prime/src/test/java/PrimeTest.java
trackler-2.0.6.32 tracks/java/exercises/nth-prime/src/test/java/PrimeTest.java
trackler-2.0.6.31 tracks/java/exercises/nth-prime/src/test/java/PrimeTest.java
trackler-2.0.6.30 tracks/java/exercises/nth-prime/src/test/java/PrimeTest.java
trackler-2.0.6.29 tracks/java/exercises/nth-prime/src/test/java/PrimeTest.java
trackler-2.0.6.28 tracks/java/exercises/nth-prime/src/test/java/PrimeTest.java
trackler-2.0.6.27 tracks/java/exercises/nth-prime/src/test/java/PrimeTest.java
trackler-2.0.6.26 tracks/java/exercises/nth-prime/src/test/java/PrimeTest.java
trackler-2.0.6.25 tracks/java/exercises/nth-prime/src/test/java/PrimeTest.java
trackler-2.0.6.24 tracks/java/exercises/nth-prime/src/test/java/PrimeTest.java
trackler-2.0.6.23 tracks/java/exercises/nth-prime/src/test/java/PrimeTest.java
trackler-2.0.6.22 tracks/java/exercises/nth-prime/src/test/java/PrimeTest.java