001: package net.sf.mockcreator.dumby;
002:
003: public class Dumby1 extends java.lang.Object implements
004: net.sf.mockcreator.dumby.Dumby0 {
005: private final static String MOCK_CREATOR_ALERT = "Class net.sf.mockcreator.dumby.Dumby1 is a dumby generated by MockCreator. Ensure you dont deploy it onto a real system instead of the actual class";
006: public boolean prop;
007: static public java.lang.String FOOBAR = "FOOBAR";
008: protected boolean pprop;
009: protected static java.lang.String pFOOBAR = "pFOOBAR";
010: static public char FOOBAR1 = 'z';
011: static public char backSlash = '\\';
012: static public java.lang.Character FOOBAR2 = new Character('x');
013: static public long FOOBAR3 = 4514054017009829399L;
014: static public java.lang.Long[][] FOOBAR4 = null;
015: static public double FOOBAR5 = 1.0E200;
016: static public float FOOBAR6 = 1.0E25f;
017:
018: public Dumby1() {
019: super ();
020: }
021:
022: private static String getClassObjectMethodSignature(String method) {
023: return "net.sf.mockcreator.dumby.MockDumby1" + "#" + method;
024: }
025:
026: public boolean getFalse() {
027: throw new net.sf.mockcreator.exceptions.MockException(
028: MOCK_CREATOR_ALERT);
029: }
030:
031: public/* static: we cannot use static with generic types :E */class Returnable2035144559 {
032: private net.sf.mockcreator.IReturnable ir;
033:
034: public Returnable2035144559(net.sf.mockcreator.IReturnable ir) {
035: this .ir = ir;
036: }
037:
038: public void throwable(java.io.IOException th) {
039: ir.throwable(th);
040: }
041:
042: public void throwable(java.lang.RuntimeException th) {
043: ir.throwable(th);
044: }
045:
046: public void throwable(java.lang.Error th) {
047: ir.throwable(th);
048: }
049:
050: public void throwable(java.lang.Throwable th) {
051: ir.throwable(th);
052: }
053:
054: public void returns(java.lang.String v) {
055: ir.returns(v);
056: }
057:
058: }
059:
060: public static java.lang.String getMe() throws java.io.IOException {
061: java.util.List params = new java.util.ArrayList();
062:
063: try {
064: java.lang.Object ret = net.sf.mockcreator.MockKernel
065: .getReturnValue(
066: getClassObjectMethodSignature("getMe()"),
067: params);
068:
069: return (java.lang.String) ret;
070:
071: } catch (java.io.IOException e) {
072: throw e;
073: }
074:
075: catch (java.lang.RuntimeException e) {
076: throw e;
077: }
078:
079: catch (java.lang.Error e) {
080: throw e;
081: }
082:
083: catch (java.lang.Throwable e) {
084: throw new net.sf.mockcreator.exceptions.MockException(
085: "This class of exception is not declared in method signature. Its not a RuntimeException either. Thus it cannot be configured to throw from the method. Fix the test please.",
086: e);
087: } finally {
088: // do nothing ;)
089: }
090: }
091:
092: public Returnable2035144559 expectGetMe_returning_String() {
093: java.util.List params = new java.util.ArrayList();
094:
095: return new Returnable2035144559(net.sf.mockcreator.MockKernel
096: .addExpectedMethodCall(
097: getClassObjectMethodSignature("getMe()"),
098: params));
099: }
100:
101: public Returnable2035144559 expectZeroOrMoreGetMe_returning_String() {
102: return new Returnable2035144559(net.sf.mockcreator.MockKernel
103: .setDummy(getClassObjectMethodSignature("getMe()"),
104: null));
105: }
106:
107: }
|