net.jqwik.engine.execution.CombinedDomainContext Maven / Gradle / Ivy
The newest version!
package net.jqwik.engine.execution;
import java.util.*;
import net.jqwik.api.*;
import net.jqwik.api.configurators.*;
import net.jqwik.api.domains.*;
import net.jqwik.api.providers.*;
class CombinedDomainContext implements DomainContext {
private final List providers = new ArrayList<>();
private final List configurators = new ArrayList<>();
private final List reportingFormats = new ArrayList<>();
CombinedDomainContext(Set domainContexts) {
for (DomainContext domainContext : domainContexts) {
providers.addAll(domainContext.getArbitraryProviders());
configurators.addAll(domainContext.getArbitraryConfigurators());
reportingFormats.addAll(domainContext.getReportingFormats());
}
Collections.sort(configurators);
}
@Override
public Collection getArbitraryProviders() {
return providers;
}
@Override
public Collection getArbitraryConfigurators() {
return configurators;
}
@Override
public Collection getReportingFormats() {
return reportingFormats;
}
}