Class TearDownStack

  • All Implemented Interfaces:
    TearDownAccepter

    public class TearDownStack
    extends java.lang.Object
    implements TearDownAccepter
    A TearDownStack contains a stack of TearDown instances.

    This class is thread-safe.

    Since:
    10.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.logging.Logger logger  
      (package private) java.util.LinkedList<TearDown> stack  
      private boolean suppressThrows  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addTearDown​(TearDown tearDown)
      Registers a TearDown implementor which will be run after the test proper.
      void runTearDown()
      Causes teardown to execute.
      • Methods inherited from class java.lang.Object

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

      • logger

        private static final java.util.logging.Logger logger
      • stack

        final java.util.LinkedList<TearDown> stack
      • suppressThrows

        private final boolean suppressThrows
    • Constructor Detail

      • TearDownStack

        public TearDownStack()
      • TearDownStack

        public TearDownStack​(boolean suppressThrows)
    • Method Detail

      • addTearDown

        public final void addTearDown​(TearDown tearDown)
        Description copied from interface: TearDownAccepter
        Registers a TearDown implementor which will be run after the test proper.

        In JUnit4 language, that means as an @After.

        In JUnit3 language, that means during the TestCase.tearDown() step.

        Specified by:
        addTearDown in interface TearDownAccepter
      • runTearDown

        public final void runTearDown()
        Causes teardown to execute.