
test.JadeAgTest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jason Show documentation
Show all versions of jason Show documentation
Jason is a fully-fledged interpreter for an extended version of AgentSpeak, a BDI agent-oriented logic programming language.
package test;
import jade.lang.acl.ACLMessage;
import jason.asSemantics.Message;
import jason.infra.jade.JadeAg;
import junit.framework.TestCase;
/** JUnit test case for syntax package */
public class JadeAgTest extends TestCase {
public void testKQMLtoACL() {
assertEquals(JadeAg.kqmlToACL("tell").getPerformative(), ACLMessage.INFORM);
assertEquals(JadeAg.aclToKqml(JadeAg.kqmlToACL("tell")),"tell");
assertEquals(JadeAg.aclToKqml(new ACLMessage(ACLMessage.CFP)),"cfp");
assertEquals(JadeAg.kqmlToACL(JadeAg.aclToKqml(new ACLMessage(ACLMessage.CFP))).getPerformative(),ACLMessage.CFP);
ACLMessage m = JadeAg.kqmlToACL("untell");
assertEquals(m.getPerformative(), ACLMessage.INFORM_REF);
assertNotNull(m.getUserDefinedParameter("kqml-performative"));
assertEquals(m.getUserDefinedParameter("kqml-performative"),"untell");
assertEquals(JadeAg.aclToKqml(m),"untell");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy