Package jadex.micro.testcases
Class TestAgent
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- jadex.base.test.impl.ComponentTestLazyPlatform
-
- jadex.base.test.impl.JunitAgentTest
-
- jadex.micro.testcases.RemoteTestBaseAgent
-
- jadex.micro.testcases.TestAgent
-
- All Implemented Interfaces:
junit.framework.Test
public abstract class TestAgent extends RemoteTestBaseAgent
-
-
Field Summary
Fields Modifier and Type Field Description protected IInternalAccess
agent
protected java.util.Set<IExternalAccess>
platforms
-
Fields inherited from class jadex.micro.testcases.RemoteTestBaseAgent
proxies
-
-
Constructor Summary
Constructors Constructor Description TestAgent()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IFuture<java.lang.Void>
body()
The agent body.IFuture<java.lang.Void>
cleanup()
Cleanup created platforms.static IFuture<IComponentIdentifier>
createComponent(IInternalAccess agent, java.lang.String filename, java.util.Map<java.lang.String,java.lang.Object> args, java.lang.String config, IComponentIdentifier root, IResultListener<java.util.Map<java.lang.String,java.lang.Object>> reslis)
protected IFuture<IComponentIdentifier>
createComponent(java.lang.String filename, IComponentIdentifier root, IResultListener<java.util.Map<java.lang.String,java.lang.Object>> reslis)
protected IFuture<IComponentIdentifier>
createComponent(java.lang.String filename, java.util.Map<java.lang.String,java.lang.Object> args, java.lang.String config, IComponentIdentifier root, IResultListener<java.util.Map<java.lang.String,java.lang.Object>> reslis)
protected IFuture<IExternalAccess>
createPlatform(IPlatformConfiguration config, java.lang.String[] args)
protected IFuture<IExternalAccess>
createPlatform(java.lang.String[] args)
protected IFuture<java.util.Map<java.lang.String,java.lang.Object>>
destroyComponent(IComponentIdentifier cid)
protected int
getTestCount()
The test count.protected IFuture<java.lang.Void>
performTests(Testcase tc)
The agent body.protected IFuture<IExternalAccess>
setupRemotePlatform(boolean manualremove)
Setup a remote test.protected IFuture<TestReport>
test(IExternalAccess platform, boolean local)
Perform the test.<T> IFuture<T>
waitForRealtimeDelay(long delay, IComponentStep<T> step)
-
Methods inherited from class jadex.micro.testcases.RemoteTestBaseAgent
createProxies, disableLocalSimulationMode, disableLocalSimulationMode
-
Methods inherited from class jadex.base.test.impl.JunitAgentTest
getConfig, runBare, setConfig, testComponent
-
Methods inherited from class jadex.base.test.impl.ComponentTestLazyPlatform
checkTestResults, componentStarted, countTestCases, getName, getTimeout, setPlatform, toString
-
Methods inherited from class junit.framework.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, run, run, runTest, setName, setUp, tearDown
-
-
-
-
Field Detail
-
agent
protected IInternalAccess agent
-
platforms
protected java.util.Set<IExternalAccess> platforms
-
-
Method Detail
-
cleanup
public IFuture<java.lang.Void> cleanup()
Cleanup created platforms.- Overrides:
cleanup
in classRemoteTestBaseAgent
-
body
public IFuture<java.lang.Void> body()
The agent body.
-
getTestCount
protected int getTestCount()
The test count.
-
createPlatform
protected IFuture<IExternalAccess> createPlatform(java.lang.String[] args)
-
createPlatform
protected IFuture<IExternalAccess> createPlatform(IPlatformConfiguration config, java.lang.String[] args)
-
createComponent
protected IFuture<IComponentIdentifier> createComponent(java.lang.String filename, IComponentIdentifier root, IResultListener<java.util.Map<java.lang.String,java.lang.Object>> reslis)
-
createComponent
protected IFuture<IComponentIdentifier> createComponent(java.lang.String filename, java.util.Map<java.lang.String,java.lang.Object> args, java.lang.String config, IComponentIdentifier root, IResultListener<java.util.Map<java.lang.String,java.lang.Object>> reslis)
-
createComponent
public static IFuture<IComponentIdentifier> createComponent(IInternalAccess agent, java.lang.String filename, java.util.Map<java.lang.String,java.lang.Object> args, java.lang.String config, IComponentIdentifier root, IResultListener<java.util.Map<java.lang.String,java.lang.Object>> reslis)
-
destroyComponent
protected IFuture<java.util.Map<java.lang.String,java.lang.Object>> destroyComponent(IComponentIdentifier cid)
-
setupRemotePlatform
protected IFuture<IExternalAccess> setupRemotePlatform(boolean manualremove)
Setup a remote test.
-
waitForRealtimeDelay
public <T> IFuture<T> waitForRealtimeDelay(long delay, IComponentStep<T> step)
-
test
protected IFuture<TestReport> test(IExternalAccess platform, boolean local)
Perform the test.- Parameters:
cms
- The cms of the platform to test (local or remote).local
- True when tests runs on local platform.- Returns:
- The test result.
-
-