Class CleanTestExecutionListener

  • All Implemented Interfaces:
    org.springframework.core.Ordered, org.springframework.test.context.TestExecutionListener

    public class CleanTestExecutionListener
    extends org.springframework.test.context.support.AbstractTestExecutionListener
    Removes all deployments at the end of a complete test class.

    Use this as follows in a Spring test: @RunWith(SpringJUnit4ClassRunner.class) @TestExecutionListeners(CleanTestExecutionListener.class) @ContextConfiguration("...")

    • Field Summary

      • Fields inherited from interface org.springframework.core.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterTestClass​(org.springframework.test.context.TestContext testContext)  
      • Methods inherited from class org.springframework.test.context.support.AbstractTestExecutionListener

        getOrder
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.springframework.test.context.TestExecutionListener

        afterTestExecution, afterTestMethod, beforeTestClass, beforeTestExecution, beforeTestMethod, prepareTestInstance
    • Constructor Detail

      • CleanTestExecutionListener

        public CleanTestExecutionListener()
    • Method Detail

      • afterTestClass

        public void afterTestClass​(org.springframework.test.context.TestContext testContext)
                            throws java.lang.Exception
        Throws:
        java.lang.Exception