KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > jmock > cglib > CGLIBCoreMockTest


1 /* Copyright (c) 2000-2004 jMock.org
2  */

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 JavaDoc {
17             //To change body of implemented methods use File | Settings | File Templates.
18
}
19
20         public String JavaDoc noArgMethod() {
21             return null; //To change body of implemented methods use File | Settings | File Templates.
22
}
23
24         public String JavaDoc oneArgMethod( String JavaDoc arg1 ) {
25             return null; //To change body of implemented methods use File | Settings | File Templates.
26
}
27
28         public String JavaDoc twoArgMethod( String JavaDoc arg1, String JavaDoc arg2 ) throws Throwable JavaDoc {
29             return null; //To change body of implemented methods use File | Settings | File Templates.
30
}
31
32         public void method() {
33         }
34     }
35
36     protected DynamicMock createDynamicMock( String JavaDoc name, InvocationDispatcher dispatcher ) {
37         return new CGLIBCoreMock( ConcreteType.class, name, dispatcher );
38     }
39     
40     protected Class JavaDoc mockedType() {
41         return ConcreteType.class;
42     }
43 }
44
Popular Tags