autofixture.generators.StringGenerator Maven / Gradle / Ivy
package autofixture.generators;
import autofixture.interfaces.FixtureContract;
import autofixture.interfaces.InstanceGenerator;
import autofixture.interfaces.InstanceType;
import java.util.UUID;
public class StringGenerator implements InstanceGenerator {
@Override
@SuppressWarnings("unchecked")
public T next(final InstanceType clazz, final FixtureContract fixture) {
return (T) UUID.randomUUID().toString();
}
@Override
public boolean appliesTo(final InstanceType clazz) {
return clazz.isRawTypeAssignableFrom(String.class);
}
@Override
public void setOmittingAutoProperties(final boolean isOn) {
}
}