Skip to content

Commit

Permalink
added some javadoc to the crossProduct helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
aaschmid committed Feb 18, 2016
1 parent 13a1ce8 commit 87dacb5
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,19 @@ public static <E extends Enum<E>> Object[][] testForEach(Class<E> enumClass) {
}
return testForEach((Object[]) enumClass.getEnumConstants());
}

/**
* Creates a dataprovider test for each combination of elements in two data providers.
* Creates a dataprovider test for each combination of elements of the two provided data providers.
*
* <pre>
* <code>
* Object[][] r = crossProduct(dataProviderMethod1, dataProviderMethod2);
* </code>
* </pre>
*
* @param rows1 of first dataprovider which should be cross producted with the second
* @param rows2 of second dataprovider which should be cross producted with the first
* @return an {@link Object} array array containing the cross product of the given {@code rows}
*/
public static Object[][] crossProduct(Object[][] rows1, Object[][] rows2) {
Object[][] rowsOut = new Object[rows1.length * rows2.length][];
Expand Down

0 comments on commit 87dacb5

Please sign in to comment.