Package net.jqwik.api.lifecycle
Interface PropertyAttributes
-
@API(status=EXPERIMENTAL, since="1.3.4") public interface PropertyAttributes
Represents a property method's attributes which are set (or not) in attributes of the Property annotation.This object can be used to query, set or change a property's attribute during the AroundPropertyHook lifecycle hook.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Optional<AfterFailureMode>
afterFailure()
The after failure mode of the property at hand.java.util.Optional<EdgeCasesMode>
edgeCases()
The edge cases mode of the property at hand.java.util.Optional<GenerationMode>
generation()
The generation mode of the property at hand.java.util.Optional<java.lang.Integer>
maxDiscardRatio()
The maximum allowed discard ration in the property at hand.java.util.Optional<java.lang.String>
seed()
The random seed used when running the property at hand.void
setAfterFailure(AfterFailureMode afterFailureMode)
void
setEdgeCases(EdgeCasesMode edgeCasesMode)
void
setGeneration(GenerationMode generationMode)
void
setMaxDiscardRatio(java.lang.Integer maxDiscardRatio)
void
setSeed(java.lang.String seed)
void
setShrinking(ShrinkingMode shrinkingMode)
void
setStereotype(java.lang.String stereotype)
void
setTries(java.lang.Integer tries)
java.util.Optional<ShrinkingMode>
shrinking()
The shrinking mode of the property at hand.java.util.Optional<java.lang.String>
stereotype()
The stereotype of the property at hand.java.util.Optional<java.lang.Integer>
tries()
The number of tries to be run in the property at hand.
-
-
-
Method Detail
-
tries
java.util.Optional<java.lang.Integer> tries()
The number of tries to be run in the property at hand. Only present when set explicitly through Property.tries() or setTries(Integer).jqwik may override an explicit tries value if exhaustive or data-driven generation is chosen.
- Returns:
- optional number of tries
-
maxDiscardRatio
java.util.Optional<java.lang.Integer> maxDiscardRatio()
The maximum allowed discard ration in the property at hand. Only present when set explicitly through Property.maxDiscardRatio() or setMaxDiscardRatio(Integer).- Returns:
- optional maximum discard ratio
-
shrinking
java.util.Optional<ShrinkingMode> shrinking()
The shrinking mode of the property at hand. Only present when set explicitly through Property.shrinking() or setShrinking(ShrinkingMode).- Returns:
- optional shrinking mode
-
generation
java.util.Optional<GenerationMode> generation()
The generation mode of the property at hand. Only present when set explicitly through Property.generation() or setGeneration(GenerationMode).- Returns:
- optional generation mode
-
afterFailure
java.util.Optional<AfterFailureMode> afterFailure()
The after failure mode of the property at hand. Only present when set explicitly through Property.afterFailure() or setAfterFailure(AfterFailureMode).- Returns:
- optional after failure mode
-
edgeCases
java.util.Optional<EdgeCasesMode> edgeCases()
The edge cases mode of the property at hand. Only present when set explicitly through Property.edgeCases() or setEdgeCases(EdgeCasesMode).- Returns:
- optional edge cases mode
-
stereotype
java.util.Optional<java.lang.String> stereotype()
The stereotype of the property at hand. Only present when set explicitly through Property.stereotype() or setStereotype(String).- Returns:
- optional stereotype
-
seed
java.util.Optional<java.lang.String> seed()
The random seed used when running the property at hand. Only present when set explicitly through Property.seed() or setSeed(String).- Returns:
- optional random seed
-
setTries
void setTries(java.lang.Integer tries)
-
setMaxDiscardRatio
void setMaxDiscardRatio(java.lang.Integer maxDiscardRatio)
-
setShrinking
void setShrinking(ShrinkingMode shrinkingMode)
-
setGeneration
void setGeneration(GenerationMode generationMode)
-
setAfterFailure
void setAfterFailure(AfterFailureMode afterFailureMode)
-
setEdgeCases
void setEdgeCases(EdgeCasesMode edgeCasesMode)
-
setStereotype
void setStereotype(java.lang.String stereotype)
-
setSeed
void setSeed(java.lang.String seed)
-
-