Class ExpectedInvocation

  • All Implemented Interfaces:
    java.io.Serializable

    public final class ExpectedInvocation
    extends java.lang.Object
    implements java.io.Serializable
    One expected invocation. It is composed of the method invoked and the matchers used to expect the arguments.
    See Also:
    Serialized Form
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • matches

        public boolean matches​(Invocation actual)
        Tells if the actual invocation matches this expected invocation. It needs to be on the same mock, method and have the same arguments.
        Parameters:
        actual - the actual invocation to match with the expected one
        Returns:
        the invocation to compare
      • matches

        private boolean matches​(java.lang.Object[] arguments)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getMethod

        public java.lang.reflect.Method getMethod()