Skip to content

Instantly share code, notes, and snippets.

@timmolderez
Last active December 17, 2015 01:46
Show Gist options
  • Save timmolderez/b33e9a87873a17405ad6 to your computer and use it in GitHub Desktop.
Save timmolderez/b33e9a87873a17405ad6 to your computer and use it in GitHub Desktop.
import org.junit.experimental.theories.DataPoints;
import org.junit.experimental.theories.Theories;
import org.junit.experimental.theories.Theory;
import org.junit.runner.RunWith;
import static org.junit.Assert.assertTrue;
@RunWith(Theories.class)
public class AdditionWithTheoriesTest {
@DataPoints
public static int[] positiveIntegers() {
return new int[]{-1, 10, 1234567};
}
@Theory
public void a_plus_b_is_greater_than_a_and_greater_than_b(Integer a, Integer b) {
assertTrue(a + b > a);
assertTrue(a + b > b);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment