Esempio n. 1
0
 @Test
 public void calculateValueFourEdgeCase() {
   List<Integer> primes = instance.calculate(4);
   assertThat(primes).containsExactly(2, 3);
 }
Esempio n. 2
0
 @Test(expected = IllegalArgumentException.class)
 public void calculateValueOneEdgeCase() {
   instance.calculate(1);
 }
Esempio n. 3
0
 @Test
 public void calculate() {
   List<Integer> primes = instance.calculate(10);
   assertThat(primes).containsExactly(2, 3, 5, 7);
 }
Esempio n. 4
0
 @Test(expected = IllegalArgumentException.class)
 public void calculateZeroUpperBound() {
   instance.calculate(0);
 }
Esempio n. 5
0
 @Test
 public void getType() throws Exception {
   assertThat(instance.getType()).isEqualTo(AlgorithmType.PRIME_BY_REMAINDER);
 }