junitparams.internal.parameters.toarray.SimpleIterableResultToArray Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of JUnitParams Show documentation
Show all versions of JUnitParams Show documentation
Better parameterised tests for JUnit
package junitparams.internal.parameters.toarray;
import java.util.ArrayList;
import java.util.List;
class SimpleIterableResultToArray implements ResultToArray {
private final Object result;
SimpleIterableResultToArray(Object result) {
this.result = result;
}
@Override
public boolean isApplicable() {
return Iterable.class.isAssignableFrom(result.getClass());
}
@Override
public Object[] convert() {
try {
List