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

jadex.micro.testcases.EndStepTestStep Maven / Gradle / Ivy

Go to download

The Jadex micro applications package contains several example applications, benchmarks and testcases using micro agents.

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy