コード例 #1
0
  @Test
  public void testRandoms() {
    finder.setExecutorService(Executors.newCachedThreadPool());

    long numberToFind = 100;

    List<Long> list = finder.makeRandoms(numberToFind);
    assertEquals(numberToFind * 100000, list.size());
  }
コード例 #2
0
  @Test
  public void testPrimes() {
    finder.setExecutorService(Executors.newCachedThreadPool());

    long numberToFind = 100000;

    List<Long> list = finder.findPrimes(numberToFind);
    assertTrue(list.size() == numberToFind);
  }