@API(status=MAINTAINED,
since="1.4.0")
public interface TryExecutionResult
Modifier and Type | Interface and Description |
---|---|
static class |
TryExecutionResult.Status
Status of running a single try.
|
Modifier and Type | Method and Description |
---|---|
static TryExecutionResult |
falsified(java.lang.Throwable throwable)
Create a result that falsified the current property and will immediately
finish this property as failed.
|
default java.util.List<java.lang.String> |
footnotes()
List of footnotes to be added to failure report
|
static TryExecutionResult |
invalid()
Create a result that calls out the current parameter list as invalid.
|
static TryExecutionResult |
invalid(java.lang.Throwable throwable)
Create a result that calls out the current parameter list as invalid.
|
default boolean |
isFalsified() |
default boolean |
isInvalid() |
default boolean |
isSatisfied() |
static TryExecutionResult |
satisfied()
Create a result that satisfies the current property with the current parameter set.
|
static TryExecutionResult |
satisfied(boolean shouldPropertyFinishEarly)
Create a result that satisfies the current property and will immediately
finish this property as successful.
|
boolean |
shouldPropertyFinishEarly() |
TryExecutionResult.Status |
status() |
java.util.Optional<java.lang.Throwable> |
throwable()
Will return
Optional.empty() if status is anything but TryExecutionResult.Status.FALSIFIED. |
default TryExecutionResult |
withFootnotes(java.util.Collection<java.lang.String> otherFootnotes)
Add one or more footnotes to be added to failure report
|
static TryExecutionResult satisfied()
static TryExecutionResult satisfied(boolean shouldPropertyFinishEarly)
static TryExecutionResult falsified(@Nullable java.lang.Throwable throwable)
throwable
- The throwable to describe the reason of falsificationstatic TryExecutionResult invalid(@Nullable java.lang.Throwable throwable)
throwable
- A (potentially null) exception. Usually of type TestAbortedException.static TryExecutionResult invalid()
default boolean isSatisfied()
default boolean isFalsified()
default boolean isInvalid()
@API(status=MAINTAINED, since="1.5.5") default java.util.List<java.lang.String> footnotes()
@API(status=MAINTAINED, since="1.5.5") default TryExecutionResult withFootnotes(java.util.Collection<java.lang.String> otherFootnotes)
otherFootnotes
- a list of footnotes to addTryExecutionResult.Status status()
java.util.Optional<java.lang.Throwable> throwable()
Optional.empty()
if status is anything but TryExecutionResult.Status.FALSIFIED.boolean shouldPropertyFinishEarly()