jadex.bdi.testcases.StoreReportPlan 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;
import jadex.base.test.TestReport;
import jadex.bdi.runtime.Plan;
/**
* This plan stores a test report in the reports belief set.
*/
public class StoreReportPlan extends Plan
{
//-------- attributes --------
/** The test report. */
protected TestReport report;
//-------- constructors --------
/**
* Create a new result plan.
* @param report The result value.
*/
public StoreReportPlan()
{
this.report = (TestReport)getParameter("report").getValue();
if(report==null)
throw new RuntimeException("Report must not null.");
}
//-------- methods --------
/**
* The plan body.
*/
public void body()
{
getLogger().info("Storing report: "+report);
getBeliefbase().getBeliefSet("testcap.reports").addFact(report);
}
}