Package jadex.base.test.impl
Class ComponentTestBase
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- jadex.base.test.impl.ComponentTestBase
-
- All Implemented Interfaces:
junit.framework.Test
- Direct Known Subclasses:
ComponentTest
,ComponentTestLazyPlatform
public class ComponentTestBase extends junit.framework.TestCase
Test a component.
-
-
Field Summary
Fields Modifier and Type Field Description protected IPlatformConfiguration
conf
The platform configurationprotected java.lang.String
filename
The component model.protected IExternalAccess
platform
The component management system.protected IResourceIdentifier
rid
The component resource identifier.protected IAbortableTestSuite
suite
The test suite.protected long
timeout
The timeout.
-
Constructor Summary
Constructors Constructor Description ComponentTestBase()
Create a new ComponentTest.ComponentTestBase(java.lang.String comp, IAbortableTestSuite suite)
Create a component test.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkTestResults(java.util.Map<java.lang.String,java.lang.Object> res)
Optional checking after component has finished.protected void
componentStarted(jadex.commons.future.IFuture<IExternalAccess> fut)
Called when a component has been started.int
countTestCases()
The number of test cases.protected IExternalAccess
createPlatform()
Create a new platform (only if conf is given and thus platform per test is enabled)long
getTimeout()
Get the timeout.void
runBare()
Test the component.-
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, getName, run, run, runTest, setName, setUp, tearDown, toString
-
-
-
-
Field Detail
-
platform
protected IExternalAccess platform
The component management system.
-
conf
protected IPlatformConfiguration conf
The platform configuration
-
filename
protected java.lang.String filename
The component model.
-
rid
protected IResourceIdentifier rid
The component resource identifier.
-
timeout
protected long timeout
The timeout.
-
suite
protected IAbortableTestSuite suite
The test suite.
-
-
Constructor Detail
-
ComponentTestBase
public ComponentTestBase()
Create a new ComponentTest.
-
ComponentTestBase
public ComponentTestBase(java.lang.String comp, IAbortableTestSuite suite)
Create a component test. Run on existing test suite platform.- Parameters:
cms
- The CMS of the test suite platform.
-
-
Method Detail
-
countTestCases
public int countTestCases()
The number of test cases.- Specified by:
countTestCases
in interfacejunit.framework.Test
- Overrides:
countTestCases
in classjunit.framework.TestCase
-
runBare
public void runBare()
Test the component.- Overrides:
runBare
in classjunit.framework.TestCase
-
componentStarted
protected void componentStarted(jadex.commons.future.IFuture<IExternalAccess> fut)
Called when a component has been started.- Parameters:
cid
- The cid, set as soon as known.
-
createPlatform
protected IExternalAccess createPlatform()
Create a new platform (only if conf is given and thus platform per test is enabled)
-
checkTestResults
protected void checkTestResults(java.util.Map<java.lang.String,java.lang.Object> res)
Optional checking after component has finished.- Parameters:
res
- The results.
-
getTimeout
public long getTimeout()
Get the timeout.
-
-