Class ReactorContextTestExecutionListener
- java.lang.Object
-
- org.springframework.test.context.support.AbstractTestExecutionListener
-
- org.springframework.security.test.context.support.ReactorContextTestExecutionListener
-
- All Implemented Interfaces:
org.springframework.core.Ordered,org.springframework.test.context.TestExecutionListener
public class ReactorContextTestExecutionListener extends org.springframework.test.context.support.AbstractTestExecutionListenerSets up the Reactor Context with the Authentication from the TestSecurityContextHolder and then clears the Reactor Context at the end of the tests.- Since:
- 5.0
- See Also:
WithSecurityContextTestExecutionListener,SecurityTestExecutionListeners
-
-
Constructor Summary
Constructors Constructor Description ReactorContextTestExecutionListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterTestClass(org.springframework.test.context.TestContext testContext)voidafterTestExecution(org.springframework.test.context.TestContext testContext)voidafterTestMethod(org.springframework.test.context.TestContext testContext)voidbeforeTestClass(org.springframework.test.context.TestContext testContext)voidbeforeTestExecution(org.springframework.test.context.TestContext testContext)voidbeforeTestMethod(org.springframework.test.context.TestContext testContext)intgetOrder()Returns11000.voidprepareTestInstance(org.springframework.test.context.TestContext testContext)
-
-
-
Method Detail
-
getOrder
public int getOrder()
Returns11000.- Specified by:
getOrderin interfaceorg.springframework.core.Ordered- Overrides:
getOrderin classorg.springframework.test.context.support.AbstractTestExecutionListener
-
beforeTestClass
public void beforeTestClass(org.springframework.test.context.TestContext testContext) throws java.lang.Exception- Specified by:
beforeTestClassin interfaceorg.springframework.test.context.TestExecutionListener- Overrides:
beforeTestClassin classorg.springframework.test.context.support.AbstractTestExecutionListener- Throws:
java.lang.Exception
-
prepareTestInstance
public void prepareTestInstance(org.springframework.test.context.TestContext testContext) throws java.lang.Exception- Specified by:
prepareTestInstancein interfaceorg.springframework.test.context.TestExecutionListener- Overrides:
prepareTestInstancein classorg.springframework.test.context.support.AbstractTestExecutionListener- Throws:
java.lang.Exception
-
beforeTestMethod
public void beforeTestMethod(org.springframework.test.context.TestContext testContext) throws java.lang.Exception- Specified by:
beforeTestMethodin interfaceorg.springframework.test.context.TestExecutionListener- Overrides:
beforeTestMethodin classorg.springframework.test.context.support.AbstractTestExecutionListener- Throws:
java.lang.Exception
-
beforeTestExecution
public void beforeTestExecution(org.springframework.test.context.TestContext testContext) throws java.lang.Exception- Specified by:
beforeTestExecutionin interfaceorg.springframework.test.context.TestExecutionListener- Overrides:
beforeTestExecutionin classorg.springframework.test.context.support.AbstractTestExecutionListener- Throws:
java.lang.Exception
-
afterTestExecution
public void afterTestExecution(org.springframework.test.context.TestContext testContext) throws java.lang.Exception- Specified by:
afterTestExecutionin interfaceorg.springframework.test.context.TestExecutionListener- Overrides:
afterTestExecutionin classorg.springframework.test.context.support.AbstractTestExecutionListener- Throws:
java.lang.Exception
-
afterTestMethod
public void afterTestMethod(org.springframework.test.context.TestContext testContext) throws java.lang.Exception- Specified by:
afterTestMethodin interfaceorg.springframework.test.context.TestExecutionListener- Overrides:
afterTestMethodin classorg.springframework.test.context.support.AbstractTestExecutionListener- Throws:
java.lang.Exception
-
afterTestClass
public void afterTestClass(org.springframework.test.context.TestContext testContext) throws java.lang.Exception- Specified by:
afterTestClassin interfaceorg.springframework.test.context.TestExecutionListener- Overrides:
afterTestClassin classorg.springframework.test.context.support.AbstractTestExecutionListener- Throws:
java.lang.Exception
-
-