1 /* Copyright (c) 2000-2003, jMock.org. See bundled LICENSE.txt */ 2 package org.jmock.dynamic.support; 3 4 import org.jmock.dynamic.DynamicMock; 5 import org.jmock.dynamic.Invokable; 6 import org.jmock.expectation.AssertMo; 7 import org.jmock.expectation.ExpectationCounter; 8 import org.jmock.expectation.Verifier; 9 10 import java.lang.reflect.Method; 11 12 public class MockDynamicMock 13 extends AssertMo 14 implements DynamicMock { 15 public ExpectationCounter addCalls = new ExpectationCounter("add calls"); 16 17 public void add(Invokable invokable) { 18 assertNotNull("invokable", invokable); 19 addCalls.inc(); 20 } 21 22 public Object proxy() { 23 return null; 24 } 25 26 public void reset() { 27 } 28 29 public ExpectationCounter verifyCalls = new ExpectationCounter("verify"); 30 31 public void verify() { 32 verifyCalls.inc(); 33 } 34 35 public Object invoke(Object arg0, Method arg1, Object[] arg2) 36 throws Throwable { 37 return null; 38 } 39 40 public String toStringResult; 41 42 public String toString() { 43 return toStringResult; 44 } 45 46 public void verifyExpectations() { 47 Verifier.verifyObject(this); 48 } 49 }

This page was automatically generated by Maven