KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mockobjects > MockObject


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

31     protected void notYetImplemented() {
32         notYetImplemented(this.getClass().getName());
33     }
34
35     /**
36      * @deprecated
37      */

38     public static void notYetImplemented(String JavaDoc mockName) {
39         AssertMo.notImplemented(mockName);
40     }
41
42     public void verify() {
43         Verifier.verifyObject(this);
44     }
45 }
46
Popular Tags