remove @Rule

rg '@Rule' -g '!buildSrc/**' -l | xargs sed -i '/@Rule/d'
rg 'import org.junit.Rule' -g '!buildSrc/**' -l | xargs sed -i '/import org.junit.Rule/d'
This commit is contained in:
Rob Winch 2021-07-09 09:41:38 -05:00
parent 671040bb27
commit 60078df62a
189 changed files with 0 additions and 380 deletions

View File

@ -23,7 +23,6 @@ import java.util.List;
import javax.naming.directory.SearchControls; import javax.naming.directory.SearchControls;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -55,7 +54,6 @@ public class LdapAuthenticationProviderBuilderSecurityBuilderTests {
static Integer port; static Integer port;
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.authentication.ldap;
import java.util.Collections; import java.util.Collections;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -38,7 +37,6 @@ import static org.springframework.security.test.web.servlet.response.SecurityMoc
public class LdapAuthenticationProviderConfigurerTests { public class LdapAuthenticationProviderConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -20,7 +20,6 @@ import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -46,7 +45,6 @@ import static org.springframework.security.test.web.servlet.response.SecurityMoc
public class NamespaceLdapAuthenticationProviderTests { public class NamespaceLdapAuthenticationProviderTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -19,7 +19,6 @@ package org.springframework.security.config.annotation.authentication;
import java.util.Arrays; import java.util.Arrays;
import java.util.Properties; import java.util.Properties;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -68,7 +67,6 @@ import static org.springframework.security.test.web.servlet.response.SecurityMoc
*/ */
public class AuthenticationManagerBuilderTests { public class AuthenticationManagerBuilderTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired(required = false) @Autowired(required = false)

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.authentication; package org.springframework.security.config.annotation.authentication;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -37,7 +36,6 @@ import static org.springframework.security.test.web.servlet.response.SecurityMoc
*/ */
public class NamespaceAuthenticationManagerTests { public class NamespaceAuthenticationManagerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.authentication; package org.springframework.security.config.annotation.authentication;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -39,7 +38,6 @@ import static org.springframework.security.test.web.servlet.response.SecurityMoc
*/ */
public class NamespaceAuthenticationProviderTests { public class NamespaceAuthenticationProviderTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.authentication;
import javax.sql.DataSource; import javax.sql.DataSource;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -45,7 +44,6 @@ import static org.springframework.security.test.web.servlet.response.SecurityMoc
*/ */
public class NamespaceJdbcUserServiceTests { public class NamespaceJdbcUserServiceTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.authentication;
import javax.sql.DataSource; import javax.sql.DataSource;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -43,7 +42,6 @@ import static org.springframework.security.test.web.servlet.response.SecurityMoc
*/ */
public class NamespacePasswordEncoderTests { public class NamespacePasswordEncoderTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.authentication; package org.springframework.security.config.annotation.authentication;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -37,7 +36,6 @@ import static org.springframework.security.test.web.servlet.response.SecurityMoc
*/ */
public class PasswordEncoderConfigurerTests { public class PasswordEncoderConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -20,7 +20,6 @@ import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import org.junit.Rule;
import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
@ -73,7 +72,6 @@ import static org.mockito.Mockito.verify;
public class AuthenticationConfigurationTests { public class AuthenticationConfigurationTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired(required = false) @Autowired(required = false)

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.authentication.configuration; package org.springframework.security.config.annotation.authentication.configuration;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -33,7 +32,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*/ */
public class EnableGlobalAuthenticationTests { public class EnableGlobalAuthenticationTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
// gh-4086 // gh-4086

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.configuration; package org.springframework.security.config.annotation.configuration;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanClassLoaderAware; import org.springframework.beans.factory.BeanClassLoaderAware;
@ -45,7 +44,6 @@ import static org.mockito.Mockito.verify;
*/ */
public class AutowireBeanFactoryObjectPostProcessorTests { public class AutowireBeanFactoryObjectPostProcessorTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -23,7 +23,6 @@ import java.util.Map;
import javax.sql.DataSource; import javax.sql.DataSource;
import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInterceptor;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
@ -77,7 +76,6 @@ import static org.mockito.Mockito.verify;
@SecurityTestExecutionListeners @SecurityTestExecutionListeners
public class GlobalMethodSecurityConfigurationTests { public class GlobalMethodSecurityConfigurationTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired(required = false) @Autowired(required = false)

View File

@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.method.configuration;
import java.io.Serializable; import java.io.Serializable;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
@ -44,7 +43,6 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
@SecurityTestExecutionListeners @SecurityTestExecutionListeners
public class NamespaceGlobalMethodSecurityExpressionHandlerTests { public class NamespaceGlobalMethodSecurityExpressionHandlerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired(required = false) @Autowired(required = false)

View File

@ -23,7 +23,6 @@ import java.util.Collections;
import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation; import org.aopalliance.intercept.MethodInvocation;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
@ -67,7 +66,6 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
@SecurityTestExecutionListeners @SecurityTestExecutionListeners
public class NamespaceGlobalMethodSecurityTests { public class NamespaceGlobalMethodSecurityTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired(required = false) @Autowired(required = false)

View File

@ -23,7 +23,6 @@ import java.util.List;
import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation; import org.aopalliance.intercept.MethodInvocation;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
@ -69,7 +68,6 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
@SecurityTestExecutionListeners @SecurityTestExecutionListeners
public class PrePostMethodSecurityConfigurationTests { public class PrePostMethodSecurityConfigurationTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired(required = false) @Autowired(required = false)

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.method.configuration; package org.springframework.security.config.annotation.method.configuration;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -37,7 +36,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*/ */
public class ReactiveMethodSecurityConfigurationTests { public class ReactiveMethodSecurityConfigurationTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.method.configuration;
import java.io.Serializable; import java.io.Serializable;
import org.junit.Rule;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
@ -45,7 +44,6 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
*/ */
public class SampleEnableGlobalMethodSecurityTests { public class SampleEnableGlobalMethodSecurityTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.sec2758;
import javax.annotation.security.RolesAllowed; import javax.annotation.security.RolesAllowed;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
@ -55,7 +54,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
@SecurityTestExecutionListeners @SecurityTestExecutionListeners
public class Sec2758Tests { public class Sec2758Tests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -20,7 +20,6 @@ import java.util.Base64;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.junit.Rule;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
@ -52,7 +51,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*/ */
public class SampleWebSecurityConfigurerAdapterTests { public class SampleWebSecurityConfigurerAdapterTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.web;
import java.util.Arrays; import java.util.Arrays;
import org.junit.Rule;
import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
@ -60,7 +59,6 @@ public class WebSecurityConfigurerAdapterMockitoTests {
ConfigurableWebApplicationContext context; ConfigurableWebApplicationContext context;
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -25,7 +25,6 @@ import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -75,7 +74,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class WebSecurityConfigurerAdapterTests { public class WebSecurityConfigurerAdapterTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -25,7 +25,6 @@ import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.BeanCreationException;
@ -54,7 +53,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class HttpConfigurationTests { public class HttpConfigurationTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -27,7 +27,6 @@ import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse; import javax.servlet.ServletResponse;
import org.assertj.core.api.ListAssert; import org.assertj.core.api.ListAssert;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
@ -47,7 +46,6 @@ import static org.assertj.core.api.Assertions.assertThat;
public class HttpSecurityAddFilterTest { public class HttpSecurityAddFilterTest {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Test @Test

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.web.builders; package org.springframework.security.config.annotation.web.builders;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -43,7 +42,6 @@ public class HttpSecurityAuthenticationManagerTests {
@Autowired @Autowired
MockMvc mvc; MockMvc mvc;
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Test @Test

View File

@ -21,7 +21,6 @@ import javax.security.auth.login.LoginContext;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -81,7 +80,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class NamespaceHttpTests { public class NamespaceHttpTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.web.configuration; package org.springframework.security.config.annotation.web.configuration;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -48,7 +47,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class EnableWebSecurityTests { public class EnableWebSecurityTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -21,7 +21,6 @@ import java.util.concurrent.Callable;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import com.google.common.net.HttpHeaders; import com.google.common.net.HttpHeaders;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -66,7 +65,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class HttpSecurityConfigurationTests { public class HttpSecurityConfigurationTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.web.configuration;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.BeanCreationException;
@ -68,7 +67,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class OAuth2ClientConfigurationTests { public class OAuth2ClientConfigurationTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -19,7 +19,6 @@ package org.springframework.security.config.annotation.web.configuration;
import java.net.URL; import java.net.URL;
import java.net.URLClassLoader; import java.net.URLClassLoader;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.FatalBeanException; import org.springframework.beans.FatalBeanException;
@ -38,7 +37,6 @@ import static org.mockito.Mockito.mock;
*/ */
public class Sec2515Tests { public class Sec2515Tests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
// SEC-2515 // SEC-2515

View File

@ -23,7 +23,6 @@ import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.MockWebServer;
import okhttp3.mockwebserver.RecordedRequest; import okhttp3.mockwebserver.RecordedRequest;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -53,7 +52,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class SecurityReactorContextConfigurationResourceServerTests { public class SecurityReactorContextConfigurationResourceServerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -23,7 +23,6 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.junit.Rule;
import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
@ -71,7 +70,6 @@ public class SecurityReactorContextConfigurationTests {
private SecurityReactorContextConfiguration.SecurityReactorContextSubscriberRegistrar subscriberRegistrar = new SecurityReactorContextConfiguration.SecurityReactorContextSubscriberRegistrar(); private SecurityReactorContextConfiguration.SecurityReactorContextSubscriberRegistrar subscriberRegistrar = new SecurityReactorContextConfiguration.SecurityReactorContextSubscriberRegistrar();
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@BeforeEach @BeforeEach

View File

@ -25,7 +25,6 @@ import java.util.List;
import javax.servlet.Filter; import javax.servlet.Filter;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.BeanCreationException;
@ -86,10 +85,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class WebSecurityConfigurationTests { public class WebSecurityConfigurationTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Rule
public SpringTestContext child = new SpringTestContext(this); public SpringTestContext child = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.web.configuration.sec2377; package org.springframework.security.config.annotation.web.configuration.sec2377;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.ConfigurableApplicationContext;
@ -30,10 +29,8 @@ import org.springframework.security.config.test.SpringTestContext;
*/ */
public class Sec2377Tests { public class Sec2377Tests {
@Rule
public final SpringTestContext parent = new SpringTestContext(this); public final SpringTestContext parent = new SpringTestContext(this);
@Rule
public final SpringTestContext child = new SpringTestContext(this); public final SpringTestContext child = new SpringTestContext(this);
@Test @Test

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.web.configurers; package org.springframework.security.config.annotation.web.configurers;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -43,7 +42,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class AnonymousConfigurerTests { public class AnonymousConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.web.configurers; package org.springframework.security.config.annotation.web.configurers;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.BeanCreationException;
@ -59,7 +58,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class AuthorizeHttpRequestsConfigurerTests { public class AuthorizeHttpRequestsConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.web.configurers; package org.springframework.security.config.annotation.web.configurers;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -46,7 +45,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class ChannelSecurityConfigurerTests { public class ChannelSecurityConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -20,7 +20,6 @@ import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import com.google.common.net.HttpHeaders; import com.google.common.net.HttpHeaders;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.BeanCreationException;
@ -57,7 +56,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class CorsConfigurerTests { public class CorsConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.web.configurers; package org.springframework.security.config.annotation.web.configurers;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -44,7 +43,6 @@ public class CsrfConfigurerIgnoringRequestMatchersTests {
@Autowired @Autowired
MockMvc mvc; MockMvc mvc;
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Test @Test

View File

@ -21,7 +21,6 @@ import java.net.URI;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.BeanCreationException;
@ -86,7 +85,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class CsrfConfigurerTests { public class CsrfConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -23,7 +23,6 @@ import java.util.stream.Collectors;
import javax.servlet.Filter; import javax.servlet.Filter;
import javax.servlet.ServletException; import javax.servlet.ServletException;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -69,7 +68,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*/ */
public class DefaultFiltersTests { public class DefaultFiltersTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Test @Test

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.web.configurers; package org.springframework.security.config.annotation.web.configurers;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -63,7 +62,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class DefaultLoginPageConfigurerTests { public class DefaultLoginPageConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.web.configurers; package org.springframework.security.config.annotation.web.configurers;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
@ -48,7 +47,6 @@ public class ExceptionHandlingConfigurerAccessDeniedHandlerTests {
@Autowired @Autowired
MockMvc mvc; MockMvc mvc;
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Test @Test

View File

@ -19,7 +19,6 @@ package org.springframework.security.config.annotation.web.configurers;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -58,7 +57,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class ExceptionHandlingConfigurerTests { public class ExceptionHandlingConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -19,7 +19,6 @@ package org.springframework.security.config.annotation.web.configurers;
import java.io.Serializable; import java.io.Serializable;
import java.util.Collections; import java.util.Collections;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.BeanCreationException;
@ -77,7 +76,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class ExpressionUrlAuthorizationConfigurerTests { public class ExpressionUrlAuthorizationConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.web.configurers; package org.springframework.security.config.annotation.web.configurers;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -61,7 +60,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class FormLoginConfigurerTests { public class FormLoginConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.web.configurers; package org.springframework.security.config.annotation.web.configurers;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -39,7 +38,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class HeadersConfigurerEagerHeadersTests { public class HeadersConfigurerEagerHeadersTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -21,7 +21,6 @@ import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
import com.google.common.net.HttpHeaders; import com.google.common.net.HttpHeaders;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.BeanCreationException;
@ -54,7 +53,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class HeadersConfigurerTests { public class HeadersConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -19,7 +19,6 @@ package org.springframework.security.config.annotation.web.configurers;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -59,7 +58,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class HttpBasicConfigurerTests { public class HttpBasicConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -21,7 +21,6 @@ import java.util.List;
import javax.servlet.Filter; import javax.servlet.Filter;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
@ -48,7 +47,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*/ */
public class Issue55Tests { public class Issue55Tests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Test @Test

View File

@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.web.configurers;
import java.security.Principal; import java.security.Principal;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -53,7 +52,6 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
*/ */
public class JeeConfigurerTests { public class JeeConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.web.configurers; package org.springframework.security.config.annotation.web.configurers;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
@ -58,7 +57,6 @@ public class LogoutConfigurerClearSiteDataTests {
private static final String HEADER_VALUE = "\"cache\", \"cookies\", \"storage\", \"executionContexts\""; private static final String HEADER_VALUE = "\"cache\", \"cookies\", \"storage\", \"executionContexts\"";
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -17,7 +17,6 @@
package org.springframework.security.config.annotation.web.configurers; package org.springframework.security.config.annotation.web.configurers;
import org.apache.http.HttpHeaders; import org.apache.http.HttpHeaders;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.BeanCreationException;
@ -59,7 +58,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class LogoutConfigurerTests { public class LogoutConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -20,7 +20,6 @@ import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.Logger; import ch.qos.logback.classic.Logger;
import ch.qos.logback.classic.spi.ILoggingEvent; import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.Appender; import ch.qos.logback.core.Appender;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -47,7 +46,6 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
*/ */
public class NamespaceDebugTests { public class NamespaceDebugTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.web.configurers;
import java.util.Optional; import java.util.Optional;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -51,7 +50,6 @@ public class NamespaceHttpAnonymousTests {
@Autowired @Autowired
MockMvc mvc; MockMvc mvc;
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Test @Test

View File

@ -19,7 +19,6 @@ package org.springframework.security.config.annotation.web.configurers;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import org.apache.http.HttpHeaders; import org.apache.http.HttpHeaders;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -54,7 +53,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class NamespaceHttpBasicTests { public class NamespaceHttpBasicTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -26,7 +26,6 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.assertj.core.api.ListAssert; import org.assertj.core.api.ListAssert;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
@ -58,7 +57,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*/ */
public class NamespaceHttpCustomFilterTests { public class NamespaceHttpCustomFilterTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Test @Test

View File

@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.web.configurers;
import java.security.Principal; import java.security.Principal;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
@ -57,7 +56,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
@SecurityTestExecutionListeners @SecurityTestExecutionListeners
public class NamespaceHttpExpressionHandlerTests { public class NamespaceHttpExpressionHandlerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.web.configurers;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -45,7 +44,6 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
*/ */
public class NamespaceHttpFirewallTests { public class NamespaceHttpFirewallTests {
@Rule
public final SpringTestContext rule = new SpringTestContext(this); public final SpringTestContext rule = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.web.configurers;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -55,7 +54,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class NamespaceHttpFormLoginTests { public class NamespaceHttpFormLoginTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -21,7 +21,6 @@ import java.util.Collections;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -59,7 +58,6 @@ public class NamespaceHttpHeadersTests {
defaultHeaders.put("Pragma", "no-cache"); defaultHeaders.put("Pragma", "no-cache");
defaultHeaders.put("X-XSS-Protection", "1; mode=block"); defaultHeaders.put("X-XSS-Protection", "1; mode=block");
} }
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.web.configurers; package org.springframework.security.config.annotation.web.configurers;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -52,7 +51,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class NamespaceHttpInterceptUrlTests { public class NamespaceHttpInterceptUrlTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -19,7 +19,6 @@ package org.springframework.security.config.annotation.web.configurers;
import java.security.Principal; import java.security.Principal;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -53,7 +52,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class NamespaceHttpJeeTests { public class NamespaceHttpJeeTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -23,7 +23,6 @@ import java.util.function.Predicate;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import org.assertj.core.api.Condition; import org.assertj.core.api.Condition;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
@ -60,7 +59,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
@SecurityTestExecutionListeners @SecurityTestExecutionListeners
public class NamespaceHttpLogoutTests { public class NamespaceHttpLogoutTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -23,7 +23,6 @@ import javax.servlet.http.HttpServletRequest;
import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.MockWebServer;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.openid4java.consumer.ConsumerManager; import org.openid4java.consumer.ConsumerManager;
import org.openid4java.discovery.DiscoveryInformation; import org.openid4java.discovery.DiscoveryInformation;
@ -81,7 +80,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class NamespaceHttpOpenIDLoginTests { public class NamespaceHttpOpenIDLoginTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.web.configurers; package org.springframework.security.config.annotation.web.configurers;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -40,7 +39,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class NamespaceHttpPortMappingsTests { public class NamespaceHttpPortMappingsTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -20,7 +20,6 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -52,7 +51,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class NamespaceHttpRequestCacheTests { public class NamespaceHttpRequestCacheTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -19,7 +19,6 @@ package org.springframework.security.config.annotation.web.configurers;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -53,7 +52,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class NamespaceHttpServerAccessDeniedHandlerTests { public class NamespaceHttpServerAccessDeniedHandlerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -23,7 +23,6 @@ import java.security.cert.X509Certificate;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import sun.security.x509.X500Name; import sun.security.x509.X500Name;
@ -65,7 +64,6 @@ public class NamespaceHttpX509Tests {
private static final User USER = new User("customuser", "password", private static final User USER = new User("customuser", "password",
AuthorityUtils.createAuthorityList("ROLE_USER")); AuthorityUtils.createAuthorityList("ROLE_USER"));
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -20,7 +20,6 @@ import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -73,7 +72,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class NamespaceRememberMeTests { public class NamespaceRememberMeTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -24,7 +24,6 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -73,7 +72,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class NamespaceSessionManagementTests { public class NamespaceSessionManagementTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.web.configurers; package org.springframework.security.config.annotation.web.configurers;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -40,7 +39,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class PasswordManagementConfigurerTests { public class PasswordManagementConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.web.configurers; package org.springframework.security.config.annotation.web.configurers;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.BeanCreationException;
@ -41,7 +40,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class PermitAllSupportTests { public class PermitAllSupportTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.web.configurers;
import java.util.Collections; import java.util.Collections;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -38,7 +37,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class PortMapperConfigurerTests { public class PortMapperConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -21,7 +21,6 @@ import java.util.Collections;
import javax.servlet.http.Cookie; import javax.servlet.http.Cookie;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.BeanCreationException;
@ -75,7 +74,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class RememberMeConfigurerTests { public class RememberMeConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -19,7 +19,6 @@ package org.springframework.security.config.annotation.web.configurers;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -62,7 +61,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class RequestCacheConfigurerTests { public class RequestCacheConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.web.configurers; package org.springframework.security.config.annotation.web.configurers;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -37,7 +36,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class RequestMatcherConfigurerTests { public class RequestMatcherConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.web.configurers;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -58,7 +57,6 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
*/ */
public class SecurityContextConfigurerTests { public class SecurityContextConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -23,7 +23,6 @@ import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -81,7 +80,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class ServletApiConfigurerTests { public class ServletApiConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -19,7 +19,6 @@ package org.springframework.security.config.annotation.web.configurers;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -46,7 +45,6 @@ public class SessionManagementConfigurerSessionAuthenticationStrategyTests {
@Autowired @Autowired
private MockMvc mvc; private MockMvc mvc;
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
// gh-5763 // gh-5763

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.web.configurers; package org.springframework.security.config.annotation.web.configurers;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -42,7 +41,6 @@ public class SessionManagementConfigurerSessionCreationPolicyTests {
@Autowired @Autowired
MockMvc mvc; MockMvc mvc;
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Test @Test

View File

@ -20,7 +20,6 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -74,7 +73,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class SessionManagementConfigurerTests { public class SessionManagementConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.web.configurers; package org.springframework.security.config.annotation.web.configurers;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -45,7 +44,6 @@ public class SessionManagementConfigurerTransientAuthenticationTests {
@Autowired @Autowired
MockMvc mvc; MockMvc mvc;
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Test @Test

View File

@ -20,7 +20,6 @@ import java.util.List;
import javax.servlet.Filter; import javax.servlet.Filter;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
@ -51,7 +50,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
@SecurityTestExecutionListeners @SecurityTestExecutionListeners
public class UrlAuthorizationsTests { public class UrlAuthorizationsTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -21,7 +21,6 @@ import java.security.cert.Certificate;
import java.security.cert.CertificateFactory; import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate; import java.security.cert.X509Certificate;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -52,7 +51,6 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
*/ */
public class X509ConfigurerTests { public class X509ConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -22,7 +22,6 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.junit.Rule;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
@ -98,7 +97,6 @@ public class OAuth2ClientConfigurerTests {
private static RequestCache requestCache; private static RequestCache requestCache;
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -24,7 +24,6 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import org.apache.http.HttpHeaders; import org.apache.http.HttpHeaders;
import org.junit.Rule;
import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
@ -145,7 +144,6 @@ public class OAuth2LoginConfigurerTests {
@Autowired @Autowired
SecurityContextRepository securityContextRepository; SecurityContextRepository securityContextRepository;
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired(required = false) @Autowired(required = false)

View File

@ -49,7 +49,6 @@ import org.hamcrest.core.AllOf;
import org.hamcrest.core.StringContains; import org.hamcrest.core.StringContains;
import org.hamcrest.core.StringEndsWith; import org.hamcrest.core.StringEndsWith;
import org.hamcrest.core.StringStartsWith; import org.hamcrest.core.StringStartsWith;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.BeanCreationException;
@ -201,7 +200,6 @@ public class OAuth2ResourceServerConfigurerTests {
@Autowired(required = false) @Autowired(required = false)
MockWebServer web; MockWebServer web;
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Test @Test

View File

@ -20,7 +20,6 @@ import java.util.List;
import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.MockWebServer;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.openid4java.consumer.ConsumerManager; import org.openid4java.consumer.ConsumerManager;
import org.openid4java.discovery.DiscoveryInformation; import org.openid4java.discovery.DiscoveryInformation;
@ -62,7 +61,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class OpenIDLoginConfigurerTests { public class OpenIDLoginConfigurerTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -28,7 +28,6 @@ import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.junit.Rule;
import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
@ -129,7 +128,6 @@ public class Saml2LoginConfigurerTests {
@Autowired @Autowired
SecurityContextRepository securityContextRepository; SecurityContextRepository securityContextRepository;
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired(required = false) @Autowired(required = false)

View File

@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.web.reactive;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
@ -81,7 +80,6 @@ import static org.springframework.security.test.web.reactive.server.SecurityMock
@SecurityTestExecutionListeners @SecurityTestExecutionListeners
public class EnableWebFluxSecurityTests { public class EnableWebFluxSecurityTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.web.reactive; package org.springframework.security.config.annotation.web.reactive;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
@ -33,7 +32,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*/ */
public class ServerHttpSecurityConfigurationTests { public class ServerHttpSecurityConfigurationTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Test @Test

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.annotation.web.reactive; package org.springframework.security.config.annotation.web.reactive;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
@ -33,7 +32,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*/ */
public class WebFluxSecurityConfigurationTests { public class WebFluxSecurityConfigurationTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Test @Test

View File

@ -19,7 +19,6 @@ package org.springframework.security.config.authentication;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -66,7 +65,6 @@ public class AuthenticationManagerBeanDefinitionParserTests {
+ "</authentication-manager>"; + "</authentication-manager>";
// @formatter:on // @formatter:on
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Test @Test

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.authentication; package org.springframework.security.config.authentication;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -33,7 +32,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
public class PasswordEncoderParserTests { public class PasswordEncoderParserTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -19,7 +19,6 @@ package org.springframework.security.config.crypto;
import java.security.interfaces.RSAPrivateKey; import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey; import java.security.interfaces.RSAPublicKey;
import org.junit.Rule;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
@ -91,7 +90,6 @@ public class RsaKeyConversionServicePostProcessorTests {
@Value("custom:simple.pub") @Value("custom:simple.pub")
RSAPublicKey samePublicKey; RSAPublicKey samePublicKey;
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@BeforeEach @BeforeEach

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.debug; package org.springframework.security.config.debug;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.security.config.BeanIds; import org.springframework.security.config.BeanIds;
@ -32,7 +31,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*/ */
public class SecurityDebugBeanFactoryPostProcessorTests { public class SecurityDebugBeanFactoryPostProcessorTests {
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Test @Test

View File

@ -20,7 +20,6 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.eclipse.jetty.http.HttpStatus; import org.eclipse.jetty.http.HttpStatus;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
@ -53,7 +52,6 @@ public class AccessDeniedConfigTests {
@Autowired @Autowired
MockMvc mvc; MockMvc mvc;
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Test @Test

View File

@ -24,7 +24,6 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.eclipse.jetty.http.HttpStatus; import org.eclipse.jetty.http.HttpStatus;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
@ -82,7 +81,6 @@ public class CsrfConfigTests {
private static final String CONFIG_LOCATION_PREFIX = "classpath:org/springframework/security/config/http/CsrfConfigTests"; private static final String CONFIG_LOCATION_PREFIX = "classpath:org/springframework/security/config/http/CsrfConfigTests";
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

View File

@ -16,7 +16,6 @@
package org.springframework.security.config.http; package org.springframework.security.config.http;
import org.junit.Rule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -43,7 +42,6 @@ public class FormLoginBeanDefinitionParserTests {
private static final String CONFIG_LOCATION_PREFIX = "classpath:org/springframework/security/config/http/FormLoginBeanDefinitionParserTests"; private static final String CONFIG_LOCATION_PREFIX = "classpath:org/springframework/security/config/http/FormLoginBeanDefinitionParserTests";
@Rule
public final SpringTestContext spring = new SpringTestContext(this); public final SpringTestContext spring = new SpringTestContext(this);
@Autowired @Autowired

Some files were not shown because too many files have changed in this diff Show More