Class TestDecorator

  • All Implemented Interfaces:
    Test
    Direct Known Subclasses:
    RepeatedTest, TestSetup

    public class TestDecorator
    extends Assert
    implements Test
    A Decorator for Tests. Use TestDecorator as the base class for defining new test decorators. Test decorator subclasses can be introduced to add behaviour before or after a test is run.
    • Method Detail

      • countTestCases

        public int countTestCases()
        Description copied from interface: Test
        Counts the number of test cases that will be run by this test.
        Specified by:
        countTestCases in interface Test
      • run

        public void run​(TestResult result)
        Description copied from interface: Test
        Runs a test and collects its result in a TestResult instance.
        Specified by:
        run in interface Test
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object