Source Code Cross Referenced for Static.java in  » Testing » MockCreator » net » sf » mockcreator » dumby » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » MockCreator » net.sf.mockcreator.dumby 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package net.sf.mockcreator.dumby;
002:
003:        public class Static extends java.lang.Object {
004:            private final static String MOCK_CREATOR_ALERT = "Class net.sf.mockcreator.dumby.Static is a dumby generated by MockCreator. Ensure you dont deploy it onto a real system instead of the actual class";
005:            static public final java.lang.String FOO = "FOO";
006:            static public long BAR = 123L;
007:            static public final java.lang.Character CHAR = new Character('a');
008:            static public final java.text.MessageFormat NODEFCTOR = null;
009:
010:            public Static() {
011:                super ();
012:            }
013:
014:            private static String getClassObjectMethodSignature(String method) {
015:                return "net.sf.mockcreator.dumby.MockStatic" + "#" + method;
016:            }
017:
018:            public/* static: we cannot use static with generic types :E */class Returnablex1062460907 {
019:                private net.sf.mockcreator.IReturnable ir;
020:
021:                public Returnablex1062460907(net.sf.mockcreator.IReturnable ir) {
022:                    this .ir = ir;
023:                }
024:
025:                public void throwable(java.lang.RuntimeException th) {
026:                    ir.throwable(th);
027:                }
028:
029:                public void throwable(java.lang.Error th) {
030:                    ir.throwable(th);
031:                }
032:
033:                public void throwable(java.lang.Throwable th) {
034:                    ir.throwable(th);
035:                }
036:
037:            }
038:
039:            public static void voidMethod() {
040:                java.util.List params = new java.util.ArrayList();
041:
042:                try {
043:
044:                    net.sf.mockcreator.MockKernel.getReturnValue(
045:                            getClassObjectMethodSignature("voidMethod()"),
046:                            params);
047:
048:                } catch (java.lang.RuntimeException e) {
049:                    throw e;
050:                }
051:
052:                catch (java.lang.Error e) {
053:                    throw e;
054:                }
055:
056:                catch (java.lang.Throwable e) {
057:                    throw new net.sf.mockcreator.exceptions.MockException(
058:                            "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.",
059:                            e);
060:                } finally {
061:                    // do nothing ;)
062:                }
063:            }
064:
065:            public Returnablex1062460907 expectVoidMethod() {
066:                java.util.List params = new java.util.ArrayList();
067:
068:                return new Returnablex1062460907(net.sf.mockcreator.MockKernel
069:                        .addExpectedMethodCall(
070:                                getClassObjectMethodSignature("voidMethod()"),
071:                                params));
072:            }
073:
074:            public Returnablex1062460907 expectZeroOrMoreVoidMethod() {
075:                return new Returnablex1062460907(net.sf.mockcreator.MockKernel
076:                        .setDummy(
077:                                getClassObjectMethodSignature("voidMethod()"),
078:                                null));
079:            }
080:
081:            public void voidMethod2() {
082:                throw new net.sf.mockcreator.exceptions.MockException(
083:                        MOCK_CREATOR_ALERT);
084:            }
085:
086:            public void anotherMethod(int p0) {
087:                throw new net.sf.mockcreator.exceptions.MockException(
088:                        MOCK_CREATOR_ALERT);
089:            }
090:
091:            public/* static: we cannot use static with generic types :E */class Returnablex906091987 {
092:                private net.sf.mockcreator.IReturnable ir;
093:
094:                public Returnablex906091987(net.sf.mockcreator.IReturnable ir) {
095:                    this .ir = ir;
096:                }
097:
098:                public void throwable(java.lang.RuntimeException th) {
099:                    ir.throwable(th);
100:                }
101:
102:                public void throwable(java.lang.Error th) {
103:                    ir.throwable(th);
104:                }
105:
106:                public void throwable(java.lang.Throwable th) {
107:                    ir.throwable(th);
108:                }
109:
110:            }
111:
112:            public static void anotherMethod(boolean p0) {
113:                java.util.List params = new java.util.ArrayList();
114:                params.add(new Boolean(p0));
115:
116:                try {
117:
118:                    net.sf.mockcreator.MockKernel
119:                            .getReturnValue(
120:                                    getClassObjectMethodSignature("anotherMethod(boolean)"),
121:                                    params);
122:
123:                } catch (java.lang.RuntimeException e) {
124:                    throw e;
125:                }
126:
127:                catch (java.lang.Error e) {
128:                    throw e;
129:                }
130:
131:                catch (java.lang.Throwable e) {
132:                    throw new net.sf.mockcreator.exceptions.MockException(
133:                            "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.",
134:                            e);
135:                } finally {
136:                    // do nothing ;)
137:                }
138:            }
139:
140:            public Returnablex906091987 expectAnotherMethod(boolean p0) {
141:                java.util.List params = new java.util.ArrayList();
142:                params.add(new Boolean(p0));
143:
144:                return new Returnablex906091987(
145:                        net.sf.mockcreator.MockKernel
146:                                .addExpectedMethodCall(
147:                                        getClassObjectMethodSignature("anotherMethod(boolean)"),
148:                                        params));
149:            }
150:
151:            public Returnablex906091987 acceptAnotherMethod_boolean(
152:                    java.lang.Object p0) {
153:                java.util.List params = new java.util.ArrayList();
154:                params.add(p0);
155:
156:                return new Returnablex906091987(
157:                        net.sf.mockcreator.MockKernel
158:                                .addExpectedMethodCall(
159:                                        getClassObjectMethodSignature("anotherMethod(boolean)"),
160:                                        params));
161:            }
162:
163:            public Returnablex906091987 expectZeroOrMoreAnotherMethod_boolean() {
164:                return new Returnablex906091987(
165:                        net.sf.mockcreator.MockKernel
166:                                .setDummy(
167:                                        getClassObjectMethodSignature("anotherMethod(boolean)"),
168:                                        null));
169:            }
170:
171:            public Returnablex906091987 expectZeroOrMoreAnotherMethod(boolean p0) {
172:                java.util.List params = new java.util.ArrayList();
173:                params.add(new Boolean(p0));
174:
175:                return new Returnablex906091987(
176:                        net.sf.mockcreator.MockKernel
177:                                .setDummy(
178:                                        getClassObjectMethodSignature("anotherMethod(boolean)"),
179:                                        params));
180:            }
181:
182:            public int nonVoidMethod(java.lang.String p0) {
183:                throw new net.sf.mockcreator.exceptions.MockException(
184:                        MOCK_CREATOR_ALERT);
185:            }
186:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.