Class WireMockTestExecutionListener

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

    public final class WireMockTestExecutionListener
    extends org.springframework.test.context.support.AbstractTestExecutionListener
    Dirties the test context if WireMock was running on a fixed port.
    Since:
    1.2.6
    Author:
    Marcin Grzejszczak, Matt Garner, Waldemar Panas, Fabian Winter
    • Constructor Detail

      • WireMockTestExecutionListener

        public WireMockTestExecutionListener()
    • Method Detail

      • prepareTestInstance

        public void prepareTestInstance​(org.springframework.test.context.TestContext testContext)
                                 throws Exception
        Specified by:
        prepareTestInstance in interface org.springframework.test.context.TestExecutionListener
        Overrides:
        prepareTestInstance in class org.springframework.test.context.support.AbstractTestExecutionListener
        Throws:
        Exception
      • 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
      • afterTestMethod

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