jadex.micro.testcases.EndStepTestStep Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jadex-applications-micro Show documentation
Show all versions of jadex-applications-micro Show documentation
The Jadex micro applications package contains several example applications, benchmarks and testcases using micro agents.
package jadex.micro.testcases;
import jadex.base.test.TestReport;
import jadex.base.test.Testcase;
import jadex.bridge.IComponentStep;
import jadex.bridge.IInternalAccess;
import jadex.bridge.component.IArgumentsResultsFeature;
import jadex.bridge.component.IExecutionFeature;
import jadex.commons.future.IFuture;
/**
* Behavior of the component result test.
*/
public class EndStepTestStep implements IComponentStep
{
/**
* Execute the test.
*/
public IFuture execute(final IInternalAccess ia)
{
return ia.getComponentFeature(IExecutionFeature.class).waitForDelay(2000, new IComponentStep()
{
public IFuture execute(IInternalAccess ia)
{
ia.getComponentFeature(IArgumentsResultsFeature.class).getResults().put("testresults", new Testcase(1,
new TestReport[]{new TestReport("#1", "Test if end step is executed", true, null)}));
return IFuture.DONE;
}
});
}
}