Source Code Cross Referenced for TestAbstractCactusTestCase.java in  » Testing » jakarta-cactus » org » apache » cactus » internal » 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 » jakarta cactus » org.apache.cactus.internal 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* 
002:         * ========================================================================
003:         * 
004:         * Copyright 2001-2004 The Apache Software Foundation.
005:         *
006:         * Licensed under the Apache License, Version 2.0 (the "License");
007:         * you may not use this file except in compliance with the License.
008:         * You may obtain a copy of the License at
009:         * 
010:         *   http://www.apache.org/licenses/LICENSE-2.0
011:         * 
012:         * Unless required by applicable law or agreed to in writing, software
013:         * distributed under the License is distributed on an "AS IS" BASIS,
014:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015:         * See the License for the specific language governing permissions and
016:         * limitations under the License.
017:         * 
018:         * ========================================================================
019:         */
020:        package org.apache.cactus.internal;
021:
022:        import java.net.HttpURLConnection;
023:
024:        import org.apache.cactus.WebRequest;
025:        import org.apache.cactus.WebResponse;
026:
027:        /**
028:         * Unit tests of the {@link AbstractCactusTestCase} class.
029:         *
030:         * @version $Id: TestAbstractCactusTestCase.java 238991 2004-05-22 11:34:50Z vmassol $
031:         */
032:        public class TestAbstractCactusTestCase extends
033:                AbstractTestAbstractCactusTestCase {
034:            /**
035:             * @see #testBeginMethodBadReturnType()
036:             */
037:            public String beginBeginMethodBadReturnType(WebRequest theRequest) {
038:                // Return anything just to make the compiler happy ...
039:                return "";
040:            }
041:
042:            /**
043:             * Test that when a begin method for a given test does not have the correct
044:             * return type (i.e. void), a <code>AssertionFailedError</code> exception
045:             * is returned.
046:             * Note: the assert is done in the
047:             * <code>TestAbstractTestCaseInterceptorTestCase</code> class.
048:             */
049:            public void testBeginMethodBadReturnType() {
050:                // This method only exist so that a test exist and thus the begin
051:                // method for that test will be called.
052:                // Should not reach this point
053:                fail("Should not reach this point");
054:            }
055:
056:            //-------------------------------------------------------------------------
057:
058:            /**
059:             * @see #testBeginMethodNotPublic()
060:             */
061:            private void beginBeginMethodNotPublic(WebRequest theRequest) {
062:            }
063:
064:            /**
065:             * Test that when a begin method for a given test is not declared public
066:             * a <code>AssertionFailedError</code> exception is returned.
067:             * Note: the assert is done in the
068:             * <code>TestAbstractTestCaseInterceptorTestCase</code> class.
069:             */
070:            public void testBeginMethodNotPublic() {
071:                // This method only exist so that a test exist and thus the begin
072:                // method for that test will be called.
073:                // Should not reach this point
074:                fail("Should not reach this point");
075:            }
076:
077:            //-------------------------------------------------------------------------
078:
079:            /**
080:             * @see #testBeginMethodBadReturnType()
081:             */
082:            public void beginBeginMethodBadParamType(String theDummy) {
083:            }
084:
085:            /**
086:             * Test that when a begin method for a given test has the wrong type of
087:             * parameters, a <code>AssertionFailedError</code> exception is returned.
088:             * Note: the assert is done in the
089:             * <code>TestAbstractTestCaseInterceptorTestCase</code> class.
090:             */
091:            public void testBeginMethodBadParamType() {
092:                // This method only exist so that a test exist and thus the begin
093:                // method for that test will be called.
094:                // Should not reach this point
095:                fail("Should not reach this point");
096:            }
097:
098:            //-------------------------------------------------------------------------
099:
100:            /**
101:             * @see #testBeginMethodBadParamNumber()
102:             */
103:            public void beginBeginMethodBadParamNumber(WebRequest theRequest,
104:                    String theString) {
105:            }
106:
107:            /**
108:             * Test that when a begin method for a given test has the wrong number of
109:             * parameters, a <code>AssertionFailedError</code> exception is returned.
110:             * Note: the assert is done in the
111:             * <code>TestAbstractTestCaseInterceptorTestCase</code> class.
112:             */
113:            public void testBeginMethodBadParamNumber() {
114:                // This method only exist so that a test exist and thus the begin
115:                // method for that test will be called.
116:                // Should not reach this point
117:                fail("Should not reach this point");
118:            }
119:
120:            //-------------------------------------------------------------------------
121:
122:            /**
123:             * @see #testBeginMethodOK()
124:             */
125:            public void beginBeginMethodOK(WebRequest theRequest) {
126:                // We send an exception just to verify that this code has been reached
127:                // The exception is intercepted in
128:                // TestAbstractTestCaseInterceptorTestCase
129:                fail("beginBeginMethodOK");
130:            }
131:
132:            /**
133:             * Verify that the begin method with a
134:             * <code>WebRequest</code> parameter is called correctly.
135:             */
136:            public void testBeginMethodOK() {
137:            }
138:
139:            //-------------------------------------------------------------------------
140:
141:            /**
142:             * Test that when an end method for a given test does not have the correct
143:             * return type (i.e. void), a <code>AssertionFailedError</code> exception
144:             * is returned.
145:             * Note: the assert is done in the
146:             * <code>TestAbstractTestCaseInterceptorTestCase</code> class.
147:             */
148:            public void testEndMethodBadReturnType() {
149:                // This method only exist so that a test exist and thus the begin
150:                // method for that test will be called.
151:            }
152:
153:            /**
154:             * @see #testEndMethodBadReturnType()
155:             */
156:            public String endEndMethodBadReturnType(WebResponse theResponse) {
157:                // Return anything just to make the compiler happy ...
158:                return "";
159:            }
160:
161:            //-------------------------------------------------------------------------
162:
163:            /**
164:             * Test that when an end method for a given test is not declared public
165:             * a <code>AssertionFailedError</code> exception is returned.
166:             * Note: the assert is done in the
167:             * <code>TestAbstractTestCaseInterceptorTestCase</code> class.
168:             */
169:            public void testEndMethodNotPublic() {
170:            }
171:
172:            /**
173:             * @see #testEndMethodNotPublic()
174:             */
175:            private void endEndMethodNotPublic(WebResponse theResponse) {
176:            }
177:
178:            //-------------------------------------------------------------------------
179:
180:            /**
181:             * Test that when an end method for a given test has the wrong type of
182:             * parameters, a <code>AssertionFailedError</code> exception is returned.
183:             * Note: the assert is done in the
184:             * <code>TestAbstractTestCaseInterceptorTestCase</code> class.
185:             */
186:            public void testEndMethodBadParamType() {
187:            }
188:
189:            /**
190:             * @see #testEndMethodBadParamType()
191:             */
192:            public void endEndMethodBadParamType(String theDummy) {
193:            }
194:
195:            //-------------------------------------------------------------------------
196:
197:            /**
198:             * Test that when an end method for a given test has the wrong number of
199:             * parameters, a <code>AssertionFailedError</code> exception is returned.
200:             * Note: the assert is done in the
201:             * <code>TestAbstractTestCaseInterceptorTestCase</code> class.
202:             */
203:            public void testEndMethodBadParamNumber() {
204:            }
205:
206:            /**
207:             * @see #testEndMethodBadParamNumber()
208:             */
209:            public void endEndMethodBadParamNumber(WebResponse theResponse,
210:                    String theDummy) {
211:            }
212:
213:            //-------------------------------------------------------------------------
214:
215:            /**
216:             * Test that the end method is called correctly when it's signature
217:             * contains a <code>org.apache.cactus.WebResponse</code> parameter.
218:             */
219:            public void testEndMethodOK1() {
220:            }
221:
222:            /**
223:             * @see #testEndMethodOK1()
224:             */
225:            public void endEndMethodOK1(WebResponse theResponse) {
226:                // We send an exception just to verify that this code has been reached
227:                // The exception is intercepted in
228:                // TestAbstractTestCaseInterceptorTestCase
229:                fail("endEndMethodOK1");
230:            }
231:
232:            //-------------------------------------------------------------------------
233:
234:            /**
235:             * Test that the end method is called correctly when it's signature
236:             * contains a <code>com.meterware.httpunit.WebResponse</code> parameter.
237:             *
238:             * Note: We need the Httpunit jar and an XML parser jar on the classpath
239:             * for this test
240:             */
241:            public void testEndMethodOK2() {
242:            }
243:
244:            /**
245:             * @see #testEndMethodOK2()
246:             */
247:            public void endEndMethodOK2(
248:                    com.meterware.httpunit.WebResponse theResponse) {
249:                // We send an exception just to verify that this code has been reached
250:                // The exception is intercepted in
251:                // TestAbstractTestCaseInterceptorTestCase
252:                fail("endEndMethodOK2");
253:            }
254:
255:            //-------------------------------------------------------------------------
256:
257:            /**
258:             * Test that the deprecated end method with the
259:             * <code>HttpURLConnection</code> parameter can still be called correctly.
260:             */
261:            public void testEndMethodOK3() {
262:            }
263:
264:            /**
265:             * @see #testEndMethodOK3()
266:             */
267:            public void endEndMethodOK3(HttpURLConnection theResponse) {
268:                // We send an exception just to verify that this code has been reached
269:                // The exception is intercepted in
270:                // TestAbstractTestCaseInterceptorTestCase
271:                fail("endEndMethodOK3");
272:            }
273:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.