Package org.mockito

Interface MockingDetails

  • All Known Implementing Classes:
    DefaultMockingDetails

    public interface MockingDetails
    Provides mocking information. For example, you can identify whether a particular object is either a mock or a spy.
    Since:
    1.9.5
    • Method Detail

      • isMock

        boolean isMock()
        Informs if the object is a mock. isMock() for null input returns false.
        Returns:
        true if the object is a mock or a spy.
        Since:
        1.9.5
      • isSpy

        boolean isSpy()
        Informs if the object is a spy. isSpy() for null input returns false.
        Returns:
        true if the object is a spy.
        Since:
        1.9.5
      • getInvocations

        java.util.Collection<Invocation> getInvocations()
        Provides a collection of methods indicating the invocations of the object
        Returns:
        collection of Invocation representing the invocations for the object.
        Since:
        1.10.0