Commit f80017f9 authored by Ali Saeed's avatar Ali Saeed

Create PrimeNumbersServiceTest Class

parent 12258114
package org.example;
import junit.framework.TestCase;
import org.junit.Test;
import java.util.Arrays;
import java.util.List;
public class PrimeNumbersServiceTest extends TestCase {
@Test
public void testThreeIsPrime(){
PrimeNumbersService test = new PrimeNumbersService();
assertTrue(test.isPrimeNumber(3));
}
@Test
public void testFindPrimeNumbersFromOneToTen(){
PrimeNumbersService test = new PrimeNumbersService(0,10);
List<Integer> expected = Arrays.asList(2, 3, 5, 7);
assertEquals(expected,test.findPrimeNumbers());
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment