net.jqwik.api.arbitraries.SizableArbitrary Maven / Gradle / Ivy
package net.jqwik.api.arbitraries;
import org.apiguardian.api.*;
import net.jqwik.api.*;
import static org.apiguardian.api.API.Status.*;
/**
* Fluent interface to configure arbitraries that have size constraints for generated values, e.g. collections and arrays.
*/
@API(status = MAINTAINED, since = "1.0")
public interface SizableArbitrary extends Arbitrary {
/**
* Fix the size to {@code size}.
*/
default SizableArbitrary ofSize(int size) {
return ofMinSize(size).ofMaxSize(size);
}
/**
* Set lower size boundary {@code minSize} (included).
*/
SizableArbitrary ofMinSize(int minSize);
/**
* Set upper size boundary {@code maxSize} (included).
*/
SizableArbitrary ofMaxSize(int maxSize);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy