1 package com.mockobjects.vaj; 2 3 import com.ibm.ivj.util.base.*; 4 import java.util.*; 5 6 import com.mockobjects.*; 7 8 public class MockTypeEdition extends MockObject implements TypeEdition { 9 public static final Date DEFAULT_EDITION = new Date(); 10 String myVersionName = null; 11 Date myEditionStamp; 12 13 ExpectationCounter myLoadCalls = new ExpectationCounter("loadIntoWorkspace"); 14 15 public MockTypeEdition() { 16 setupEditionStamp(DEFAULT_EDITION); 17 setupVersionName(null); 18 } 19 20 public MockTypeEdition(String versionName) { 21 setupEditionStamp(DEFAULT_EDITION); 22 setupVersionName(versionName); 23 } 24 25 public MockTypeEdition(String versionName, Date edition) { 26 setupEditionStamp(edition); 27 setupVersionName(versionName); 28 } 29 30 33 public com.ibm.ivj.util.base.TypeEdition[] getAllEditions() throws com.ibm.ivj.util.base.IvjException { 34 return null; 35 } 36 37 40 public String getDeveloperName() throws com.ibm.ivj.util.base.IvjException { 41 return null; 42 } 43 44 47 public com.ibm.ivj.util.base.Type getLoaded() throws com.ibm.ivj.util.base.IvjException { 48 return null; 49 } 50 51 54 public String getName() { 55 return null; 56 } 57 58 61 public String getOwnerName() throws com.ibm.ivj.util.base.IvjException { 62 return null; 63 } 64 65 68 public String getSimpleName() { 69 return null; 70 } 71 72 75 public String getVersionName() { 76 return myVersionName; 77 } 78 79 82 public java.util.Date getVersionStamp() { 83 return myEditionStamp; 84 } 85 86 89 public boolean isEdition() throws com.ibm.ivj.util.base.IvjException { 90 return false; 91 } 92 93 96 public boolean isLoaded() throws com.ibm.ivj.util.base.IvjException { 97 return false; 98 } 99 100 103 public boolean isPackage() { 104 return false; 105 } 106 107 110 public boolean isProject() { 111 return false; 112 } 113 114 117 public boolean isType() { 118 return false; 119 } 120 121 124 public boolean isVersion() throws com.ibm.ivj.util.base.IvjException { 125 return false; 126 } 127 128 131 public void loadIntoWorkspace() throws com.ibm.ivj.util.base.IvjException { 132 myLoadCalls.inc(); 133 } 134 135 public void setExpectedLoadIntoWorkspaceCalls(int calls) { 136 myLoadCalls.setExpected(calls); 137 } 138 139 public void setupEditionStamp(Date edition) { 140 myEditionStamp = edition; 141 } 142 143 public void setupVersionName(String versionName) { 144 myVersionName = versionName; 145 } 146 147 public String toString() { 148 return this.getClass() + "V:" + getVersionName() + "E:" + getVersionStamp(); 149 } 150 151 154 public void verify() { 155 myLoadCalls.verify(); 156 } 157 } 158 | Popular Tags |