Advertisement
Guest User

Untitled

a guest
Jun 5th, 2012
359
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. Using multiple @parameters for JUNIT4
  2. import org.junit.experimental.theories.Theories;
  3. import org.junit.experimental.theories.Theory;
  4. import org.junit.experimental.theories.suppliers.TestedOn;
  5. import org.junit.runner.RunWith;
  6.  
  7. @RunWith(Theories.class)
  8. public class SuppliedByTest {
  9.  
  10. @Theory
  11. public void test1(@TestedOn(ints = { 2, 3, 4, 7, 13, 23, 42 }) int i) {
  12. System.out.println(i);
  13. }
  14.  
  15. @Theory
  16. public void test2(@TestedOn(ints = { 6, 3, 4, 7, 13, 23, 42 }) int i) {
  17. System.out.println(i);
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement