Source Code Cross Referenced for XKBTests.java in  » Rule-Engine » Mandarax » test » org » mandarax » xkb » 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.xkb 
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.xkb;
019:
020:        import junit.framework.Test;
021:        import junit.framework.TestSuite;
022:
023:        import org.mandarax.xkb.XKBDriver;
024:        import org.mandarax.xkb.framework.XKBDriver_1_0;
025:        import org.mandarax.xkb.framework.XKBDriver_1_1;
026:        import org.mandarax.xkb.framework.XKBDriver_2_0;
027:        import org.mandarax.xkb.framework.XKBDriver_2_1;
028:
029:        /**
030:         * Test suite for XKB drivers.
031:         * @author <A href="http://www-ist.massey.ac.nz/JBDietrich" target="_top">Jens Dietrich</A>
032:         * @version 3.4 <7 March 05>
033:         * @since 1.6
034:         */
035:        public class XKBTests {
036:
037:            /**
038:             * Launch the test suite. See TestRunner for interpretation
039:             * of command line parameters.
040:             * @see test.org.mandarax.testsupport.TestRunner
041:             * @param args parameters
042:             */
043:            public static void main(String[] args) {
044:                org.apache.log4j.BasicConfigurator.configure();
045:                test.org.mandarax.testsupport.TestRunner.run(XKBTests.class,
046:                        args);
047:            }
048:
049:            /**
050:             * Get the test suite.
051:             * @return the test suite
052:             */
053:            public static Test suite() {
054:                TestSuite suite = new TestSuite(
055:                        "Test cases for the mandarax XKB module");
056:
057:                addTests(new XKBDriver_1_0(), suite);
058:                addTests(new XKBDriver_1_1(), suite);
059:                addTests(new XKBDriver_2_0(), suite);
060:                addTests(new XKBDriver_2_1(), suite);
061:
062:                return suite;
063:            }
064:
065:            /**
066:             * Add tests for a certain driver to a test suite.
067:             * @param driver the XKB driver tested
068:             * @param suite a test suite
069:             */
070:            public static void addTests(XKBDriver driver, TestSuite suite) {
071:
072:                suite
073:                        .addTest(new XKBTestCase4SingleClauseSet(
074:                                driver,
075:                                TestData.fact1(),
076:                                "Test case for testing simple predicates and variables (type String), driver is "
077:                                        + driver.getName(), "_xkb_test1.xml"));
078:                suite
079:                        .addTest(new XKBTestCase4SingleClauseSet(
080:                                driver,
081:                                TestData.fact2(),
082:                                "Test case for testing simple predicates and variables (bean type Person), driver is "
083:                                        + driver.getName(), "_xkb_test2.xml"));
084:                suite.addTest(new XKBTestCase4SingleClauseSet(driver, TestData
085:                        .fact3(),
086:                        "Test case for testing simple predicates and variables (type int), driver is "
087:                                + driver.getName(), "_xkb_test3.xml"));
088:                suite
089:                        .addTest(new XKBTestCase4SingleClauseSet(
090:                                driver,
091:                                TestData.fact4(),
092:                                "Test case for testing simple predicates and constants (type String), driver is "
093:                                        + driver.getName(), "_xkb_test4.xml"));
094:                suite
095:                        .addTest(new XKBTestCase4SingleClauseSet(
096:                                driver,
097:                                TestData.fact5(),
098:                                "Test case for testing simple predicates and constants (bean type Person), driver is "
099:                                        + driver.getName(), "_xkb_test5.xml"));
100:                suite.addTest(new XKBTestCase4SingleClauseSet(driver, TestData
101:                        .fact6(),
102:                        "Test case for testing simple predicates and constants (type int), driver is "
103:                                + driver.getName(), "_xkb_test6.xml"));
104:                suite.addTest(new XKBTestCase4SingleClauseSet(driver, TestData
105:                        .fact7(),
106:                        "Test case for testing JPredicates and variables, driver is "
107:                                + driver.getName(), "_xkb_test7.xml"));
108:                suite.addTest(new XKBTestCase4SingleClauseSet(driver, TestData
109:                        .fact8(),
110:                        "Test case for testing JFunctions, simple predicates and variables, driver is "
111:                                + driver.getName(), "_xkb_test8.xml"));
112:                suite.addTest(new XKBTestCase4SingleClauseSet(driver, TestData
113:                        .fact9(),
114:                        "Test case for testing SQLPredicates and variables, driver is "
115:                                + driver.getName(), "_xkb_test9.xml"));
116:                suite
117:                        .addTest(new XKBTestCase4SingleClauseSet(
118:                                driver,
119:                                TestData.fact10(),
120:                                "Test case for testing SQLFunctions, simple predicates and variables, driver is "
121:                                        + driver.getName(), "_xkb_test10.xml"));
122:
123:                suite.addTest(new XKBTestCase4SingleClauseSet(driver, TestData
124:                        .rule1(),
125:                        "Test case for testing rules, simple predicates and variables, driver is "
126:                                + driver.getName(), "_xkb_test11.xml"));
127:                suite
128:                        .addTest(new XKBTestCase4SingleClauseSet(
129:                                driver,
130:                                TestData.andRule(),
131:                                "Test case for testing rules with multiple premisses connected by AND, driver is "
132:                                        + driver.getName(), "_xkb_test12.xml"));
133:                suite
134:                        .addTest(new XKBTestCase4SingleClauseSet(
135:                                driver,
136:                                TestData.orRule(),
137:                                "Test case for testing rules with multiple premisses connected by OR, driver is "
138:                                        + driver.getName(), "_xkb_test13.xml"));
139:
140:                suite.addTest(new XKBTestCase4SingleClauseSet(driver, TestData
141:                        .sqlClauseSet(),
142:                        "Test case for testing sql clause sets and predicates, driver is "
143:                                + driver.getName(), "_xkb_test14.xml"));
144:
145:                if (driver.supportsQueries()) {
146:                    suite.addTest(new XKBTestCase4Queries(driver, TestData
147:                            .query1(),
148:                            "Test case for testing single simple query, driver is "
149:                                    + driver.getName(), "_xkb_test15.xml"));
150:                    suite.addTest(new XKBTestCase4Queries(driver, TestData
151:                            .query2(),
152:                            "Test case for testing single query with multiple query facts, driver is "
153:                                    + driver.getName(), "_xkb_test16.xml"));
154:                    suite.addTest(new XKBTestCase4Queries(driver, TestData
155:                            .query1(), TestData.query2(),
156:                            "Test case for testing multiple queries, driver is "
157:                                    + driver.getName(), "_xkb_test17.xml"));
158:
159:                }
160:
161:                if (driver.supportsNegationAsFailure()) {
162:                    suite.addTest(new XKBTestCase4SingleClauseSet(driver,
163:                            TestData.negRule(),
164:                            "Test case for testing rule with negated prerequisites, driver is "
165:                                    + driver.getName(), "_xkb_test18.xml"));
166:
167:                }
168:
169:                // only new drivers support this
170:                suite
171:                        .addTest(new XKBTestCase4SingleClauseSet(
172:                                driver,
173:                                TestData.fact11(),
174:                                "Test case for testing DynaBeanFunctions, simple predicates and variables, driver is "
175:                                        + driver.getName(), "_xkb_test19.xml"));
176:
177:            }
178:
179:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.