01: /*
02: * Copyright (C) 1999-2004 <A href="http://www-ist.massey.ac.nz/JBDietrich" target="_top">Jens Dietrich</a>
03: *
04: * This library is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License as published by the Free Software Foundation; either
07: * version 2 of the License, or (at your option) any later version.
08: *
09: * This library is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12: * Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public
15: * License along with this library; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: */
18: package test.org.mandarax.xkb;
19:
20: import org.mandarax.kernel.ClauseSet;
21: import org.mandarax.kernel.KnowledgeBase;
22: import org.mandarax.xkb.XKBDriver;
23:
24: /**
25: * Generic test case for XKB drivers using one clause set.
26: * @author <A href="http://www-ist.massey.ac.nz/JBDietrich" target="_top">Jens Dietrich</A>
27: * @version 3.4 <7 March 05>
28: * @since 1.6
29: */
30: public class XKBTestCase4SingleClauseSet extends XKBTestCase {
31:
32: private KnowledgeBase kb = null;
33:
34: /**
35: * Construct a test case with the name for an XKB driver.
36: * @param aDriver the driver to be tested
37: * @param descr a description of the test case
38: * @param cs a clause set to be tested
39: * @param xmlFileName the name of the file where to output the generated xml, null means no
40: * output
41: */
42: public XKBTestCase4SingleClauseSet(XKBDriver aDriver, ClauseSet cs,
43: String descr, String xmlFileName) {
44: super (aDriver, xmlFileName);
45:
46: description = descr;
47: kb = new org.mandarax.reference.AdvancedKnowledgeBase();
48:
49: kb.add(cs);
50: }
51:
52: /**
53: * Construct a test case with the name for an XKB driver.
54: * @param aDriver the driver to be tested
55: * @param descr a description of the test case
56: * @param cs a clause set to be tested
57: */
58: public XKBTestCase4SingleClauseSet(XKBDriver aDriver, ClauseSet cs,
59: String descr) {
60: this (aDriver, cs, descr, null);
61: }
62:
63: /**
64: * Get the knowledge base used as test data.
65: * @return a knowledge base
66: */
67: public KnowledgeBase getKB() {
68: return kb;
69: }
70: }
|