net.thucydides.core.steps.StepArgumentWriter Maven / Gradle / Ivy
package net.thucydides.core.steps;
import org.apache.commons.lang3.ArrayUtils;
public class StepArgumentWriter {
public static String readableFormOf(Object arg) {
if (arg == null) {
return "";
} else if (arg.getClass().isArray()) {
return ArrayUtils.toString(arg);
} else {
try {
return arg.toString();
} catch (Throwable e) {
return "<" + arg.getClass().getName() + ">";
}
}
}
}