|
From: Elmer G. <ega...@us...> - 2004-10-13 01:30:01
|
Update of /cvsroot/javaowl/Reasoner/tests/org/javaowl/reasoner In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27952/tests/org/javaowl/reasoner Added Files: TestReasoner.java Log Message: Added new reasoner files. --- NEW FILE: TestReasoner.java --- /* TestEditor.java Copyright (C) 2004 Gerardo Horvilleur Martinez, Elmer Garduno Hernandez This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package org.javaowl.reasoner; import junit.framework.*; public class TestReasoner extends TestCase { public TestReasoner(String name) { super( name ); } public static TestSuite suite() { TestSuite suite = new TestSuite("reasoner"); suite.addTest(new AtomicConceptTestCase()); return suite; } static class AtomicConceptTestCase extends TestCase { public AtomicConceptTestCase() { super(); } protected void runTest() { testAtomicConcept(); } private void testAtomicConcept() { assertTrue(AtomicConcept.TOP.isTop()); assertFalse(AtomicConcept.TOP.isBottom()); assertTrue(AtomicConcept.BOTTOM.isBottom()); assertFalse(AtomicConcept.BOTTOM.isTop()); assertTrue(AtomicConcept.BOTTOM.getNegatedConcept().isTop()); assertTrue(AtomicConcept.TOP.getNegatedConcept().isBottom()); assertTrue(AtomicConcept.BOTTOM.getNegatedConcept(). getNegatedConcept().isBottom()); assertTrue(AtomicConcept.TOP.getNegatedConcept(). getNegatedConcept().isTop()); AtomicConcept female = AtomicConcept.getConcept("female"); AtomicConcept male = female.getNegatedConcept(); assertTrue(male.isNegated()); assertFalse(male.isTop()); assertFalse(male.isBottom()); assertTrue(male.isAtomic()); assertTrue(female.equals(male.getNegatedConcept())); } } } |