All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jadex.bdi.testcases.beliefs.BeliefNotFoundPlan Maven / Gradle / Ivy

Go to download

The Jadex BDI applications package contain several example applications, benchmarks and testcases using BDI agents.

There is a newer version: 2.4
Show newest version
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);
	}
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy