Class ComponentTestBase

  • All Implemented Interfaces:
    junit.framework.Test
    Direct Known Subclasses:
    ComponentTest, ComponentTestLazyPlatform

    public class ComponentTestBase
    extends junit.framework.TestCase
    Test a component.
    • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 interface junit.framework.Test
        Overrides:
        countTestCases in class junit.framework.TestCase
      • runBare

        public void runBare()
        Test the component.
        Overrides:
        runBare in class junit.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.