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 message, int o1, int o2) { 9 AssertMo.assertEquals(message, o1, o2); 10 } 11 12 protected void assertEquals(String message, Object o1, Object o2) { 13 AssertMo.assertEquals(message, o1, o2); 14 } 15 16 protected void assertTrue(String message, boolean condition) { 17 AssertMo.assertTrue(message, condition); 18 } 19 20 protected void fail(String message) { 21 AssertMo.fail(message); 22 } 23 24 public void notImplemented() { 25 AssertMo.notImplemented(this.getClass().getName()); 26 } 27 28 31 protected void notYetImplemented() { 32 notYetImplemented(this.getClass().getName()); 33 } 34 35 38 public static void notYetImplemented(String mockName) { 39 AssertMo.notImplemented(mockName); 40 } 41 42 public void verify() { 43 Verifier.verifyObject(this); 44 } 45 } 46 | Popular Tags |