KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jmock > expectation > MockObject


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

3 package org.jmock.expectation;
4
5 import org.jmock.core.Verifiable;
6 import org.jmock.util.Verifier;
7
8
9 public abstract class MockObject implements Verifiable
10 {
11
12     protected void assertEquals( String JavaDoc message, int o1, int o2 ) {
13         AssertMo.assertEquals(message, o1, o2);
14     }
15
16     protected void assertEquals( String JavaDoc message, Object JavaDoc o1, Object JavaDoc o2 ) {
17         AssertMo.assertEquals(message, o1, o2);
18     }
19
20     protected void assertTrue( String JavaDoc message, boolean condition ) {
21         AssertMo.assertTrue(message, condition);
22     }
23
24     protected void fail( String JavaDoc message ) {
25         AssertMo.fail(message);
26     }
27
28     public void notImplemented() {
29         AssertMo.notImplemented(this.getClass().getName());
30     }
31
32     /**
33      * @deprecated
34      */

35     protected void notYetImplemented() {
36         notYetImplemented(this.getClass().getName());
37     }
38
39     /**
40      * @deprecated
41      */

42     public static void notYetImplemented( String JavaDoc mockName ) {
43         AssertMo.notImplemented(mockName);
44     }
45
46     public void verify() {
47         Verifier.verifyObject(this);
48     }
49 }
50
Popular Tags