Schnittstelle PropertyExecutionResult


@API(status=MAINTAINED, since="1.4.0") public interface PropertyExecutionResult
Represents the result of running a property.
  • Methodendetails Linksymbol

    • seed Linksymbol

      Optional<String> seed()
      The seed used to generate randomized parameters.
      Gibt zurück:
      an optional String
    • falsifiedParameters Linksymbol

      Optional<List<Object>> 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 Linksymbol

      The final status of this property
      Gibt zurück:
      status enum
    • throwable Linksymbol

      Optional<Throwable> throwable()
      Will return Optional.empty() if status is anything but FAILED. If FAILED the optional MUST contain a throwable.
    • countChecks Linksymbol

      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 Linksymbol

      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 Linksymbol

      @API(status=MAINTAINED, since="1.3.5") Optional<FalsifiedSample> originalSample()
      Return the original falsified sample if there was one.
      Gibt zurück:
      an optional falsified sample
    • shrunkSample Linksymbol

      @API(status=MAINTAINED, since="1.3.5") Optional<ShrunkFalsifiedSample> shrunkSample()
      Return the shrunk falsified sample if successful shrinking took place.
      Gibt zurück:
      an optional falsified sample
    • mapTo Linksymbol

      PropertyExecutionResult mapTo(PropertyExecutionResult.Status newStatus, @Nullable Throwable throwable)
      Use to change the status of a property execution result in a AroundPropertyHook.
      Parameter:
      newStatus - Status enum
      throwable - Throwable object or null
      Gibt zurück:
      the changed result object
    • mapToSuccessful Linksymbol

      default PropertyExecutionResult 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 Linksymbol

      default PropertyExecutionResult mapToFailed(@Nullable Throwable throwable)
      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 Linksymbol

      default PropertyExecutionResult mapToFailed(String message)
      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 Linksymbol

      default PropertyExecutionResult mapToAborted(@Nullable Throwable throwable)
      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