Source Code Cross Referenced for ResolutionInferenceEngineTests.java in  » Rule-Engine » Mandarax » test » org » mandarax » reference » 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.reference 
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.reference;
019:
020:        import junit.framework.Test;
021:        import junit.framework.TestSuite;
022:
023:        import org.apache.log4j.BasicConfigurator;
024:
025:        /**
026:         * Defines a test suite for all tests testing the resolution inference engine.
027:         * The engine is tested together with both knowledge bases, KnowledgeBase and
028:         * AdvancedKnowledgeBase.
029:         * @see org.mandarax.reference.ResolutionInferenceEngine
030:         * @see org.mandarax.reference.KnowledgeBase
031:         * @see org.mandarax.reference.AdvancedKnowledgeBase
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 1.2
035:         */
036:        public class ResolutionInferenceEngineTests {
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:                // first init log4j
046:                BasicConfigurator.configure();
047:                test.org.mandarax.testsupport.TestRunner.run(
048:                        ResolutionInferenceEngineTests.class, args);
049:            }
050:
051:            /**
052:             * Get the test suite.
053:             * @return the test suite
054:             */
055:            public static Test suite() {
056:                TestSuite suite = new TestSuite(
057:                        "Test cases for the mandarax reference implementation(s) of a resolution inference engine");
058:
059:                // testing all inference engine / knowledge base combinations
060:                addIETests4OneResult(
061:                        suite,
062:                        KnowledgeBaseFactory.ORG_MANDARAX_REFERENCE_KNOWLEDGE_BASE,
063:                        InferenceEngineFactory.ORG_MANDARAX_REFERENCE_RESOLUTION_INFERENCE_ENGINE);
064:                addIETests4OneResult(
065:                        suite,
066:                        KnowledgeBaseFactory.ORG_MANDARAX_REFERENCE_ADVANCED_KNOWLEDGE_BASE,
067:                        InferenceEngineFactory.ORG_MANDARAX_REFERENCE_RESOLUTION_INFERENCE_ENGINE);
068:                addIETests4OneResult(
069:                        suite,
070:                        KnowledgeBaseFactory.ORG_MANDARAX_REFERENCE_KNOWLEDGE_BASE,
071:                        InferenceEngineFactory.ORG_MANDARAX_REFERENCE_RESOLUTION_INFERENCE_ENGINE2);
072:                addIETests4OneResult(
073:                        suite,
074:                        KnowledgeBaseFactory.ORG_MANDARAX_REFERENCE_ADVANCED_KNOWLEDGE_BASE,
075:                        InferenceEngineFactory.ORG_MANDARAX_REFERENCE_RESOLUTION_INFERENCE_ENGINE2);
076:                addIETests4OneResult(
077:                        suite,
078:                        KnowledgeBaseFactory.ORG_MANDARAX_REFERENCE_KNOWLEDGE_BASE,
079:                        InferenceEngineFactory.ORG_MANDARAX_REFERENCE_RESOLUTION_INFERENCE_ENGINE3);
080:                addIETests4OneResult(
081:                        suite,
082:                        KnowledgeBaseFactory.ORG_MANDARAX_REFERENCE_ADVANCED_KNOWLEDGE_BASE,
083:                        InferenceEngineFactory.ORG_MANDARAX_REFERENCE_RESOLUTION_INFERENCE_ENGINE3);
084:                addIETests4OneResult(
085:                        suite,
086:                        KnowledgeBaseFactory.ORG_MANDARAX_REFERENCE_KNOWLEDGE_BASE,
087:                        InferenceEngineFactory.ORG_MANDARAX_REFERENCE_RESOLUTION_INFERENCE_ENGINE4);
088:                addIETests4OneResult(
089:                        suite,
090:                        KnowledgeBaseFactory.ORG_MANDARAX_REFERENCE_ADVANCED_KNOWLEDGE_BASE,
091:                        InferenceEngineFactory.ORG_MANDARAX_REFERENCE_RESOLUTION_INFERENCE_ENGINE4);
092:
093:                addIETests4MultipleResults(
094:                        suite,
095:                        KnowledgeBaseFactory.ORG_MANDARAX_REFERENCE_KNOWLEDGE_BASE,
096:                        InferenceEngineFactory.ORG_MANDARAX_REFERENCE_RESOLUTION_INFERENCE_ENGINE2);
097:                addIETests4MultipleResults(
098:                        suite,
099:                        KnowledgeBaseFactory.ORG_MANDARAX_REFERENCE_ADVANCED_KNOWLEDGE_BASE,
100:                        InferenceEngineFactory.ORG_MANDARAX_REFERENCE_RESOLUTION_INFERENCE_ENGINE2);
101:                addIETests4MultipleResults(
102:                        suite,
103:                        KnowledgeBaseFactory.ORG_MANDARAX_REFERENCE_KNOWLEDGE_BASE,
104:                        InferenceEngineFactory.ORG_MANDARAX_REFERENCE_RESOLUTION_INFERENCE_ENGINE3);
105:                addIETests4MultipleResults(
106:                        suite,
107:                        KnowledgeBaseFactory.ORG_MANDARAX_REFERENCE_ADVANCED_KNOWLEDGE_BASE,
108:                        InferenceEngineFactory.ORG_MANDARAX_REFERENCE_RESOLUTION_INFERENCE_ENGINE3);
109:                addIETests4MultipleResults(
110:                        suite,
111:                        KnowledgeBaseFactory.ORG_MANDARAX_REFERENCE_KNOWLEDGE_BASE,
112:                        InferenceEngineFactory.ORG_MANDARAX_REFERENCE_RESOLUTION_INFERENCE_ENGINE4);
113:                addIETests4MultipleResults(
114:                        suite,
115:                        KnowledgeBaseFactory.ORG_MANDARAX_REFERENCE_ADVANCED_KNOWLEDGE_BASE,
116:                        InferenceEngineFactory.ORG_MANDARAX_REFERENCE_RESOLUTION_INFERENCE_ENGINE4);
117:
118:                return suite;
119:            }
120:
121:            /** 
122:             * Add tests for the combination knowledge base/ inference engine to a test suite.
123:             * @param suite a test suite
124:             * @param kbFact a knowledge base factory
125:             * @param ieFact an inference engine factory
126:             */
127:            private static void addIETests4OneResult(TestSuite suite,
128:                    KnowledgeBaseFactory kbFact, InferenceEngineFactory ieFact) {
129:                suite.addTest(new TestInferenceEngine1(kbFact.createKB(),
130:                        ieFact.createIE()));
131:                suite.addTest(new TestInferenceEngine2(kbFact.createKB(),
132:                        ieFact.createIE()));
133:                suite.addTest(new TestInferenceEngine3(kbFact.createKB(),
134:                        ieFact.createIE()));
135:                suite.addTest(new TestInferenceEngine4(kbFact.createKB(),
136:                        ieFact.createIE()));
137:                suite.addTest(new TestInferenceEngine5(kbFact.createKB(),
138:                        ieFact.createIE()));
139:                suite.addTest(new TestInferenceEngine6(kbFact.createKB(),
140:                        ieFact.createIE()));
141:                suite.addTest(new TestInferenceEngine7(kbFact.createKB(),
142:                        ieFact.createIE()));
143:                suite.addTest(new TestInferenceEngine8(kbFact.createKB(),
144:                        ieFact.createIE()));
145:                suite.addTest(new TestInferenceEngine9(kbFact.createKB(),
146:                        ieFact.createIE()));
147:                suite.addTest(new TestInferenceEngine10(kbFact.createKB(),
148:                        ieFact.createIE()));
149:                suite.addTest(new TestInferenceEngine11(kbFact.createKB(),
150:                        ieFact.createIE()));
151:                suite.addTest(new TestInferenceEngine12(kbFact.createKB(),
152:                        ieFact.createIE()));
153:                suite.addTest(new TestInferenceEngine13(kbFact.createKB(),
154:                        ieFact.createIE()));
155:                suite.addTest(new TestInferenceEngine14(kbFact.createKB(),
156:                        ieFact.createIE()));
157:                suite.addTest(new TestInferenceEngine15(kbFact.createKB(),
158:                        ieFact.createIE()));
159:                suite.addTest(new TestInferenceEngine16(kbFact.createKB(),
160:                        ieFact.createIE()));
161:                suite.addTest(new TestInferenceEngine17(kbFact.createKB(),
162:                        ieFact.createIE()));
163:                suite.addTest(new TestResultSet1(kbFact.createKB(), ieFact
164:                        .createIE()));
165:                suite.addTest(new TestResultSet2(kbFact.createKB(), ieFact
166:                        .createIE()));
167:                suite.addTest(new TestResultSet3(kbFact.createKB(), ieFact
168:                        .createIE()));
169:                suite.addTest(new TestResultSet4(kbFact.createKB(), ieFact
170:                        .createIE()));
171:                suite.addTest(new TestResultSet5(kbFact.createKB(), ieFact
172:                        .createIE()));
173:                suite.addTest(new TestResultSet6(kbFact.createKB(), ieFact
174:                        .createIE()));
175:                suite.addTest(new TestResultSet7(kbFact.createKB(), ieFact
176:                        .createIE()));
177:
178:                // new in 3.3
179:                suite.addTest(new TestRecursion1("test1", kbFact.createKB(),
180:                        ieFact.createIE()));
181:                suite.addTest(new TestRecursion1("test2", kbFact.createKB(),
182:                        ieFact.createIE()));
183:                suite.addTest(new TestRecursion1("test3", kbFact.createKB(),
184:                        ieFact.createIE()));
185:                suite.addTest(new TestRecursion1("test4", kbFact.createKB(),
186:                        ieFact.createIE()));
187:                suite.addTest(new TestRecursion1("test5", kbFact.createKB(),
188:                        ieFact.createIE()));
189:                suite.addTest(new TestRecursion1("test6", kbFact.createKB(),
190:                        ieFact.createIE()));
191:                suite.addTest(new TestRecursion1("test7", kbFact.createKB(),
192:                        ieFact.createIE()));
193:
194:                // new in 3.3.1
195:                // suite.addTest(new TestComplexTerm("testComplexTerm1",kbFact.createKB(),ieFact.createIE())); WARNING: this is not supported by current IE implementations (Jens, March 05) !!	
196:                suite.addTest(new TestComplexTerm("testComplexTerm2", kbFact
197:                        .createKB(), ieFact.createIE()));
198:                suite.addTest(new TestComplexTerm("testComplexTerm3", kbFact
199:                        .createKB(), ieFact.createIE()));
200:
201:            }
202:
203:            /** 
204:             * Add tests for the combination knowledge base/ inference engine to a test suite.
205:             * @param suite a test suite
206:             * @param kbFact a knowledge base factory
207:             * @param ieFact an inference engine factory
208:             */
209:            private static void addIETests4MultipleResults(TestSuite suite,
210:                    KnowledgeBaseFactory kbFact, InferenceEngineFactory ieFact) {
211:                suite.addTest(new TestInferenceEngine4MultipleResults1(kbFact
212:                        .createKB(), ieFact.createIE()));
213:                suite.addTest(new TestInferenceEngine4MultipleResults2(kbFact
214:                        .createKB(), ieFact.createIE()));
215:                suite.addTest(new TestInferenceEngine4MultipleResults3(kbFact
216:                        .createKB(), ieFact.createIE()));
217:                suite.addTest(new TestInferenceEngine4MultipleResults4(kbFact
218:                        .createKB(), ieFact.createIE()));
219:
220:            }
221:
222:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.