Class DirtyContextBeforeAndAfterClassTestExecutionListener

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

    public class DirtyContextBeforeAndAfterClassTestExecutionListener
    extends org.springframework.test.context.support.AbstractTestExecutionListener
    TestExecutionListener which marks the context as dirty before and after the test class. Based on example from https://stackoverflow.com/questions/39277040/
    Author:
    bbpennel
    • Method Detail

      • getOrder

        public int getOrder()
        Specified by:
        getOrder in interface org.springframework.core.Ordered
        Overrides:
        getOrder in class org.springframework.test.context.support.AbstractTestExecutionListener
      • beforeTestClass

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

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