net.jqwik.engine.providers.ObjectArbitraryProvider Maven / Gradle / Ivy
package net.jqwik.engine.providers;
import java.util.*;
import net.jqwik.api.*;
import net.jqwik.api.providers.*;
public class ObjectArbitraryProvider implements ArbitraryProvider {
@Override
public boolean canProvideFor(TypeUsage targetType) {
return targetType.isOfType(Object.class);
}
@Override
public int priority() {
return 100;
}
@Override
public Set> provideFor(TypeUsage targetType, SubtypeProvider subtypeProvider) {
return Collections.singleton(Arbitraries.fromGenerator(random -> Shrinkable.unshrinkable(new Object())));
}
}