Source Code Cross Referenced for ZKBValidationTests.java in  » Rule-Engine » Mandarax » test » org » mandarax » zkb » 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 » Rule Engine » Mandarax » test.org.mandarax.zkb 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright (C) 1999-2004 <A href="http://www-ist.massey.ac.nz/JBDietrich" target="_top">Jens Dietrich</a>
003:         *
004:         * This library is free software; you can redistribute it and/or
005:         * modify it under the terms of the GNU Lesser General Public
006:         * License as published by the Free Software Foundation; either
007:         * version 2 of the License, or (at your option) any later version.
008:         *
009:         * This library is distributed in the hope that it will be useful,
010:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
011:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
012:         * Lesser General Public License for more details.
013:         *
014:         * You should have received a copy of the GNU Lesser General Public
015:         * License along with this library; if not, write to the Free Software
016:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
017:         */
018:        package test.org.mandarax.zkb;
019:
020:        import junit.framework.Test;
021:        import junit.framework.TestSuite;
022:        import org.mandarax.kernel.ClauseSet;
023:        import org.mandarax.kernel.Query;
024:        import org.mandarax.zkb.BinarySerializationOPS;
025:        import org.mandarax.zkb.ObjectPersistencyService;
026:        import org.mandarax.zkb.ZKBDriver;
027:        import org.mandarax.zkb.framework.ZKBDriver_1_0;
028:        import org.mandarax.zkb.framework.ZKBDriver_1_1;
029:
030:        /**
031:         * Test suite for XKB drivers.
032:         * @author <A href="http://www-ist.massey.ac.nz/JBDietrich" target="_top">Jens Dietrich</A>
033:         * @version 3.4 <7 March 05>
034:         * @since 2.3
035:         */
036:        public class ZKBValidationTests {
037:
038:            /**
039:             * Launch the test suite. See TestRunner for interpretation
040:             * of command line parameters.
041:             * @see test.org.mandarax.testsupport.TestRunner
042:             * @param args parameters
043:             */
044:            public static void main(String[] args) {
045:                org.apache.log4j.BasicConfigurator.configure();
046:                test.org.mandarax.testsupport.TestRunner.run(
047:                        ZKBValidationTests.class, args);
048:            }
049:
050:            /**
051:             * Get the test suite.
052:             * @return the test suite
053:             */
054:            public static Test suite() {
055:                TestSuite suite = new TestSuite(
056:                        "Test cases for the mandarax ZKB module (DTD verification)");
057:                addTests(new ZKBDriver_1_0(), suite);
058:                addTests(new ZKBDriver_1_1(), suite);
059:                return suite;
060:            }
061:
062:            /**
063:             * Add tests for a certain driver to a test suite.
064:             * @param driver the ZKB driver tested
065:             * @param suite a test suite
066:             */
067:            private static void addTests(ZKBDriver driver, TestSuite suite) {
068:                addTests(driver, BinarySerializationOPS.class, suite);
069:            }
070:
071:            /**
072:             * Add tests for a certain driver / OPS combination to a test suite.
073:             * @param driver the ZKB driver tested
074:             * @param ops the object persistency service class
075:             * @param suite a test suite
076:             */
077:            private static void addTests(ZKBDriver driver, Class opsClass,
078:                    TestSuite suite) {
079:                try {
080:                    // 1 clause set     
081:                    suite.addTest(new ZKBValidationTestCase(driver,
082:                            (ObjectPersistencyService) opsClass.newInstance(),
083:                            TestData.fact1(), "testcase 1"));
084:                    suite.addTest(new ZKBValidationTestCase(driver,
085:                            (ObjectPersistencyService) opsClass.newInstance(),
086:                            TestData.fact2(), "testcase 2"));
087:                    suite.addTest(new ZKBValidationTestCase(driver,
088:                            (ObjectPersistencyService) opsClass.newInstance(),
089:                            TestData.fact3(), "testcase 3"));
090:                    suite.addTest(new ZKBValidationTestCase(driver,
091:                            (ObjectPersistencyService) opsClass.newInstance(),
092:                            TestData.fact4(), "testcase 4"));
093:                    suite.addTest(new ZKBValidationTestCase(driver,
094:                            (ObjectPersistencyService) opsClass.newInstance(),
095:                            TestData.fact5(), "testcase 5"));
096:                    suite.addTest(new ZKBValidationTestCase(driver,
097:                            (ObjectPersistencyService) opsClass.newInstance(),
098:                            TestData.fact6(), "testcase 6"));
099:                    suite.addTest(new ZKBValidationTestCase(driver,
100:                            (ObjectPersistencyService) opsClass.newInstance(),
101:                            TestData.fact7(), "testcase 7"));
102:                    suite.addTest(new ZKBValidationTestCase(driver,
103:                            (ObjectPersistencyService) opsClass.newInstance(),
104:                            TestData.fact8(), "testcase 8"));
105:                    suite.addTest(new ZKBValidationTestCase(driver,
106:                            (ObjectPersistencyService) opsClass.newInstance(),
107:                            TestData.fact9(), "testcase 9"));
108:                    suite.addTest(new ZKBValidationTestCase(driver,
109:                            (ObjectPersistencyService) opsClass.newInstance(),
110:                            TestData.fact10(), "testcase 10"));
111:                    suite.addTest(new ZKBValidationTestCase(driver,
112:                            (ObjectPersistencyService) opsClass.newInstance(),
113:                            TestData.rule1(), "testcase 11"));
114:                    suite.addTest(new ZKBValidationTestCase(driver,
115:                            (ObjectPersistencyService) opsClass.newInstance(),
116:                            TestData.andRule(), "testcase 12"));
117:                    suite.addTest(new ZKBValidationTestCase(driver,
118:                            (ObjectPersistencyService) opsClass.newInstance(),
119:                            TestData.orRule(), "testcase 13"));
120:                    suite.addTest(new ZKBValidationTestCase(driver,
121:                            (ObjectPersistencyService) opsClass.newInstance(),
122:                            TestData.sqlClauseSet(), "testcase 14"));
123:                    suite.addTest(new ZKBValidationTestCase(driver,
124:                            (ObjectPersistencyService) opsClass.newInstance(),
125:                            TestData.negRule(), "testcase 15"));
126:
127:                    // 1 query
128:                    suite.addTest(new ZKBValidationTestCase(driver,
129:                            (ObjectPersistencyService) opsClass.newInstance(),
130:                            null, TestData.query1(), "testcase 17"));
131:                    suite.addTest(new ZKBValidationTestCase(driver,
132:                            (ObjectPersistencyService) opsClass.newInstance(),
133:                            null, TestData.query2(), "testcase 18"));
134:                    suite.addTest(new ZKBValidationTestCase(driver,
135:                            (ObjectPersistencyService) opsClass.newInstance(),
136:                            null, TestData.query3(), "testcase 19"));
137:
138:                    // 2 clause sets/ 2 queries - check whether order is maintained
139:                    suite.addTest(new ZKBValidationTestCase(driver,
140:                            (ObjectPersistencyService) opsClass.newInstance(),
141:                            null, new ClauseSet[] { TestData.fact1(),
142:                                    TestData.fact2() }, null, "testcase 20"));
143:                    suite.addTest(new ZKBValidationTestCase(driver,
144:                            (ObjectPersistencyService) opsClass.newInstance(),
145:                            null, null, new Query[] { TestData.query1(),
146:                                    TestData.query2() }, "testcase 21"));
147:                } catch (Exception x) {
148:                    x.printStackTrace();
149:                }
150:
151:            }
152:
153:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.