Class AbstractDynamicMock

java.lang.Object
org.jmock.core.AbstractDynamicMock
All Implemented Interfaces:
DynamicMock, Verifiable
Direct Known Subclasses:
CGLIBCoreMock, CoreMock

public abstract class AbstractDynamicMock extends Object implements DynamicMock
  • Constructor Details

  • Method Details

    • proxy

      public abstract Object proxy()
      Specified by:
      proxy in interface DynamicMock
    • getMockedType

      public Class getMockedType()
      Specified by:
      getMockedType in interface DynamicMock
    • setDefaultStub

      public void setDefaultStub(Stub newDefaultStub)
      Specified by:
      setDefaultStub in interface DynamicMock
    • addInvokable

      public void addInvokable(Invokable invokable)
      Specified by:
      addInvokable in interface DynamicMock
    • reset

      public void reset()
      Specified by:
      reset in interface DynamicMock
    • verify

      public void verify()
      Description copied from interface: Verifiable
      Throw an AssertionFailedException if any expectations have not been met. Implementations of this method must be idempotent: jMock can call this method more than once when verifying expectations at the end of a test.
      Specified by:
      verify in interface Verifiable
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getMockName

      public String getMockName()
    • mockNameFromClass

      public static String mockNameFromClass(Class c)
    • mockInvocation

      protected Object mockInvocation(Invocation invocation) throws Throwable
      Throws:
      Throwable