1 3 package test.jmock.cglib; 4 5 import org.jmock.cglib.CGLIBCoreMock; 6 import org.jmock.core.DynamicMock; 7 import org.jmock.core.InvocationDispatcher; 8 9 import test.jmock.core.AbstractDynamicMockTest; 10 import test.jmock.core.DummyInterface; 11 12 13 public class CGLIBCoreMockTest extends AbstractDynamicMockTest 14 { 15 static class ConcreteType implements DummyInterface { 16 public void noArgVoidMethod() throws Throwable { 17 } 19 20 public String noArgMethod() { 21 return null; } 23 24 public String oneArgMethod( String arg1 ) { 25 return null; } 27 28 public String twoArgMethod( String arg1, String arg2 ) throws Throwable { 29 return null; } 31 32 public void method() { 33 } 34 } 35 36 protected DynamicMock createDynamicMock( String name, InvocationDispatcher dispatcher ) { 37 return new CGLIBCoreMock( ConcreteType.class, name, dispatcher ); 38 } 39 40 protected Class mockedType() { 41 return ConcreteType.class; 42 } 43 } 44 | Popular Tags |