Commit cc85482b authored by Kyle Muldoon's avatar Kyle Muldoon

added parameterized test in SampleTest.java

parent eb3ad0c7
import junit.framework.AssertionFailedError;
import junit.framework.Test;
import junit.framework.TestResult;
import org.junit.runners.Parameterized;
import java.util.Arrays;
import java.util.Collection;
import static org.junit.Assert.*;
......@@ -39,6 +43,11 @@ public class SampleTest extends TestResult {
throw new ArithmeticException("some error happened");
}
@Parameterized.Parameters
public static Collection primeNumbers() {
return Arrays.asList(new Object[][] {
{ 2, true },{ 6, false },{ 19, true },{ 22, false },{ 23, true }});
}
public synchronized void stop() {
// stop test here
......@@ -47,13 +56,3 @@ public class SampleTest extends TestResult {
}
//public class SampleTest {
// int a = 10;
// int b = 20;
//
// @Test
// public void testAdd() {
// assertEquals( (a + b), 30 );
// }
//}
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