Last active
December 17, 2015 01:46
-
-
Save timmolderez/b33e9a87873a17405ad6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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