net.jqwik.web.WebDomainArbitraryProvider Maven / Gradle / Ivy
package net.jqwik.web;
import java.util.*;
import net.jqwik.api.*;
import net.jqwik.api.providers.*;
import net.jqwik.web.api.*;
public class WebDomainArbitraryProvider implements ArbitraryProvider {
@Override
public boolean canProvideFor(TypeUsage targetType) {
return targetType.isAssignableFrom(String.class) && targetType.findAnnotation(WebDomain.class).isPresent();
}
@Override
public Set> provideFor(TypeUsage targetType, SubtypeProvider subtypeProvider) {
return Collections.>singleton(Web.webDomains());
}
@Override
public int priority() {
return 5;
}
}