Source Code Cross Referenced for CompositeTimeSpringUnitTest.java in  » Testing » springunit-0.6 » org » springunit » examples » 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 » springunit 0.6 » org.springunit.examples 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.springunit.examples;
002:
003:        import org.springunit.framework.SpringUnitContext;
004:        import org.springunit.framework.SpringUnitTest;
005:
006:        public class CompositeTimeSpringUnitTest extends SpringUnitTest {
007:
008:            public SpringUnitContext getCompositeTimeSpringUnitTest() {
009:                return this .compositeTimeSpringUnitTest;
010:            }
011:
012:            public void setCompositeTimeSpringUnitTest(
013:                    SpringUnitContext compositeTimeSpringUnitTest) {
014:                this .compositeTimeSpringUnitTest = compositeTimeSpringUnitTest;
015:            }
016:
017:            public void testIncrementHours000000000() throws Exception {
018:                runIncrementHours();
019:            }
020:
021:            public void testIncrementHours235959999() throws Exception {
022:                runIncrementHours();
023:            }
024:
025:            public void testIncrementMinutes000000000() throws Exception {
026:                runIncrementMinutes();
027:            }
028:
029:            public void testIncrementMinutes235959999() throws Exception {
030:                runIncrementMinutes();
031:            }
032:
033:            public void testIncrementMinutes225959999() throws Exception {
034:                runIncrementMinutes();
035:            }
036:
037:            public void testIncrementSeconds000000000() throws Exception {
038:                runIncrementSeconds();
039:            }
040:
041:            public void testIncrementSeconds235959999() throws Exception {
042:                runIncrementSeconds();
043:            }
044:
045:            public void testIncrementSeconds235859999() throws Exception {
046:                runIncrementSeconds();
047:            }
048:
049:            public void testIncrementMillis000000000() throws Exception {
050:                runIncrementMillis();
051:            }
052:
053:            public void testIncrementMillis235959999() throws Exception {
054:                runIncrementMillis();
055:            }
056:
057:            public void testIncrementMillis235958999() throws Exception {
058:                runIncrementMillis();
059:            }
060:
061:            public void testDecrementHours000000000() throws Exception {
062:                runDecrementHours();
063:            }
064:
065:            public void testDecrementHours235959999() throws Exception {
066:                runDecrementHours();
067:            }
068:
069:            public void testDecrementHours010000000() throws Exception {
070:                runDecrementHours();
071:            }
072:
073:            public void testDecrementMinutes000000000() throws Exception {
074:                runDecrementMinutes();
075:            }
076:
077:            public void testDecrementMinutes235959999() throws Exception {
078:                runDecrementMinutes();
079:            }
080:
081:            public void testDecrementMinutes010000000() throws Exception {
082:                runDecrementMinutes();
083:            }
084:
085:            public void testDecrementSeconds000000000() throws Exception {
086:                runDecrementSeconds();
087:            }
088:
089:            public void testDecrementSeconds235959999() throws Exception {
090:                runDecrementSeconds();
091:            }
092:
093:            public void testDecrementSeconds000100000() throws Exception {
094:                runDecrementSeconds();
095:            }
096:
097:            public void testDecrementMillis000000000() throws Exception {
098:                runDecrementMillis();
099:            }
100:
101:            public void testDecrementMillis235959999() throws Exception {
102:                runDecrementMillis();
103:            }
104:
105:            public void testDecrementMillis000001000() throws Exception {
106:                runDecrementMillis();
107:            }
108:
109:            protected void runIncrementHours() throws Exception {
110:                CompositeTime subject = getObject("subject");
111:                CompositeTime expected = getObject("expected");
112:                Exception expectedException = getObject("expectedException");
113:                boolean expectedOverflow = getObject("expectedOverflow");
114:                try {
115:                    boolean overflow = subject.incrementHours();
116:                    if (expectedException != null) {
117:                        fail("Exception not thrown");
118:                    }
119:                    assertEquals(expected, subject);
120:                    assertEquals(expectedOverflow, overflow);
121:                } catch (Exception ex) {
122:                    if (expectedException == null) {
123:                        throw ex;
124:                    } else {
125:                        assertTrue(expectedException.getClass()
126:                                .isAssignableFrom(ex.getClass()));
127:                    }
128:                }
129:            }
130:
131:            protected void runIncrementMinutes() throws Exception {
132:                CompositeTime subject = getObject("subject");
133:                CompositeTime expected = getObject("expected");
134:                Exception expectedException = getObject("expectedException");
135:                boolean expectedOverflow = getObject("expectedOverflow");
136:                try {
137:                    boolean overflow = subject.incrementMinutes();
138:                    if (expectedException != null) {
139:                        fail("Exception not thrown");
140:                    }
141:                    assertEquals(expected, subject);
142:                    assertEquals(expectedOverflow, overflow);
143:                } catch (Exception ex) {
144:                    if (expectedException == null) {
145:                        throw ex;
146:                    } else {
147:                        assertTrue(expectedException.getClass()
148:                                .isAssignableFrom(ex.getClass()));
149:                    }
150:                }
151:            }
152:
153:            protected void runIncrementSeconds() throws Exception {
154:                CompositeTime subject = getObject("subject");
155:                CompositeTime expected = getObject("expected");
156:                Exception expectedException = getObject("expectedException");
157:                boolean expectedOverflow = getObject("expectedOverflow");
158:                try {
159:                    boolean overflow = subject.incrementSeconds();
160:                    if (expectedException != null) {
161:                        fail("Exception not thrown");
162:                    }
163:                    assertEquals(expected, subject);
164:                    assertEquals(expectedOverflow, overflow);
165:                } catch (Exception ex) {
166:                    if (expectedException == null) {
167:                        throw ex;
168:                    } else {
169:                        assertTrue(expectedException.getClass()
170:                                .isAssignableFrom(ex.getClass()));
171:                    }
172:                }
173:            }
174:
175:            protected void runIncrementMillis() throws Exception {
176:                CompositeTime subject = getObject("subject");
177:                CompositeTime expected = getObject("expected");
178:                Exception expectedException = getObject("expectedException");
179:                boolean expectedOverflow = getObject("expectedOverflow");
180:                try {
181:                    boolean overflow = subject.incrementMillis();
182:                    if (expectedException != null) {
183:                        fail("Exception not thrown");
184:                    }
185:                    assertEquals(expected, subject);
186:                    assertEquals(expectedOverflow, overflow);
187:                } catch (Exception ex) {
188:                    if (expectedException == null) {
189:                        throw ex;
190:                    } else {
191:                        assertTrue(expectedException.getClass()
192:                                .isAssignableFrom(ex.getClass()));
193:                    }
194:                }
195:            }
196:
197:            protected void runDecrementHours() throws Exception {
198:                CompositeTime subject = getObject("subject");
199:                CompositeTime expected = getObject("expected");
200:                Exception expectedException = getObject("expectedException");
201:                boolean expectedUnderflow = getObject("expectedUnderflow");
202:                try {
203:                    boolean underflow = subject.decrementHours();
204:                    if (expectedException != null) {
205:                        fail("Exception not thrown");
206:                    }
207:                    assertEquals(expected, subject);
208:                    assertEquals(expectedUnderflow, underflow);
209:                } catch (Exception ex) {
210:                    if (expectedException == null) {
211:                        throw ex;
212:                    } else {
213:                        assertTrue(expectedException.getClass()
214:                                .isAssignableFrom(ex.getClass()));
215:                    }
216:                }
217:            }
218:
219:            protected void runDecrementMinutes() throws Exception {
220:                CompositeTime subject = getObject("subject");
221:                CompositeTime expected = getObject("expected");
222:                Exception expectedException = getObject("expectedException");
223:                boolean expectedUnderflow = getObject("expectedUnderflow");
224:                try {
225:                    boolean underflow = subject.decrementMinutes();
226:                    if (expectedException != null) {
227:                        fail("Exception not thrown");
228:                    }
229:                    assertEquals(expected, subject);
230:                    assertEquals(expectedUnderflow, underflow);
231:                } catch (Exception ex) {
232:                    if (expectedException == null) {
233:                        throw ex;
234:                    } else {
235:                        assertTrue(expectedException.getClass()
236:                                .isAssignableFrom(ex.getClass()));
237:                    }
238:                }
239:            }
240:
241:            protected void runDecrementSeconds() throws Exception {
242:                CompositeTime subject = getObject("subject");
243:                CompositeTime expected = getObject("expected");
244:                Exception expectedException = getObject("expectedException");
245:                boolean expectedUnderflow = getObject("expectedUnderflow");
246:                try {
247:                    boolean underflow = subject.decrementSeconds();
248:                    if (expectedException != null) {
249:                        fail("Exception not thrown");
250:                    }
251:                    assertEquals(expected, subject);
252:                    assertEquals(expectedUnderflow, underflow);
253:                } catch (Exception ex) {
254:                    if (expectedException == null) {
255:                        throw ex;
256:                    } else {
257:                        assertTrue(expectedException.getClass()
258:                                .isAssignableFrom(ex.getClass()));
259:                    }
260:                }
261:            }
262:
263:            protected void runDecrementMillis() throws Exception {
264:                CompositeTime subject = getObject("subject");
265:                CompositeTime expected = getObject("expected");
266:                Exception expectedException = getObject("expectedException");
267:                boolean expectedUnderflow = getObject("expectedUnderflow");
268:                try {
269:                    boolean underflow = subject.decrementMillis();
270:                    if (expectedException != null) {
271:                        fail("Exception not thrown");
272:                    }
273:                    assertEquals(expected, subject);
274:                    assertEquals(expectedUnderflow, underflow);
275:                } catch (Exception ex) {
276:                    if (expectedException == null) {
277:                        throw ex;
278:                    } else {
279:                        assertTrue(expectedException.getClass()
280:                                .isAssignableFrom(ex.getClass()));
281:                    }
282:                }
283:            }
284:
285:            private SpringUnitContext compositeTimeSpringUnitTest;
286:
287:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.