Interface ObjectTestContract

All Known Implementing Classes:
EqualsAndHashcodeContractImpl, SerializableContractImpl, ToStringContractImpl
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

An ObjectTestContract provides a method that again runs a number of asserts regarding the canonical Object method.
Author:
Oliver Wolff
  • Method Details

    • assertContract

      void assertContract(ParameterizedInstantiator<?> instantiator, ObjectTestConfig objectTestConfig)
      Checks the concrete contract.
      Parameters:
      instantiator - must not be null. The actual type of the Object is not of interest, because we check Object contracts
      objectTestConfig - optional configuration configuring the tests