jadex.bdi.testcases.beliefs.BeliefNotFoundPlan Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jadex-applications-bdi Show documentation
Show all versions of jadex-applications-bdi Show documentation
The Jadex BDI applications package contain
several example applications, benchmarks and
testcases using BDI agents.
package jadex.bdi.testcases.beliefs;
import jadex.base.test.TestReport;
import jadex.bdi.runtime.Plan;
/**
* Test belief access.
*/
public class BeliefNotFoundPlan extends Plan
{
/**
* The plan body.
*/
public void body()
{
TestReport tr = new TestReport("#1", "Test belief access.");
try
{
getBeliefbase().getBelief("belx");
tr.setReason("No exception occurred");
}
catch(Exception e)
{
tr.setSucceeded(true);
}
getBeliefbase().getBeliefSet("testcap.reports").addFact(tr);
tr = new TestReport("#1", "Test beliefset access.");
try
{
getBeliefbase().getBeliefSet("belsetx");
}
catch(Exception e)
{
tr.setSucceeded(true);
}
getBeliefbase().getBeliefSet("testcap.reports").addFact(tr);
}
}