Sha256: 944dfa82ca1379f0c7f4777fdf19b5f818425479faec6151b25ff64fadbce904
Contents?: true
Size: 1.14 KB
Versions: 44
Compression:
Stored size: 1.14 KB
Contents
import org.junit.Before; import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import static org.hamcrest.CoreMatchers.*; import static org.junit.Assert.*; public class PrimeCalculatorTest { private PrimeCalculator primeCalculator; @Before public void setup() { primeCalculator = new PrimeCalculator(); } @Rule public ExpectedException thrown = ExpectedException.none(); @Test public void testFirstPrime() { assertThat(primeCalculator.nth(1), is(2)); } @Ignore("Remove to run test") @Test public void testSecondPrime() { assertThat(primeCalculator.nth(2), is(3)); } @Ignore("Remove to run test") @Test public void testSixthPrime() { assertThat(primeCalculator.nth(6), is(13)); } @Ignore("Remove to run test") @Test public void testBigPrime() { assertThat(primeCalculator.nth(10001), is(104743)); } @Ignore("Remove to run test") @Test public void testUndefinedPrime() { thrown.expect(IllegalArgumentException.class); primeCalculator.nth(0); } }
Version data entries
44 entries across 44 versions & 1 rubygems