org.deephacks.tools4j.config.test.ConversionUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tools4j-config-tck Show documentation
Show all versions of tools4j-config-tck Show documentation
Functional Tests for Tools4j Config
package org.deephacks.tools4j.config.test;
import com.google.common.collect.Lists;
import org.deephacks.tools4j.config.model.Bean;
import org.deephacks.tools4j.config.spi.Conversion;
import java.util.Collection;
public class ConversionUtils {
private static Conversion CONVERSION = Conversion.get();
public static Collection toBeans(Object... objects) {
return CONVERSION.convert(Lists.newArrayList(objects), Bean.class);
}
public static Bean toBean(Object object) {
return CONVERSION.convert(object, Bean.class);
}
}