Add SpringTestContextExtension to existing ExtendWith
rg 'import org.springframework.security.config.test.SpringTestContext' -l -g "*.java" | xargs rg '@ExtendWith' -l | xargs sed -E -i 's/@ExtendWith\((.*)\)/@ExtendWith({ \1, SpringTestContextExtension.class })/'
This commit is contained in:
parent
5133340bf8
commit
e4b09f62f0
|
@ -73,7 +73,7 @@ import static org.mockito.Mockito.verify;
|
|||
* @author Rob Winch
|
||||
* @author Artsiom Yudovin
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ExtendWith({ SpringExtension.class, SpringTestContextExtension.class })
|
||||
@SecurityTestExecutionListeners
|
||||
public class GlobalMethodSecurityConfigurationTests {
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
|||
* @author Rob Winch
|
||||
* @author Josh Cummings
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ExtendWith({ SpringExtension.class, SpringTestContextExtension.class })
|
||||
@SecurityTestExecutionListeners
|
||||
public class NamespaceGlobalMethodSecurityExpressionHandlerTests {
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
|||
* @author Rob Winch
|
||||
* @author Josh Cummings
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ExtendWith({ SpringExtension.class, SpringTestContextExtension.class })
|
||||
@SecurityTestExecutionListeners
|
||||
public class NamespaceGlobalMethodSecurityTests {
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
|||
* @author Evgeniy Cheban
|
||||
* @author Josh Cummings
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ExtendWith({ SpringExtension.class, SpringTestContextExtension.class })
|
||||
@SecurityTestExecutionListeners
|
||||
public class PrePostMethodSecurityConfigurationTests {
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
|||
* @author Josh Cummings
|
||||
*
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ExtendWith({ SpringExtension.class, SpringTestContextExtension.class })
|
||||
@SecurityTestExecutionListeners
|
||||
public class Sec2758Tests {
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
|
|||
* @author Rob Winch
|
||||
*
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@ExtendWith({ MockitoExtension.class, SpringTestContextExtension.class })
|
||||
public class WebSecurityConfigurerAdapterMockitoTests {
|
||||
|
||||
ConfigurableWebApplicationContext context;
|
||||
|
|
|
@ -41,7 +41,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
|||
/**
|
||||
* @author Josh Cummings
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ExtendWith({ SpringExtension.class, SpringTestContextExtension.class })
|
||||
@SecurityTestExecutionListeners
|
||||
public class ExceptionHandlingConfigurerAccessDeniedHandlerTests {
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
|||
* @author Rafiullah Hamedy
|
||||
*
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ExtendWith({ SpringExtension.class, SpringTestContextExtension.class })
|
||||
@SecurityTestExecutionListeners
|
||||
public class LogoutConfigurerClearSiteDataTests {
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
|||
* @author Josh Cummings
|
||||
*
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ExtendWith({ SpringExtension.class, SpringTestContextExtension.class })
|
||||
@SecurityTestExecutionListeners
|
||||
public class NamespaceHttpExpressionHandlerTests {
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
|||
* @author Rob Winch
|
||||
* @author Josh Cummings
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ExtendWith({ SpringExtension.class, SpringTestContextExtension.class })
|
||||
@SecurityTestExecutionListeners
|
||||
public class NamespaceHttpLogoutTests {
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
|||
* @author Josh Cummings
|
||||
*
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ExtendWith({ SpringExtension.class, SpringTestContextExtension.class })
|
||||
@SecurityTestExecutionListeners
|
||||
public class UrlAuthorizationsTests {
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ import static org.springframework.security.test.web.reactive.server.SecurityMock
|
|||
* @author Rob Winch
|
||||
* @since 5.0
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ExtendWith({ SpringExtension.class, SpringTestContextExtension.class })
|
||||
@SecurityTestExecutionListeners
|
||||
public class EnableWebFluxSecurityTests {
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
|||
* @author Luke Taylor
|
||||
* @author Josh Cummings
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ExtendWith({ SpringExtension.class, SpringTestContextExtension.class })
|
||||
@SecurityTestExecutionListeners
|
||||
public class AccessDeniedConfigTests {
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
|||
* @author Rob Winch
|
||||
* @author Josh Cummings
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ExtendWith({ SpringExtension.class, SpringTestContextExtension.class })
|
||||
@SecurityTestExecutionListeners
|
||||
public class CsrfConfigTests {
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
|||
*
|
||||
* @author Joe Grandja
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ExtendWith({ SpringExtension.class, SpringTestContextExtension.class })
|
||||
@SecurityTestExecutionListeners
|
||||
public class OAuth2ClientBeanDefinitionParserTests {
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
|||
*
|
||||
* @author Ruby Hartono
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ExtendWith({ SpringExtension.class, SpringTestContextExtension.class })
|
||||
@SecurityTestExecutionListeners
|
||||
public class OAuth2LoginBeanDefinitionParserTests {
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
|||
/**
|
||||
* @author Josh Cummings
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ExtendWith({ SpringExtension.class, SpringTestContextExtension.class })
|
||||
@SecurityTestExecutionListeners
|
||||
public class OAuth2ResourceServerBeanDefinitionParserTests {
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
|||
/**
|
||||
* @author Josh Cummings
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ExtendWith({ SpringExtension.class, SpringTestContextExtension.class })
|
||||
@SecurityTestExecutionListeners
|
||||
public class PlaceHolderAndELConfigTests {
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
|||
* @author Rob Winch
|
||||
* @author Josh Cummings
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ExtendWith({ SpringExtension.class, SpringTestContextExtension.class })
|
||||
@SecurityTestExecutionListeners
|
||||
public class SecurityContextHolderAwareRequestConfigTests {
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
|||
/**
|
||||
* @author Josh Cummings
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ExtendWith({ SpringExtension.class, SpringTestContextExtension.class })
|
||||
@SecurityTestExecutionListeners
|
||||
public class MethodSecurityBeanDefinitionParserTests {
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ import static org.mockito.Mockito.verify;
|
|||
* @author Parikshit Dutta
|
||||
* @since 5.1
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ExtendWith({ SpringExtension.class, SpringTestContextExtension.class })
|
||||
@SecurityTestExecutionListeners
|
||||
public class OAuth2ClientSpecTests {
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ import static org.mockito.Mockito.verify;
|
|||
* Tests for
|
||||
* {@link org.springframework.security.config.web.server.ServerHttpSecurity.OAuth2ResourceServerSpec}
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ExtendWith({ SpringExtension.class, SpringTestContextExtension.class })
|
||||
public class OAuth2ResourceServerSpecTests {
|
||||
|
||||
private String expired = "eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE1MzUwMzc4OTd9.jqZDDjfc2eysX44lHXEIr9XFd2S8vjIZHCccZU-dRWMRJNsQ1QN5VNnJGklqJBXJR4qgla6cmVqPOLkUHDb0sL0nxM5XuzQaG5ZzKP81RV88shFyAiT0fD-6nl1k-Fai-Fu-VkzSpNXgeONoTxDaYhdB-yxmgrgsApgmbOTE_9AcMk-FQDXQ-pL9kynccFGV0lZx4CA7cyknKN7KBxUilfIycvXODwgKCjj_1WddLTCNGYogJJSg__7NoxzqbyWd3udbHVjqYq7GsMMrGB4_2kBD4CkghOSNcRHbT_DIXowxfAVT7PAg7Q0E5ruZsr2zPZacEUDhJ6-wbvlA0FAOUg";
|
||||
|
|
|
@ -74,7 +74,7 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
|
|||
* @author Rob Winch
|
||||
* @author Josh Cummings
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ExtendWith({ SpringExtension.class, SpringTestContextExtension.class })
|
||||
@SecurityTestExecutionListeners
|
||||
public class WebSocketMessageBrokerConfigTests {
|
||||
|
||||
|
|
Loading…
Reference in New Issue