Source Code Cross Referenced for XMLTopicFactoryTest.java in  » Wiki-Engine » JAMWiki » org » jamwiki » servlets » 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 » Wiki Engine » JAMWiki » org.jamwiki.servlets 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, version 2.1, dated February 1999.
003:         *
004:         * This program is free software; you can redistribute it and/or modify
005:         * it under the terms of the latest version of the GNU Lesser General
006:         * Public License as published by the Free Software Foundation;
007:         *
008:         * This program is distributed in the hope that it will be useful,
009:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
010:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
011:         * GNU Lesser General Public License for more details.
012:         *
013:         * You should have received a copy of the GNU Lesser General Public License
014:         * along with this program (LICENSE.txt); if not, write to the Free Software
015:         * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
016:         *
017:         * Based on code generated by Agitar build: Agitator Version 1.0.2.000071 (Build date: Jan 12, 2007) [1.0.2.000071]
018:         */package org.jamwiki.servlets;
019:
020:        import junit.framework.TestCase;
021:        import org.acegisecurity.GrantedAuthorityImpl;
022:        import org.acegisecurity.GrantedAuthority;
023:        import org.jamwiki.authentication.WikiUserAuth;
024:        import org.jamwiki.model.WikiUser;
025:
026:        /**
027:         *
028:         */
029:        public class XMLTopicFactoryTest extends TestCase {
030:
031:            /**
032:             *
033:             */
034:            public void testConstructor() throws Throwable {
035:                // FIXME - implement this
036:            }
037:
038:            /**
039:             *
040:             */
041:            public void testCharacters() throws Throwable {
042:                // FIXME - implement this
043:            }
044:
045:            /**
046:             *
047:             */
048:            public void testEndDocument() throws Throwable {
049:                // FIXME - implement this
050:            }
051:
052:            /**
053:             *
054:             */
055:            public void testEndElement() throws Throwable {
056:                // FIXME - implement this
057:            }
058:
059:            /**
060:             *
061:             */
062:            public void testPreprocessText() throws Throwable {
063:                String result = new XMLTopicFactory(
064:                        "testXMLTopicFactoryVirtualWiki", new WikiUser(""),
065:                        "testXMLTopicFactoryAuthorIpAddress")
066:                        .preprocessText("testXMLTopicFactoryText");
067:                assertEquals("result", "testXMLTopicFactoryText", result);
068:            }
069:
070:            /**
071:             *
072:             */
073:            public void testPreprocessText1() throws Throwable {
074:                String result = new XMLTopicFactory(
075:                        "testXMLTopicFactoryVirtualWiki", new WikiUser(""),
076:                        "testXMLTopicFactoryAuthorIpAddress")
077:                        .preprocessText(null);
078:                assertNull("result", result);
079:            }
080:
081:            /**
082:             *
083:             */
084:            public void testStartDocument() throws Throwable {
085:                // FIXME - implement this
086:            }
087:
088:            /**
089:             *
090:             */
091:            public void testStartElement() throws Throwable {
092:                // FIXME - implement this
093:            }
094:
095:            /**
096:             *
097:             */
098:            public void testCharactersThrowsArrayIndexOutOfBoundsException()
099:                    throws Throwable {
100:                // FIXME - implement this
101:            }
102:
103:            /**
104:             *
105:             */
106:            public void testCharactersThrowsNullPointerException()
107:                    throws Throwable {
108:                char[] buf = new char[1];
109:                GrantedAuthority grantedAuthorityImpl = new GrantedAuthorityImpl(
110:                        "testXMLTopicFactoryRole");
111:                GrantedAuthority[] authorities = new GrantedAuthority[3];
112:                authorities[0] = grantedAuthorityImpl;
113:                authorities[1] = grantedAuthorityImpl;
114:                authorities[2] = new GrantedAuthorityImpl(
115:                        "testXMLTopicFactoryRole1");
116:                XMLTopicFactory xMLTopicFactory = new XMLTopicFactory(
117:                        "testXMLTopicFactoryVirtualWiki", new WikiUserAuth(
118:                                "testXMLTopicFactoryUsername",
119:                                "testXMLTopicFactoryPassword", true, false,
120:                                false, false, authorities),
121:                        "testXMLTopicFactoryAuthorIpAddress");
122:                try {
123:                    xMLTopicFactory.characters(buf, 100, 1000);
124:                    fail("Expected NullPointerException to be thrown");
125:                } catch (NullPointerException ex) {
126:                    assertNull("ex.getMessage()", ex.getMessage());
127:                }
128:            }
129:
130:            /**
131:             *
132:             */
133:            public void testEndElementThrowsNullPointerException()
134:                    throws Throwable {
135:                // FIXME - implement this
136:            }
137:
138:            /**
139:             *
140:             */
141:            public void testEndElementThrowsNullPointerException1()
142:                    throws Throwable {
143:                GrantedAuthority grantedAuthorityImpl = new GrantedAuthorityImpl(
144:                        "testXMLTopicFactoryRole1");
145:                GrantedAuthority[] authorities = new GrantedAuthority[4];
146:                authorities[0] = new GrantedAuthorityImpl(
147:                        "testXMLTopicFactoryRole");
148:                authorities[1] = grantedAuthorityImpl;
149:                authorities[2] = grantedAuthorityImpl;
150:                authorities[3] = new GrantedAuthorityImpl(
151:                        "testXMLTopicFactoryRole2");
152:                XMLTopicFactory xMLTopicFactory = new XMLTopicFactory(
153:                        "testXMLTopicFactoryVirtualWiki", new WikiUserAuth(
154:                                "testXMLTopicFactoryUsername",
155:                                "testXMLTopicFactoryPassword", true, false,
156:                                false, false, authorities),
157:                        "testXMLTopicFactoryAuthorIpAddress");
158:                try {
159:                    xMLTopicFactory.endElement(
160:                            "testXMLTopicFactoryNamespaceURI",
161:                            "testXMLTopicFactorySName", "title");
162:                    fail("Expected NullPointerException to be thrown");
163:                } catch (NullPointerException ex) {
164:                    assertNull("ex.getMessage()", ex.getMessage());
165:                }
166:            }
167:
168:            /**
169:             *
170:             */
171:            public void testEndElementThrowsNullPointerException2()
172:                    throws Throwable {
173:                XMLTopicFactory xMLTopicFactory = new XMLTopicFactory(
174:                        "testXMLTopicFactoryVirtualWiki", new WikiUser(""),
175:                        "testXMLTopicFactoryAuthorIpAddress");
176:                try {
177:                    xMLTopicFactory.endElement(
178:                            "testXMLTopicFactoryNamespaceURI",
179:                            "testXMLTopicFactorySName", "page");
180:                    fail("Expected NullPointerException to be thrown");
181:                } catch (NullPointerException ex) {
182:                    assertNull("ex.getMessage()", ex.getMessage());
183:                }
184:            }
185:
186:            /**
187:             *
188:             */
189:            public void testEndElementThrowsNullPointerException3()
190:                    throws Throwable {
191:                XMLTopicFactory xMLTopicFactory = new XMLTopicFactory(
192:                        "testXMLTopicFactoryVirtualWiki", new WikiUser(""),
193:                        "testXMLTopicFactoryAuthorIpAddress");
194:                try {
195:                    xMLTopicFactory.endElement(
196:                            "testXMLTopicFactoryNamespaceURI",
197:                            "testXMLTopicFactorySName", "text");
198:                    fail("Expected NullPointerException to be thrown");
199:                } catch (NullPointerException ex) {
200:                    assertNull("ex.getMessage()", ex.getMessage());
201:                }
202:            }
203:
204:            /**
205:             *
206:             */
207:            public void testEndElementThrowsNullPointerException4()
208:                    throws Throwable {
209:                XMLTopicFactory xMLTopicFactory = new XMLTopicFactory(
210:                        "testXMLTopicFactoryVirtualWiki", new WikiUser(""),
211:                        "testXMLTopicFactoryAuthorIpAddress");
212:                try {
213:                    xMLTopicFactory.endElement(
214:                            "testXMLTopicFactoryNamespaceURI",
215:                            "testXMLTopicFactorySName", "namespace");
216:                    fail("Expected NullPointerException to be thrown");
217:                } catch (NullPointerException ex) {
218:                    assertNull("ex.getMessage()", ex.getMessage());
219:                }
220:            }
221:
222:            /**
223:             *
224:             */
225:            public void testStartElementThrowsNullPointerException()
226:                    throws Throwable {
227:                XMLTopicFactory xMLTopicFactory = new XMLTopicFactory(
228:                        "testXMLTopicFactoryVirtualWiki", new WikiUser(""),
229:                        "testXMLTopicFactoryAuthorIpAddress");
230:                try {
231:                    xMLTopicFactory.startElement(
232:                            "testXMLTopicFactoryNamespaceURI",
233:                            "testXMLTopicFactoryLName",
234:                            "testXMLTopicFactoryQName", null);
235:                    fail("Expected NullPointerException to be thrown");
236:                } catch (NullPointerException ex) {
237:                    assertNull("ex.getMessage()", ex.getMessage());
238:                }
239:            }
240:
241:            /**
242:             *
243:             */
244:            public void testStartElementThrowsNullPointerException1()
245:                    throws Throwable {
246:                XMLTopicFactory xMLTopicFactory = new XMLTopicFactory(
247:                        "testXMLTopicFactoryVirtualWiki", new WikiUser(""),
248:                        "testXMLTopicFactoryAuthorIpAddress");
249:                xMLTopicFactory.endElement("testXMLTopicFactoryNamespaceURI",
250:                        "testXMLTopicFactorySName", "testXMLTopicFactoryQName");
251:                try {
252:                    xMLTopicFactory.startElement(
253:                            "testXMLTopicFactoryNamespaceURI", "",
254:                            "testXMLTopicFactoryQName", null);
255:                    fail("Expected NullPointerException to be thrown");
256:                } catch (NullPointerException ex) {
257:                    assertNull("ex.getMessage()", ex.getMessage());
258:                }
259:            }
260:
261:            /**
262:             *
263:             */
264:            public void testStartElementThrowsNullPointerException2()
265:                    throws Throwable {
266:                GrantedAuthority grantedAuthorityImpl = new GrantedAuthorityImpl(
267:                        "testXMLTopicFactoryRole");
268:                GrantedAuthority[] authorities = new GrantedAuthority[3];
269:                authorities[0] = grantedAuthorityImpl;
270:                authorities[1] = grantedAuthorityImpl;
271:                authorities[2] = new GrantedAuthorityImpl(
272:                        "testXMLTopicFactoryRole1");
273:                XMLTopicFactory xMLTopicFactory = new XMLTopicFactory(
274:                        "testXMLTopicFactoryVirtualWiki", new WikiUserAuth(
275:                                "testXMLTopicFactoryUsername",
276:                                "testXMLTopicFactoryPassword", true, false,
277:                                false, false, authorities),
278:                        "testXMLTopicFactoryAuthorIpAddress");
279:                try {
280:                    xMLTopicFactory.startElement(
281:                            "testXMLTopicFactoryNamespaceURI", "",
282:                            "testXMLTopicFactoryQName", null);
283:                    fail("Expected NullPointerException to be thrown");
284:                } catch (NullPointerException ex) {
285:                    assertNull("ex.getMessage()", ex.getMessage());
286:                }
287:            }
288:
289:            /**
290:             *
291:             */
292:            public void testStartElementThrowsNullPointerException3()
293:                    throws Throwable {
294:                XMLTopicFactory xMLTopicFactory = new XMLTopicFactory(
295:                        "testXMLTopicFactoryVirtualWiki", new WikiUser(""),
296:                        "testXMLTopicFactoryAuthorIpAddress");
297:                xMLTopicFactory.endElement("testXMLTopicFactoryNamespaceURI",
298:                        "testXMLTopicFactorySName", "testXMLTopicFactoryQName");
299:                try {
300:                    xMLTopicFactory.startElement(
301:                            "testXMLTopicFactoryNamespaceURI",
302:                            "testXMLTopicFactoryLName",
303:                            "testXMLTopicFactoryQName", null);
304:                    fail("Expected NullPointerException to be thrown");
305:                } catch (NullPointerException ex) {
306:                    assertNull("ex.getMessage()", ex.getMessage());
307:                }
308:            }
309:
310:            /**
311:             *
312:             */
313:            public void testStartElementThrowsNumberFormatException()
314:                    throws Throwable {
315:                // FIXME - implement this
316:            }
317:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.