spock.genesis.generators.values.ValueGenerator.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spock-genesis Show documentation
Show all versions of spock-genesis Show documentation
Mostly lazy data generators for property based testing using the Spock test framework
The newest version!
package spock.genesis.generators.values
import groovy.transform.CompileStatic
import spock.genesis.generators.InfiniteGenerator
import spock.genesis.generators.InfiniteIterator
@CompileStatic
class ValueGenerator extends InfiniteGenerator {
final T value
ValueGenerator(T value) {
this.value = value
}
InfiniteIterator iterator() {
new InfiniteIterator() {
@Override
T next() {
value
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy