com.pholser.junit.quickcheck.internal.SeededValue Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of junit-quickcheck-core Show documentation
Show all versions of junit-quickcheck-core Show documentation
Property-based testing, JUnit-style: core functionality
package com.pholser.junit.quickcheck.internal;
import com.pholser.junit.quickcheck.internal.generator.PropertyParameterGenerationContext;
public final class SeededValue {
private final PropertyParameterGenerationContext p;
private final Object value;
private final long seed;
public SeededValue(PropertyParameterGenerationContext p) {
this.p = p;
this.value = p.generate();
this.seed = p.effectiveSeed();
}
public PropertyParameterGenerationContext parameter() {
return p;
}
public Object value() {
return value;
}
public long seed() {
return seed;
}
@Override public String toString() {
return String.format(
"%s = [%s], seed = %d",
p.name(),
String.valueOf(value),
seed);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy