Package net.jqwik.api.lifecycle
Schnittstelle PropertyExecutionResult
@API(status=MAINTAINED,
since="1.4.0")
public interface PropertyExecutionResult
Represents the result of running a property.
-
Verschachtelte Klassen - Übersicht
Modifizierer und TypSchnittstelleBeschreibungstatic enum
Status of executing a single test or container. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungint
The number of tries for which parameters were created and the property method run.int
The number of tries for which parameters were created and the property method run and which were not aborted, e.g. through a failing assumption.The potentially shrunk list of parameters that falsified this property.mapTo
(PropertyExecutionResult.Status newStatus, @Nullable Throwable throwable) Use to change the status of a property execution result in a AroundPropertyHook.default PropertyExecutionResult
mapToAborted
(@Nullable Throwable throwable) Use to change the status of a property execution to PropertyExecutionResult.Status.ABORTED in a AroundPropertyHook.default PropertyExecutionResult
mapToFailed
(@Nullable Throwable throwable) Use to change the status of a successful property execution to PropertyExecutionResult.Status.FAILED in a AroundPropertyHook.default PropertyExecutionResult
mapToFailed
(String message) Use to change the status of a successful property execution to PropertyExecutionResult.Status.FAILED in a AroundPropertyHook.default PropertyExecutionResult
Use to change the status of a failed property to PropertyExecutionResult.Status.SUCCESSFUL in a AroundPropertyHook.Return the original falsified sample if there was one.seed()
The seed used to generate randomized parameters.Return the shrunk falsified sample if successful shrinking took place.status()
The final status of this propertyWill returnOptional.empty()
if status is anything but FAILED.
-
Methodendetails
-
seed
The seed used to generate randomized parameters.- Gibt zurück:
- an optional String
-
falsifiedParameters
The potentially shrunk list of parameters that falsified this property.The parameter list returned contains the actual parameters used during the property run. If one or more parameters were changed during the run, this change is visible here.
- Gibt zurück:
- an optional list of parameters
-
status
PropertyExecutionResult.Status status()The final status of this property- Gibt zurück:
- status enum
-
throwable
Will returnOptional.empty()
if status is anything but FAILED. If FAILED the optional MUST contain a throwable. -
countChecks
int countChecks()The number of tries for which parameters were created and the property method run.- Gibt zurück:
- an number equal to or greater than 0
-
countTries
int countTries()The number of tries for which parameters were created and the property method run and which were not aborted, e.g. through a failing assumption.- Gibt zurück:
- an number equal to or greater than 0
-
originalSample
Return the original falsified sample if there was one.- Gibt zurück:
- an optional falsified sample
-
shrunkSample
Return the shrunk falsified sample if successful shrinking took place.- Gibt zurück:
- an optional falsified sample
-
mapTo
PropertyExecutionResult mapTo(PropertyExecutionResult.Status newStatus, @Nullable Throwable throwable) Use to change the status of a property execution result in a AroundPropertyHook.- Parameter:
newStatus
- Status enumthrowable
- Throwable object or null- Gibt zurück:
- the changed result object
-
mapToSuccessful
Use to change the status of a failed property to PropertyExecutionResult.Status.SUCCESSFUL in a AroundPropertyHook.- Gibt zurück:
- the changed result object
-
mapToFailed
Use to change the status of a successful property execution to PropertyExecutionResult.Status.FAILED in a AroundPropertyHook.- Parameter:
throwable
- Throwable object or null- Gibt zurück:
- the changed result object
-
mapToFailed
Use to change the status of a successful property execution to PropertyExecutionResult.Status.FAILED in a AroundPropertyHook.- Parameter:
message
- a String that serves as message of an assertion error- Gibt zurück:
- the changed result object
-
mapToAborted
Use to change the status of a property execution to PropertyExecutionResult.Status.ABORTED in a AroundPropertyHook.- Parameter:
throwable
- Throwable object or null- Gibt zurück:
- the changed result object
-