001 package aima.test.logictest.foltest; 002 003 import java.util.List; 004 005 import junit.framework.TestCase; 006 import aima.logic.fol.PredicateCollector; 007 import aima.logic.fol.domain.DomainFactory; 008 import aima.logic.fol.parsing.FOLParser; 009 import aima.logic.fol.parsing.ast.Sentence; 010 011 /** 012 * @author Ravi Mohan 013 * 014 */ 015 016 public class PredicateCollectorTest extends TestCase { 017 PredicateCollector collector; 018 019 FOLParser parser; 020 021 @Override 022 public void setUp() { 023 collector = new PredicateCollector(); 024 parser = new FOLParser(DomainFactory.weaponsDomain()); 025 } 026 027 public void testSimpleSentence() { 028 Sentence s = parser.parse("(Missile(x) => Weapon(x))"); 029 List predicates = collector.getPredicates(s); 030 assertNotNull(predicates); 031 } 032 033 }