jadex.bdi.testcases.semiautomatic.DeletionPlan 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.semiautomatic;
import jadex.bdi.runtime.Plan;
/**
* Test if the agent can be properly deleted.
*/
public class DeletionPlan extends Plan
{
//-------- constructors --------
/**
* Create a new countdown plan.
*/
public DeletionPlan()
{
getLogger().info("Created: "+this);
}
//-------- methods --------
/**
* The plan body.
*/
public void body()
{
getLogger().info("Oki executing body.");
getLogger().info("Now trying to delete myself.");
getLogger().info("When no more output test has failed.");
startAtomic();
killAgent();
getLogger().info("Alive while plan is running (When no more outputs, test succeeded).");
endAtomic();
getLogger().info("Still alive (TEST FAILED).");
}
}