Class CamelSpringTestContextLoaderTestExecutionListener
- java.lang.Object
-
- org.springframework.test.context.support.AbstractTestExecutionListener
-
- org.apache.camel.test.spring.junit5.CamelSpringTestContextLoaderTestExecutionListener
-
- All Implemented Interfaces:
org.springframework.core.Ordered
,org.springframework.test.context.TestExecutionListener
public class CamelSpringTestContextLoaderTestExecutionListener extends org.springframework.test.context.support.AbstractTestExecutionListener
Helper forCamelSpringTestContextLoader
that sets the test class state inCamelSpringTestHelper
almost immediately before the loader initializes the Spring context. Implemented as a listener as the state can be set on aThreadLocal
and we are pretty sure that the same thread will be used to initialize the Spring context.
-
-
Constructor Summary
Constructors Constructor Description CamelSpringTestContextLoaderTestExecutionListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getOrder()
Returns the precedence that is used by Spring to choose the appropriate execution order of test listeners.void
prepareTestInstance(org.springframework.test.context.TestContext testContext)
-
-
-
Method Detail
-
getOrder
public int getOrder()
Returns the precedence that is used by Spring to choose the appropriate execution order of test listeners. SeeSpringTestExecutionListenerSorter.getPrecedence(Class)
for more.- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
- Overrides:
getOrder
in classorg.springframework.test.context.support.AbstractTestExecutionListener
-
prepareTestInstance
public void prepareTestInstance(org.springframework.test.context.TestContext testContext) throws Exception
- Specified by:
prepareTestInstance
in interfaceorg.springframework.test.context.TestExecutionListener
- Overrides:
prepareTestInstance
in classorg.springframework.test.context.support.AbstractTestExecutionListener
- Throws:
Exception
-
-