1 package com.mockobjects.vaj; 2 3 import com.ibm.ivj.util.base.*; 4 import com.ibm.ivj.util.builders.*; 5 import junit.framework.*; 6 import java.util.*; 7 import com.mockobjects.*; 8 9 public class MockTypeBuilder extends MockObject implements TypeBuilder { 10 private String myBuilderName; 11 private SourceVerifier mySourceVerifier; 12 private ExpectationCounter mySaveCounter; 13 14 15 public MockTypeBuilder(SourceVerifier verifier, String builderName) { 16 super(); 17 18 mySourceVerifier = verifier; 19 myBuilderName = builderName; 20 mySaveCounter = new ExpectationCounter(builderName + ".save()"); 21 mySaveCounter.setExpected(1); 22 } 23 24 27 public void addMethodBuilder(MethodBuilder arg1) {} 28 29 32 public boolean checkMethodExists(MethodBuilder arg1) throws IvjException { 33 return false; 34 } 35 36 39 public String getBuilderName() { 40 return myBuilderName; 41 } 42 43 46 public com.ibm.ivj.util.builders.MethodBuilder[] getExistingMethods() throws IvjException { 47 return null; 48 } 49 50 53 public String getExistingMethodSource(MethodBuilder arg1) throws IvjException { 54 return null; 55 } 56 57 60 public String getExistingSource() throws IvjException { 61 return null; 62 } 63 64 67 public java.util.Enumeration getMethodBuilders() { 68 return null; 69 } 70 71 74 public String getSource() { 75 return null; 76 } 77 78 81 public boolean isMarkedForDeletion() { 82 return false; 83 } 84 85 88 public void markForDeletion(boolean arg1) {} 89 90 93 public void removeAllMethodBuilders() {} 94 95 98 public void removeMethodBuilder(MethodBuilder arg1) {} 99 100 103 public void save() throws IvjException { 104 mySaveCounter.inc(); 105 } 106 107 110 public void saveMerge() throws IvjException {} 111 112 115 public void setSource(String source) { 116 mySourceVerifier.setSource(myBuilderName,source); 117 } 118 119 122 123 public void verify() { 124 mySaveCounter.verify(); 125 } 126 } 127 | Popular Tags |