@API(status=EXPERIMENTAL,
since="1.0")
public interface PropertyExecutionResult
Modifier and Type | Interface and Description |
---|---|
static class |
PropertyExecutionResult.Status
Status of executing a single test or container.
|
Modifier and Type | Method and Description |
---|---|
int |
countChecks()
The number of tries for which parameters were created
and the property method run.
|
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.
|
java.util.Optional<java.util.List<java.lang.Object>> |
falsifiedParameters()
The potentially shrunk list of parameters that falsified this property.
|
PropertyExecutionResult |
mapTo(PropertyExecutionResult.Status newStatus,
java.lang.Throwable throwable)
Use to change the status of a property execution result in a
AroundPropertyHook.
|
default PropertyExecutionResult |
mapToAborted(java.lang.Throwable throwable)
Use to change the status of a property execution to PropertyExecutionResult.Status.ABORTED
in a AroundPropertyHook.
|
default PropertyExecutionResult |
mapToFailed(java.lang.String message)
Use to change the status of a successful property execution to PropertyExecutionResult.Status.FAILED
in a AroundPropertyHook.
|
default PropertyExecutionResult |
mapToFailed(java.lang.Throwable throwable)
Use to change the status of a successful property execution to PropertyExecutionResult.Status.FAILED
in a AroundPropertyHook.
|
default PropertyExecutionResult |
mapToSuccessful()
Use to change the status of a failed property to PropertyExecutionResult.Status.SUCCESSFUL
in a AroundPropertyHook.
|
java.util.Optional<java.lang.String> |
seed()
The seed used to generate randomized parameters.
|
PropertyExecutionResult.Status |
status()
The final status of this property
|
java.util.Optional<java.lang.Throwable> |
throwable()
Will return
Optional.empty() if status is anything but FAILED. |
java.util.Optional<java.lang.String> seed()
@API(status=EXPERIMENTAL, since="1.3.3") java.util.Optional<java.util.List<java.lang.Object>> falsifiedParameters()
PropertyExecutionResult.Status status()
java.util.Optional<java.lang.Throwable> throwable()
Optional.empty()
if status is anything but FAILED.
If FAILED the optional MUST contain a throwable.@API(status=EXPERIMENTAL, since="1.2.4") int countChecks()
@API(status=EXPERIMENTAL, since="1.2.4") int countTries()
@API(status=EXPERIMENTAL, since="1.2.4") PropertyExecutionResult mapTo(PropertyExecutionResult.Status newStatus, java.lang.Throwable throwable)
newStatus
- Status enumthrowable
- Throwable object or null@API(status=EXPERIMENTAL, since="1.2.4") default PropertyExecutionResult mapToSuccessful()
@API(status=EXPERIMENTAL, since="1.2.4") default PropertyExecutionResult mapToFailed(java.lang.Throwable throwable)
throwable
- Throwable object or null@API(status=EXPERIMENTAL, since="1.2.4") default PropertyExecutionResult mapToFailed(java.lang.String message)
message
- a String that serves as message of an assertion error@API(status=EXPERIMENTAL, since="1.2.4") default PropertyExecutionResult mapToAborted(java.lang.Throwable throwable)
throwable
- Throwable object or null