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:

    Author:
    jbarrez @RunWith(SpringJUnit4ClassRunner.class) @TestExecutionListeners(CleanTestExecutionListener.class) @ContextConfiguration("...")
    • Constructor Detail

      • CleanTestExecutionListener

        public CleanTestExecutionListener()
    • Method Detail

      • afterTestClass

        public void afterTestClass​(org.springframework.test.context.TestContext testContext)
                            throws Exception
        Specified by:
        afterTestClass in interface org.springframework.test.context.TestExecutionListener
        Overrides:
        afterTestClass in class org.springframework.test.context.support.AbstractTestExecutionListener
        Throws:
        Exception