Class AbstractTestCase<A,​E>

  • Type Parameters:
    A - the generic type for the actual
    E - the element type for the expected
    Direct Known Subclasses:
    BaseComparatorTestCase, BaseTestCase

    public abstract class AbstractTestCase<A,​E>
    extends java.lang.Object
    The abstract class AbstractTestCase is for unit tests.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected A actual
      The boolean actual result of the tests.
      protected E expected
      The boolean expected result of the tests.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void setUp()
      Sets up method will be invoked before every unit test method
      protected void tearDown()
      Tear down method will be invoked after every unit test method

      Note: call super.tearDown() if you overwrite it for set actual and expected to null
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • actual

        protected A actual
        The boolean actual result of the tests.
      • expected

        protected E expected
        The boolean expected result of the tests.
    • Constructor Detail

      • AbstractTestCase

        public AbstractTestCase()
    • Method Detail

      • setUp

        @BeforeMethod
        protected void setUp()
                      throws java.lang.Exception
        Sets up method will be invoked before every unit test method
        Throws:
        java.lang.Exception - is thrown if an exception occurs
      • tearDown

        @AfterMethod
        protected void tearDown()
                         throws java.lang.Exception
        Tear down method will be invoked after every unit test method

        Note: call super.tearDown() if you overwrite it for set actual and expected to null
        Throws:
        java.lang.Exception - is thrown if an exception occurs