Interface IMockObject

All Known Implementing Classes:
MockObject

public interface IMockObject
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the default response strategy for this mock object.
    Returns the instance of this mock object.
    Returns the name of this mock object, or null if it has no name.
    Returns the specification that this mock object is attached to.
    Returns the declared type of this mock object.
    boolean
    Tells whether this mock object supports verification of invocations.
    boolean
    matches(Object target, IMockInteraction interaction)
    Tells whether this mock object matches the target of the specified interaction.
  • Method Details

    • getName

      String getName()
      Returns the name of this mock object, or null if it has no name.
      Returns:
      the name of this mock object, or null if it has no name
    • getType

      Class<?> getType()
      Returns the declared type of this mock object.
      Returns:
      the declared type of this mock object
    • getInstance

      Object getInstance()
      Returns the instance of this mock object.
      Returns:
      the instance of this mock object
    • isVerified

      boolean isVerified()
      Tells whether this mock object supports verification of invocations.
      Returns:
      whether this mock object supports verification of invocations
    • getDefaultResponse

      IDefaultResponse getDefaultResponse()
      Returns the default response strategy for this mock object.
      Returns:
      the default response strategy for this mock object
    • getSpecification

      Specification getSpecification()
      Returns the specification that this mock object is attached to.
      Returns:
      the specification that this mock object is attached to
    • matches

      boolean matches(Object target, IMockInteraction interaction)
      Tells whether this mock object matches the target of the specified interaction.
      Parameters:
      target - the target of the interaction
      interaction - an interaction
      Returns:
      whether this mock object matches the target of the specified interaction