diff --git a/config/src/integration-test/java/org/springframework/security/config/annotation/authentication/ldap/LdapAuthenticationProviderBuilderSecurityBuilderTests.java b/config/src/integration-test/java/org/springframework/security/config/annotation/authentication/ldap/LdapAuthenticationProviderBuilderSecurityBuilderTests.java index 467a348c66..6531c87933 100644 --- a/config/src/integration-test/java/org/springframework/security/config/annotation/authentication/ldap/LdapAuthenticationProviderBuilderSecurityBuilderTests.java +++ b/config/src/integration-test/java/org/springframework/security/config/annotation/authentication/ldap/LdapAuthenticationProviderBuilderSecurityBuilderTests.java @@ -23,7 +23,6 @@ import java.util.List; import javax.naming.directory.SearchControls; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -55,7 +54,6 @@ public class LdapAuthenticationProviderBuilderSecurityBuilderTests { static Integer port; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/integration-test/java/org/springframework/security/config/annotation/authentication/ldap/LdapAuthenticationProviderConfigurerTests.java b/config/src/integration-test/java/org/springframework/security/config/annotation/authentication/ldap/LdapAuthenticationProviderConfigurerTests.java index 709702fca6..d9337f12cb 100644 --- a/config/src/integration-test/java/org/springframework/security/config/annotation/authentication/ldap/LdapAuthenticationProviderConfigurerTests.java +++ b/config/src/integration-test/java/org/springframework/security/config/annotation/authentication/ldap/LdapAuthenticationProviderConfigurerTests.java @@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.authentication.ldap; import java.util.Collections; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -38,7 +37,6 @@ import static org.springframework.security.test.web.servlet.response.SecurityMoc public class LdapAuthenticationProviderConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/integration-test/java/org/springframework/security/config/annotation/authentication/ldap/NamespaceLdapAuthenticationProviderTests.java b/config/src/integration-test/java/org/springframework/security/config/annotation/authentication/ldap/NamespaceLdapAuthenticationProviderTests.java index ba41f40f05..0dd27fe748 100644 --- a/config/src/integration-test/java/org/springframework/security/config/annotation/authentication/ldap/NamespaceLdapAuthenticationProviderTests.java +++ b/config/src/integration-test/java/org/springframework/security/config/annotation/authentication/ldap/NamespaceLdapAuthenticationProviderTests.java @@ -20,7 +20,6 @@ import java.util.Collections; import java.util.HashSet; import java.util.Set; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -46,7 +45,6 @@ import static org.springframework.security.test.web.servlet.response.SecurityMoc public class NamespaceLdapAuthenticationProviderTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/authentication/AuthenticationManagerBuilderTests.java b/config/src/test/java/org/springframework/security/config/annotation/authentication/AuthenticationManagerBuilderTests.java index 5b967885ce..bdd3151740 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/authentication/AuthenticationManagerBuilderTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/authentication/AuthenticationManagerBuilderTests.java @@ -19,7 +19,6 @@ package org.springframework.security.config.annotation.authentication; import java.util.Arrays; import java.util.Properties; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -68,7 +67,6 @@ import static org.springframework.security.test.web.servlet.response.SecurityMoc */ public class AuthenticationManagerBuilderTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired(required = false) diff --git a/config/src/test/java/org/springframework/security/config/annotation/authentication/NamespaceAuthenticationManagerTests.java b/config/src/test/java/org/springframework/security/config/annotation/authentication/NamespaceAuthenticationManagerTests.java index 96210b4e25..83eda1c095 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/authentication/NamespaceAuthenticationManagerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/authentication/NamespaceAuthenticationManagerTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.authentication; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -37,7 +36,6 @@ import static org.springframework.security.test.web.servlet.response.SecurityMoc */ public class NamespaceAuthenticationManagerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/authentication/NamespaceAuthenticationProviderTests.java b/config/src/test/java/org/springframework/security/config/annotation/authentication/NamespaceAuthenticationProviderTests.java index 0fa181f1e4..849dfd1cdb 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/authentication/NamespaceAuthenticationProviderTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/authentication/NamespaceAuthenticationProviderTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.authentication; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -39,7 +38,6 @@ import static org.springframework.security.test.web.servlet.response.SecurityMoc */ public class NamespaceAuthenticationProviderTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/authentication/NamespaceJdbcUserServiceTests.java b/config/src/test/java/org/springframework/security/config/annotation/authentication/NamespaceJdbcUserServiceTests.java index 69ab160a77..24ac9c41e2 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/authentication/NamespaceJdbcUserServiceTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/authentication/NamespaceJdbcUserServiceTests.java @@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.authentication; import javax.sql.DataSource; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -45,7 +44,6 @@ import static org.springframework.security.test.web.servlet.response.SecurityMoc */ public class NamespaceJdbcUserServiceTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/authentication/NamespacePasswordEncoderTests.java b/config/src/test/java/org/springframework/security/config/annotation/authentication/NamespacePasswordEncoderTests.java index 9f3eef1f89..09ab1b51c3 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/authentication/NamespacePasswordEncoderTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/authentication/NamespacePasswordEncoderTests.java @@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.authentication; import javax.sql.DataSource; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -43,7 +42,6 @@ import static org.springframework.security.test.web.servlet.response.SecurityMoc */ public class NamespacePasswordEncoderTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/authentication/PasswordEncoderConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/authentication/PasswordEncoderConfigurerTests.java index 9fb33b3a93..99bb2e709a 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/authentication/PasswordEncoderConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/authentication/PasswordEncoderConfigurerTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.authentication; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -37,7 +36,6 @@ import static org.springframework.security.test.web.servlet.response.SecurityMoc */ public class PasswordEncoderConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/authentication/configuration/AuthenticationConfigurationTests.java b/config/src/test/java/org/springframework/security/config/annotation/authentication/configuration/AuthenticationConfigurationTests.java index 6422b30af1..c2f06048d7 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/authentication/configuration/AuthenticationConfigurationTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/authentication/configuration/AuthenticationConfigurationTests.java @@ -20,7 +20,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.junit.Rule; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; @@ -73,7 +72,6 @@ import static org.mockito.Mockito.verify; public class AuthenticationConfigurationTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired(required = false) diff --git a/config/src/test/java/org/springframework/security/config/annotation/authentication/configuration/EnableGlobalAuthenticationTests.java b/config/src/test/java/org/springframework/security/config/annotation/authentication/configuration/EnableGlobalAuthenticationTests.java index 7a13f4ebf2..1208a2e23c 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/authentication/configuration/EnableGlobalAuthenticationTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/authentication/configuration/EnableGlobalAuthenticationTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.authentication.configuration; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -33,7 +32,6 @@ import static org.assertj.core.api.Assertions.assertThat; */ public class EnableGlobalAuthenticationTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); // gh-4086 diff --git a/config/src/test/java/org/springframework/security/config/annotation/configuration/AutowireBeanFactoryObjectPostProcessorTests.java b/config/src/test/java/org/springframework/security/config/annotation/configuration/AutowireBeanFactoryObjectPostProcessorTests.java index 7aaa9b68a6..49f0530582 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/configuration/AutowireBeanFactoryObjectPostProcessorTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/configuration/AutowireBeanFactoryObjectPostProcessorTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.configuration; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanClassLoaderAware; @@ -45,7 +44,6 @@ import static org.mockito.Mockito.verify; */ public class AutowireBeanFactoryObjectPostProcessorTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/method/configuration/GlobalMethodSecurityConfigurationTests.java b/config/src/test/java/org/springframework/security/config/annotation/method/configuration/GlobalMethodSecurityConfigurationTests.java index e34122c13a..b96af052ab 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/method/configuration/GlobalMethodSecurityConfigurationTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/method/configuration/GlobalMethodSecurityConfigurationTests.java @@ -23,7 +23,6 @@ import java.util.Map; import javax.sql.DataSource; import org.aopalliance.intercept.MethodInterceptor; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -77,7 +76,6 @@ import static org.mockito.Mockito.verify; @SecurityTestExecutionListeners public class GlobalMethodSecurityConfigurationTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired(required = false) diff --git a/config/src/test/java/org/springframework/security/config/annotation/method/configuration/NamespaceGlobalMethodSecurityExpressionHandlerTests.java b/config/src/test/java/org/springframework/security/config/annotation/method/configuration/NamespaceGlobalMethodSecurityExpressionHandlerTests.java index 7429f6135d..a1a539431a 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/method/configuration/NamespaceGlobalMethodSecurityExpressionHandlerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/method/configuration/NamespaceGlobalMethodSecurityExpressionHandlerTests.java @@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.method.configuration; import java.io.Serializable; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -44,7 +43,6 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @SecurityTestExecutionListeners public class NamespaceGlobalMethodSecurityExpressionHandlerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired(required = false) diff --git a/config/src/test/java/org/springframework/security/config/annotation/method/configuration/NamespaceGlobalMethodSecurityTests.java b/config/src/test/java/org/springframework/security/config/annotation/method/configuration/NamespaceGlobalMethodSecurityTests.java index 26423efe3e..82b9323596 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/method/configuration/NamespaceGlobalMethodSecurityTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/method/configuration/NamespaceGlobalMethodSecurityTests.java @@ -23,7 +23,6 @@ import java.util.Collections; import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -67,7 +66,6 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @SecurityTestExecutionListeners public class NamespaceGlobalMethodSecurityTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired(required = false) diff --git a/config/src/test/java/org/springframework/security/config/annotation/method/configuration/PrePostMethodSecurityConfigurationTests.java b/config/src/test/java/org/springframework/security/config/annotation/method/configuration/PrePostMethodSecurityConfigurationTests.java index cd8e97ab6e..559ae65dd9 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/method/configuration/PrePostMethodSecurityConfigurationTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/method/configuration/PrePostMethodSecurityConfigurationTests.java @@ -23,7 +23,6 @@ import java.util.List; import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -69,7 +68,6 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @SecurityTestExecutionListeners public class PrePostMethodSecurityConfigurationTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired(required = false) diff --git a/config/src/test/java/org/springframework/security/config/annotation/method/configuration/ReactiveMethodSecurityConfigurationTests.java b/config/src/test/java/org/springframework/security/config/annotation/method/configuration/ReactiveMethodSecurityConfigurationTests.java index f747b952d0..62b83ade72 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/method/configuration/ReactiveMethodSecurityConfigurationTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/method/configuration/ReactiveMethodSecurityConfigurationTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.method.configuration; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -37,7 +36,6 @@ import static org.assertj.core.api.Assertions.assertThat; */ public class ReactiveMethodSecurityConfigurationTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/method/configuration/SampleEnableGlobalMethodSecurityTests.java b/config/src/test/java/org/springframework/security/config/annotation/method/configuration/SampleEnableGlobalMethodSecurityTests.java index 146a5e3ced..b95f74ccfb 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/method/configuration/SampleEnableGlobalMethodSecurityTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/method/configuration/SampleEnableGlobalMethodSecurityTests.java @@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.method.configuration; import java.io.Serializable; -import org.junit.Rule; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -45,7 +44,6 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType; */ public class SampleEnableGlobalMethodSecurityTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/sec2758/Sec2758Tests.java b/config/src/test/java/org/springframework/security/config/annotation/sec2758/Sec2758Tests.java index 5fc3dee82d..f5ce7a6067 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/sec2758/Sec2758Tests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/sec2758/Sec2758Tests.java @@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.sec2758; import javax.annotation.security.RolesAllowed; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -55,7 +54,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. @SecurityTestExecutionListeners public class Sec2758Tests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/SampleWebSecurityConfigurerAdapterTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/SampleWebSecurityConfigurerAdapterTests.java index a884c127aa..f7cba1f817 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/SampleWebSecurityConfigurerAdapterTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/SampleWebSecurityConfigurerAdapterTests.java @@ -20,7 +20,6 @@ import java.util.Base64; import javax.servlet.http.HttpServletResponse; -import org.junit.Rule; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -52,7 +51,6 @@ import static org.assertj.core.api.Assertions.assertThat; */ public class SampleWebSecurityConfigurerAdapterTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/WebSecurityConfigurerAdapterMockitoTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/WebSecurityConfigurerAdapterMockitoTests.java index 93f38f49c6..b7a067c4c5 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/WebSecurityConfigurerAdapterMockitoTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/WebSecurityConfigurerAdapterMockitoTests.java @@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.web; import java.util.Arrays; -import org.junit.Rule; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -60,7 +59,6 @@ public class WebSecurityConfigurerAdapterMockitoTests { ConfigurableWebApplicationContext context; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/WebSecurityConfigurerAdapterTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/WebSecurityConfigurerAdapterTests.java index b4ddda8ac0..2454d36c11 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/WebSecurityConfigurerAdapterTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/WebSecurityConfigurerAdapterTests.java @@ -25,7 +25,6 @@ import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -75,7 +74,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class WebSecurityConfigurerAdapterTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/builders/HttpConfigurationTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/builders/HttpConfigurationTests.java index dec1036cc8..e82496e4c1 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/builders/HttpConfigurationTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/builders/HttpConfigurationTests.java @@ -25,7 +25,6 @@ import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; @@ -54,7 +53,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class HttpConfigurationTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/builders/HttpSecurityAddFilterTest.java b/config/src/test/java/org/springframework/security/config/annotation/web/builders/HttpSecurityAddFilterTest.java index c591522d3b..40b4772bad 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/builders/HttpSecurityAddFilterTest.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/builders/HttpSecurityAddFilterTest.java @@ -27,7 +27,6 @@ import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import org.assertj.core.api.ListAssert; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Bean; @@ -47,7 +46,6 @@ import static org.assertj.core.api.Assertions.assertThat; public class HttpSecurityAddFilterTest { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Test diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/builders/HttpSecurityAuthenticationManagerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/builders/HttpSecurityAuthenticationManagerTests.java index b8b0d67a6a..5e5208fb09 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/builders/HttpSecurityAuthenticationManagerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/builders/HttpSecurityAuthenticationManagerTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.web.builders; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -43,7 +42,6 @@ public class HttpSecurityAuthenticationManagerTests { @Autowired MockMvc mvc; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Test diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/builders/NamespaceHttpTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/builders/NamespaceHttpTests.java index 36c10b96b4..d699f58e69 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/builders/NamespaceHttpTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/builders/NamespaceHttpTests.java @@ -21,7 +21,6 @@ import javax.security.auth.login.LoginContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -81,7 +80,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class NamespaceHttpTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configuration/EnableWebSecurityTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configuration/EnableWebSecurityTests.java index 752140419e..8155b8dc7f 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configuration/EnableWebSecurityTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configuration/EnableWebSecurityTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.web.configuration; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -48,7 +47,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class EnableWebSecurityTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configuration/HttpSecurityConfigurationTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configuration/HttpSecurityConfigurationTests.java index 0e0b725423..511b508f20 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configuration/HttpSecurityConfigurationTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configuration/HttpSecurityConfigurationTests.java @@ -21,7 +21,6 @@ import java.util.concurrent.Callable; import javax.servlet.http.HttpServletRequest; import com.google.common.net.HttpHeaders; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -66,7 +65,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class HttpSecurityConfigurationTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configuration/OAuth2ClientConfigurationTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configuration/OAuth2ClientConfigurationTests.java index cf5a298669..b9199ca17b 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configuration/OAuth2ClientConfigurationTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configuration/OAuth2ClientConfigurationTests.java @@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.web.configuration; import javax.servlet.http.HttpServletRequest; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; @@ -68,7 +67,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class OAuth2ClientConfigurationTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configuration/Sec2515Tests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configuration/Sec2515Tests.java index b3eb09a7ab..7fd5eb11e2 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configuration/Sec2515Tests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configuration/Sec2515Tests.java @@ -19,7 +19,6 @@ package org.springframework.security.config.annotation.web.configuration; import java.net.URL; import java.net.URLClassLoader; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.FatalBeanException; @@ -38,7 +37,6 @@ import static org.mockito.Mockito.mock; */ public class Sec2515Tests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); // SEC-2515 diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configuration/SecurityReactorContextConfigurationResourceServerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configuration/SecurityReactorContextConfigurationResourceServerTests.java index 6cb9e5afca..3302b3020d 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configuration/SecurityReactorContextConfigurationResourceServerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configuration/SecurityReactorContextConfigurationResourceServerTests.java @@ -23,7 +23,6 @@ import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; import org.apache.commons.lang.StringUtils; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -53,7 +52,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class SecurityReactorContextConfigurationResourceServerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configuration/SecurityReactorContextConfigurationTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configuration/SecurityReactorContextConfigurationTests.java index 8681472fe0..0012e8cf5a 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configuration/SecurityReactorContextConfigurationTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configuration/SecurityReactorContextConfigurationTests.java @@ -23,7 +23,6 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.junit.Rule; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -71,7 +70,6 @@ public class SecurityReactorContextConfigurationTests { private SecurityReactorContextConfiguration.SecurityReactorContextSubscriberRegistrar subscriberRegistrar = new SecurityReactorContextConfiguration.SecurityReactorContextSubscriberRegistrar(); - @Rule public final SpringTestContext spring = new SpringTestContext(this); @BeforeEach diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configuration/WebSecurityConfigurationTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configuration/WebSecurityConfigurationTests.java index 2210320c20..aa008dba2d 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configuration/WebSecurityConfigurationTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configuration/WebSecurityConfigurationTests.java @@ -25,7 +25,6 @@ import java.util.List; import javax.servlet.Filter; import javax.servlet.http.HttpServletRequest; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; @@ -86,10 +85,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class WebSecurityConfigurationTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); - @Rule public SpringTestContext child = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configuration/sec2377/Sec2377Tests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configuration/sec2377/Sec2377Tests.java index 69057b0988..ebdfc403d2 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configuration/sec2377/Sec2377Tests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configuration/sec2377/Sec2377Tests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.web.configuration.sec2377; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.context.ConfigurableApplicationContext; @@ -30,10 +29,8 @@ import org.springframework.security.config.test.SpringTestContext; */ public class Sec2377Tests { - @Rule public final SpringTestContext parent = new SpringTestContext(this); - @Rule public final SpringTestContext child = new SpringTestContext(this); @Test diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/AnonymousConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/AnonymousConfigurerTests.java index 92c3e54e47..10224978db 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/AnonymousConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/AnonymousConfigurerTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.web.configurers; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -43,7 +42,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class AnonymousConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/AuthorizeHttpRequestsConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/AuthorizeHttpRequestsConfigurerTests.java index 96f94e4617..074b3c6ff6 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/AuthorizeHttpRequestsConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/AuthorizeHttpRequestsConfigurerTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.web.configurers; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; @@ -59,7 +58,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class AuthorizeHttpRequestsConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ChannelSecurityConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ChannelSecurityConfigurerTests.java index ad136e127a..12b46ee0d5 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ChannelSecurityConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ChannelSecurityConfigurerTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.web.configurers; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -46,7 +45,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class ChannelSecurityConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/CorsConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/CorsConfigurerTests.java index 43210bab6b..af745ea3cd 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/CorsConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/CorsConfigurerTests.java @@ -20,7 +20,6 @@ import java.util.Arrays; import java.util.Collections; import com.google.common.net.HttpHeaders; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; @@ -57,7 +56,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class CorsConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/CsrfConfigurerIgnoringRequestMatchersTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/CsrfConfigurerIgnoringRequestMatchersTests.java index b0ae44547c..b7b06b8791 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/CsrfConfigurerIgnoringRequestMatchersTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/CsrfConfigurerIgnoringRequestMatchersTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.web.configurers; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -44,7 +43,6 @@ public class CsrfConfigurerIgnoringRequestMatchersTests { @Autowired MockMvc mvc; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Test diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/CsrfConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/CsrfConfigurerTests.java index 80fb20875d..7edee981aa 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/CsrfConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/CsrfConfigurerTests.java @@ -21,7 +21,6 @@ import java.net.URI; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; @@ -86,7 +85,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class CsrfConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/DefaultFiltersTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/DefaultFiltersTests.java index 40e79c0dac..ea475c54d0 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/DefaultFiltersTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/DefaultFiltersTests.java @@ -23,7 +23,6 @@ import java.util.stream.Collectors; import javax.servlet.Filter; import javax.servlet.ServletException; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -69,7 +68,6 @@ import static org.assertj.core.api.Assertions.assertThat; */ public class DefaultFiltersTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Test diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/DefaultLoginPageConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/DefaultLoginPageConfigurerTests.java index 787e4892bb..666c49700b 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/DefaultLoginPageConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/DefaultLoginPageConfigurerTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.web.configurers; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -63,7 +62,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class DefaultLoginPageConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ExceptionHandlingConfigurerAccessDeniedHandlerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ExceptionHandlingConfigurerAccessDeniedHandlerTests.java index d937fde029..deb8819219 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ExceptionHandlingConfigurerAccessDeniedHandlerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ExceptionHandlingConfigurerAccessDeniedHandlerTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.web.configurers; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -48,7 +47,6 @@ public class ExceptionHandlingConfigurerAccessDeniedHandlerTests { @Autowired MockMvc mvc; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Test diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ExceptionHandlingConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ExceptionHandlingConfigurerTests.java index e4001be944..f384200431 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ExceptionHandlingConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ExceptionHandlingConfigurerTests.java @@ -19,7 +19,6 @@ package org.springframework.security.config.annotation.web.configurers; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -58,7 +57,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class ExceptionHandlingConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ExpressionUrlAuthorizationConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ExpressionUrlAuthorizationConfigurerTests.java index 239f07998f..31de92e474 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ExpressionUrlAuthorizationConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ExpressionUrlAuthorizationConfigurerTests.java @@ -19,7 +19,6 @@ package org.springframework.security.config.annotation.web.configurers; import java.io.Serializable; import java.util.Collections; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; @@ -77,7 +76,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class ExpressionUrlAuthorizationConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/FormLoginConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/FormLoginConfigurerTests.java index 7d9470d57b..672566a7c6 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/FormLoginConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/FormLoginConfigurerTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.web.configurers; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -61,7 +60,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class FormLoginConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/HeadersConfigurerEagerHeadersTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/HeadersConfigurerEagerHeadersTests.java index c66f7427b8..34de990dca 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/HeadersConfigurerEagerHeadersTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/HeadersConfigurerEagerHeadersTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.web.configurers; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -39,7 +38,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class HeadersConfigurerEagerHeadersTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/HeadersConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/HeadersConfigurerTests.java index d53667b6a6..d456f0aa33 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/HeadersConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/HeadersConfigurerTests.java @@ -21,7 +21,6 @@ import java.util.LinkedHashMap; import java.util.Map; import com.google.common.net.HttpHeaders; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; @@ -54,7 +53,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class HeadersConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/HttpBasicConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/HttpBasicConfigurerTests.java index 3b46f81bf6..4f044ccca8 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/HttpBasicConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/HttpBasicConfigurerTests.java @@ -19,7 +19,6 @@ package org.springframework.security.config.annotation.web.configurers; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -59,7 +58,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class HttpBasicConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/Issue55Tests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/Issue55Tests.java index 8541d9fcbb..793dc49b41 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/Issue55Tests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/Issue55Tests.java @@ -21,7 +21,6 @@ import java.util.List; import javax.servlet.Filter; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Bean; @@ -48,7 +47,6 @@ import static org.assertj.core.api.Assertions.assertThat; */ public class Issue55Tests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Test diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/JeeConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/JeeConfigurerTests.java index f38aa6498f..e81c27011a 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/JeeConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/JeeConfigurerTests.java @@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.web.configurers; import java.security.Principal; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -53,7 +52,6 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder */ public class JeeConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/LogoutConfigurerClearSiteDataTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/LogoutConfigurerClearSiteDataTests.java index 14f326acbe..66e9f18a25 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/LogoutConfigurerClearSiteDataTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/LogoutConfigurerClearSiteDataTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.web.configurers; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -58,7 +57,6 @@ public class LogoutConfigurerClearSiteDataTests { private static final String HEADER_VALUE = "\"cache\", \"cookies\", \"storage\", \"executionContexts\""; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/LogoutConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/LogoutConfigurerTests.java index 535d61bc82..c45a125407 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/LogoutConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/LogoutConfigurerTests.java @@ -17,7 +17,6 @@ package org.springframework.security.config.annotation.web.configurers; import org.apache.http.HttpHeaders; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; @@ -59,7 +58,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class LogoutConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceDebugTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceDebugTests.java index 71d986c1a8..e2f2853ca0 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceDebugTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceDebugTests.java @@ -20,7 +20,6 @@ import ch.qos.logback.classic.Level; import ch.qos.logback.classic.Logger; import ch.qos.logback.classic.spi.ILoggingEvent; import ch.qos.logback.core.Appender; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.slf4j.LoggerFactory; @@ -47,7 +46,6 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder */ public class NamespaceDebugTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpAnonymousTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpAnonymousTests.java index 1eb9caaf01..62ea9dbf7b 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpAnonymousTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpAnonymousTests.java @@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.web.configurers; import java.util.Optional; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -51,7 +50,6 @@ public class NamespaceHttpAnonymousTests { @Autowired MockMvc mvc; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Test diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpBasicTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpBasicTests.java index 1f31cf064e..abe045c446 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpBasicTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpBasicTests.java @@ -19,7 +19,6 @@ package org.springframework.security.config.annotation.web.configurers; import javax.servlet.http.HttpServletRequest; import org.apache.http.HttpHeaders; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -54,7 +53,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class NamespaceHttpBasicTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpCustomFilterTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpCustomFilterTests.java index 9571578c0b..3ec2527769 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpCustomFilterTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpCustomFilterTests.java @@ -26,7 +26,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.assertj.core.api.ListAssert; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Bean; @@ -58,7 +57,6 @@ import static org.assertj.core.api.Assertions.assertThat; */ public class NamespaceHttpCustomFilterTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Test diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpExpressionHandlerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpExpressionHandlerTests.java index c86b33474d..f6104a9608 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpExpressionHandlerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpExpressionHandlerTests.java @@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.web.configurers; import java.security.Principal; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -57,7 +56,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. @SecurityTestExecutionListeners public class NamespaceHttpExpressionHandlerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpFirewallTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpFirewallTests.java index 992cd499e0..3f59ed368d 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpFirewallTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpFirewallTests.java @@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.web.configurers; import javax.servlet.http.HttpServletRequest; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -45,7 +44,6 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder */ public class NamespaceHttpFirewallTests { - @Rule public final SpringTestContext rule = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpFormLoginTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpFormLoginTests.java index 5a9db44459..6557df2ef6 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpFormLoginTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpFormLoginTests.java @@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.web.configurers; import javax.servlet.http.HttpServletRequest; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -55,7 +54,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class NamespaceHttpFormLoginTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpHeadersTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpHeadersTests.java index ea24f1db2f..eadd2c96bd 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpHeadersTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpHeadersTests.java @@ -21,7 +21,6 @@ import java.util.Collections; import java.util.LinkedHashMap; import java.util.Map; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -59,7 +58,6 @@ public class NamespaceHttpHeadersTests { defaultHeaders.put("Pragma", "no-cache"); defaultHeaders.put("X-XSS-Protection", "1; mode=block"); } - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpInterceptUrlTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpInterceptUrlTests.java index ec4fdff82a..c7bbe02179 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpInterceptUrlTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpInterceptUrlTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.web.configurers; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -52,7 +51,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class NamespaceHttpInterceptUrlTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpJeeTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpJeeTests.java index ce208753db..a8b5a94373 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpJeeTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpJeeTests.java @@ -19,7 +19,6 @@ package org.springframework.security.config.annotation.web.configurers; import java.security.Principal; import java.util.stream.Collectors; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -53,7 +52,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class NamespaceHttpJeeTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpLogoutTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpLogoutTests.java index bbe4e3d699..bf5c02c2e3 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpLogoutTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpLogoutTests.java @@ -23,7 +23,6 @@ import java.util.function.Predicate; import javax.servlet.http.HttpSession; import org.assertj.core.api.Condition; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -60,7 +59,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. @SecurityTestExecutionListeners public class NamespaceHttpLogoutTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpOpenIDLoginTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpOpenIDLoginTests.java index b7efd2f015..9079af03bc 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpOpenIDLoginTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpOpenIDLoginTests.java @@ -23,7 +23,6 @@ import javax.servlet.http.HttpServletRequest; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.openid4java.consumer.ConsumerManager; import org.openid4java.discovery.DiscoveryInformation; @@ -81,7 +80,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class NamespaceHttpOpenIDLoginTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpPortMappingsTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpPortMappingsTests.java index 224841baa3..d30a79be2c 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpPortMappingsTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpPortMappingsTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.web.configurers; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -40,7 +39,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class NamespaceHttpPortMappingsTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpRequestCacheTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpRequestCacheTests.java index 5a0dd5338e..aecf715316 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpRequestCacheTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpRequestCacheTests.java @@ -20,7 +20,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -52,7 +51,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class NamespaceHttpRequestCacheTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpServerAccessDeniedHandlerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpServerAccessDeniedHandlerTests.java index d579e309af..53aacb2242 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpServerAccessDeniedHandlerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpServerAccessDeniedHandlerTests.java @@ -19,7 +19,6 @@ package org.springframework.security.config.annotation.web.configurers; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -53,7 +52,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class NamespaceHttpServerAccessDeniedHandlerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpX509Tests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpX509Tests.java index b5cfb241ce..ab7080cf84 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpX509Tests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceHttpX509Tests.java @@ -23,7 +23,6 @@ import java.security.cert.X509Certificate; import javax.servlet.http.HttpServletRequest; -import org.junit.Rule; import org.junit.jupiter.api.Test; import sun.security.x509.X500Name; @@ -65,7 +64,6 @@ public class NamespaceHttpX509Tests { private static final User USER = new User("customuser", "password", AuthorityUtils.createAuthorityList("ROLE_USER")); - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceRememberMeTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceRememberMeTests.java index c1ace3f7c2..7f94675171 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceRememberMeTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceRememberMeTests.java @@ -20,7 +20,6 @@ import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -73,7 +72,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class NamespaceRememberMeTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceSessionManagementTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceSessionManagementTests.java index 5db5699a8a..b9ea8af90e 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceSessionManagementTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/NamespaceSessionManagementTests.java @@ -24,7 +24,6 @@ import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -73,7 +72,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class NamespaceSessionManagementTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/PasswordManagementConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/PasswordManagementConfigurerTests.java index e0b8bbaf62..4a4a1c5f20 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/PasswordManagementConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/PasswordManagementConfigurerTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.web.configurers; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -40,7 +39,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class PasswordManagementConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/PermitAllSupportTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/PermitAllSupportTests.java index beda2d7979..918b821863 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/PermitAllSupportTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/PermitAllSupportTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.web.configurers; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; @@ -41,7 +40,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class PermitAllSupportTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/PortMapperConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/PortMapperConfigurerTests.java index ea42cb0ed2..93940e8216 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/PortMapperConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/PortMapperConfigurerTests.java @@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.web.configurers; import java.util.Collections; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -38,7 +37,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class PortMapperConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/RememberMeConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/RememberMeConfigurerTests.java index f9fa2547d0..cfd5d04962 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/RememberMeConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/RememberMeConfigurerTests.java @@ -21,7 +21,6 @@ import java.util.Collections; import javax.servlet.http.Cookie; import javax.servlet.http.HttpSession; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; @@ -75,7 +74,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class RememberMeConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/RequestCacheConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/RequestCacheConfigurerTests.java index 2fc304f0de..712cd8ca0c 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/RequestCacheConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/RequestCacheConfigurerTests.java @@ -19,7 +19,6 @@ package org.springframework.security.config.annotation.web.configurers; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -62,7 +61,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class RequestCacheConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/RequestMatcherConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/RequestMatcherConfigurerTests.java index 6fba2b8f87..e0e459b47d 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/RequestMatcherConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/RequestMatcherConfigurerTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.web.configurers; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -37,7 +36,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class RequestMatcherConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/SecurityContextConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/SecurityContextConfigurerTests.java index 3ddb5ab1d1..e94a39be6a 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/SecurityContextConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/SecurityContextConfigurerTests.java @@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.web.configurers; import javax.servlet.http.HttpSession; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -58,7 +57,6 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder */ public class SecurityContextConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ServletApiConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ServletApiConfigurerTests.java index 40cbe40883..528fd64b2e 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ServletApiConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ServletApiConfigurerTests.java @@ -23,7 +23,6 @@ import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -81,7 +80,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class ServletApiConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerSessionAuthenticationStrategyTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerSessionAuthenticationStrategyTests.java index fc0bad05e0..caca3a149d 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerSessionAuthenticationStrategyTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerSessionAuthenticationStrategyTests.java @@ -19,7 +19,6 @@ package org.springframework.security.config.annotation.web.configurers; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -46,7 +45,6 @@ public class SessionManagementConfigurerSessionAuthenticationStrategyTests { @Autowired private MockMvc mvc; - @Rule public final SpringTestContext spring = new SpringTestContext(this); // gh-5763 diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerSessionCreationPolicyTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerSessionCreationPolicyTests.java index 1df64691a6..7414b4d8af 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerSessionCreationPolicyTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerSessionCreationPolicyTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.web.configurers; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -42,7 +41,6 @@ public class SessionManagementConfigurerSessionCreationPolicyTests { @Autowired MockMvc mvc; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Test diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerTests.java index 65c80847a7..04f9f7da61 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerTests.java @@ -20,7 +20,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -74,7 +73,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class SessionManagementConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerTransientAuthenticationTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerTransientAuthenticationTests.java index 43933dffc0..4138cb3ebd 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerTransientAuthenticationTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerTransientAuthenticationTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.web.configurers; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -45,7 +44,6 @@ public class SessionManagementConfigurerTransientAuthenticationTests { @Autowired MockMvc mvc; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Test diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/UrlAuthorizationsTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/UrlAuthorizationsTests.java index 390dfc9ae9..bd23661889 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/UrlAuthorizationsTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/UrlAuthorizationsTests.java @@ -20,7 +20,6 @@ import java.util.List; import javax.servlet.Filter; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -51,7 +50,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. @SecurityTestExecutionListeners public class UrlAuthorizationsTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/X509ConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/X509ConfigurerTests.java index e7870481cb..a46086f23d 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/X509ConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/X509ConfigurerTests.java @@ -21,7 +21,6 @@ import java.security.cert.Certificate; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -52,7 +51,6 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder */ public class X509ConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/oauth2/client/OAuth2ClientConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/oauth2/client/OAuth2ClientConfigurerTests.java index 932f24adb7..f1732924dd 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/oauth2/client/OAuth2ClientConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/oauth2/client/OAuth2ClientConfigurerTests.java @@ -22,7 +22,6 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.junit.Rule; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -98,7 +97,6 @@ public class OAuth2ClientConfigurerTests { private static RequestCache requestCache; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/oauth2/client/OAuth2LoginConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/oauth2/client/OAuth2LoginConfigurerTests.java index 203c72b043..86af29d01e 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/oauth2/client/OAuth2LoginConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/oauth2/client/OAuth2LoginConfigurerTests.java @@ -24,7 +24,6 @@ import java.util.List; import java.util.Map; import org.apache.http.HttpHeaders; -import org.junit.Rule; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -145,7 +144,6 @@ public class OAuth2LoginConfigurerTests { @Autowired SecurityContextRepository securityContextRepository; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired(required = false) diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/oauth2/server/resource/OAuth2ResourceServerConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/oauth2/server/resource/OAuth2ResourceServerConfigurerTests.java index 2759af2a0d..004020fb62 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/oauth2/server/resource/OAuth2ResourceServerConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/oauth2/server/resource/OAuth2ResourceServerConfigurerTests.java @@ -49,7 +49,6 @@ import org.hamcrest.core.AllOf; import org.hamcrest.core.StringContains; import org.hamcrest.core.StringEndsWith; import org.hamcrest.core.StringStartsWith; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; @@ -201,7 +200,6 @@ public class OAuth2ResourceServerConfigurerTests { @Autowired(required = false) MockWebServer web; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Test diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/openid/OpenIDLoginConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/openid/OpenIDLoginConfigurerTests.java index 7b8c6c69e2..7a48f9532d 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/openid/OpenIDLoginConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/openid/OpenIDLoginConfigurerTests.java @@ -20,7 +20,6 @@ import java.util.List; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.openid4java.consumer.ConsumerManager; import org.openid4java.discovery.DiscoveryInformation; @@ -62,7 +61,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class OpenIDLoginConfigurerTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/saml2/Saml2LoginConfigurerTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/saml2/Saml2LoginConfigurerTests.java index 8ae4720ae8..7c14e3297d 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/saml2/Saml2LoginConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/saml2/Saml2LoginConfigurerTests.java @@ -28,7 +28,6 @@ import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.junit.Rule; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; @@ -129,7 +128,6 @@ public class Saml2LoginConfigurerTests { @Autowired SecurityContextRepository securityContextRepository; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired(required = false) diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/reactive/EnableWebFluxSecurityTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/reactive/EnableWebFluxSecurityTests.java index aa5a25b27b..de86280ae8 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/reactive/EnableWebFluxSecurityTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/reactive/EnableWebFluxSecurityTests.java @@ -18,7 +18,6 @@ package org.springframework.security.config.annotation.web.reactive; import java.nio.charset.StandardCharsets; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import reactor.core.publisher.Mono; @@ -81,7 +80,6 @@ import static org.springframework.security.test.web.reactive.server.SecurityMock @SecurityTestExecutionListeners public class EnableWebFluxSecurityTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/reactive/ServerHttpSecurityConfigurationTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/reactive/ServerHttpSecurityConfigurationTests.java index 0f72915286..a1c8dfa431 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/reactive/ServerHttpSecurityConfigurationTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/reactive/ServerHttpSecurityConfigurationTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.web.reactive; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Configuration; @@ -33,7 +32,6 @@ import static org.assertj.core.api.Assertions.assertThat; */ public class ServerHttpSecurityConfigurationTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Test diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/reactive/WebFluxSecurityConfigurationTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/reactive/WebFluxSecurityConfigurationTests.java index 1fea2fe914..84d674ed05 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/reactive/WebFluxSecurityConfigurationTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/reactive/WebFluxSecurityConfigurationTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.annotation.web.reactive; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Configuration; @@ -33,7 +32,6 @@ import static org.assertj.core.api.Assertions.assertThat; */ public class WebFluxSecurityConfigurationTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Test diff --git a/config/src/test/java/org/springframework/security/config/authentication/AuthenticationManagerBeanDefinitionParserTests.java b/config/src/test/java/org/springframework/security/config/authentication/AuthenticationManagerBeanDefinitionParserTests.java index 28eae501aa..d204237d20 100644 --- a/config/src/test/java/org/springframework/security/config/authentication/AuthenticationManagerBeanDefinitionParserTests.java +++ b/config/src/test/java/org/springframework/security/config/authentication/AuthenticationManagerBeanDefinitionParserTests.java @@ -19,7 +19,6 @@ package org.springframework.security.config.authentication; import java.util.ArrayList; import java.util.List; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -66,7 +65,6 @@ public class AuthenticationManagerBeanDefinitionParserTests { + ""; // @formatter:on - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Test diff --git a/config/src/test/java/org/springframework/security/config/authentication/PasswordEncoderParserTests.java b/config/src/test/java/org/springframework/security/config/authentication/PasswordEncoderParserTests.java index be667c44e6..58ff655e21 100644 --- a/config/src/test/java/org/springframework/security/config/authentication/PasswordEncoderParserTests.java +++ b/config/src/test/java/org/springframework/security/config/authentication/PasswordEncoderParserTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.authentication; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -33,7 +32,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class PasswordEncoderParserTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/crypto/RsaKeyConversionServicePostProcessorTests.java b/config/src/test/java/org/springframework/security/config/crypto/RsaKeyConversionServicePostProcessorTests.java index b674ca3dd0..2652ab06b9 100644 --- a/config/src/test/java/org/springframework/security/config/crypto/RsaKeyConversionServicePostProcessorTests.java +++ b/config/src/test/java/org/springframework/security/config/crypto/RsaKeyConversionServicePostProcessorTests.java @@ -19,7 +19,6 @@ package org.springframework.security.config.crypto; import java.security.interfaces.RSAPrivateKey; import java.security.interfaces.RSAPublicKey; -import org.junit.Rule; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -91,7 +90,6 @@ public class RsaKeyConversionServicePostProcessorTests { @Value("custom:simple.pub") RSAPublicKey samePublicKey; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @BeforeEach diff --git a/config/src/test/java/org/springframework/security/config/debug/SecurityDebugBeanFactoryPostProcessorTests.java b/config/src/test/java/org/springframework/security/config/debug/SecurityDebugBeanFactoryPostProcessorTests.java index fbda0b32af..cafa2d5a4f 100644 --- a/config/src/test/java/org/springframework/security/config/debug/SecurityDebugBeanFactoryPostProcessorTests.java +++ b/config/src/test/java/org/springframework/security/config/debug/SecurityDebugBeanFactoryPostProcessorTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.debug; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.security.config.BeanIds; @@ -32,7 +31,6 @@ import static org.assertj.core.api.Assertions.assertThat; */ public class SecurityDebugBeanFactoryPostProcessorTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Test diff --git a/config/src/test/java/org/springframework/security/config/http/AccessDeniedConfigTests.java b/config/src/test/java/org/springframework/security/config/http/AccessDeniedConfigTests.java index 5d208f8457..03918b36d6 100644 --- a/config/src/test/java/org/springframework/security/config/http/AccessDeniedConfigTests.java +++ b/config/src/test/java/org/springframework/security/config/http/AccessDeniedConfigTests.java @@ -20,7 +20,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.eclipse.jetty.http.HttpStatus; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -53,7 +52,6 @@ public class AccessDeniedConfigTests { @Autowired MockMvc mvc; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Test diff --git a/config/src/test/java/org/springframework/security/config/http/CsrfConfigTests.java b/config/src/test/java/org/springframework/security/config/http/CsrfConfigTests.java index 6029a294d4..66e8cadbdb 100644 --- a/config/src/test/java/org/springframework/security/config/http/CsrfConfigTests.java +++ b/config/src/test/java/org/springframework/security/config/http/CsrfConfigTests.java @@ -24,7 +24,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.eclipse.jetty.http.HttpStatus; -import org.junit.Rule; import org.junit.jupiter.api.Test; 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"; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/http/FormLoginBeanDefinitionParserTests.java b/config/src/test/java/org/springframework/security/config/http/FormLoginBeanDefinitionParserTests.java index 901c397bed..b229cdfa5c 100644 --- a/config/src/test/java/org/springframework/security/config/http/FormLoginBeanDefinitionParserTests.java +++ b/config/src/test/java/org/springframework/security/config/http/FormLoginBeanDefinitionParserTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.http; -import org.junit.Rule; import org.junit.jupiter.api.Test; 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"; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/http/FormLoginConfigTests.java b/config/src/test/java/org/springframework/security/config/http/FormLoginConfigTests.java index c27d7deacf..a222deeef1 100644 --- a/config/src/test/java/org/springframework/security/config/http/FormLoginConfigTests.java +++ b/config/src/test/java/org/springframework/security/config/http/FormLoginConfigTests.java @@ -22,7 +22,6 @@ import javax.servlet.Filter; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; @@ -59,7 +58,6 @@ public class FormLoginConfigTests { private static final String CONFIG_LOCATION_PREFIX = "classpath:org/springframework/security/config/http/FormLoginConfigTests"; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/http/HttpConfigTests.java b/config/src/test/java/org/springframework/security/config/http/HttpConfigTests.java index a3b32166df..7fe66e9d1b 100644 --- a/config/src/test/java/org/springframework/security/config/http/HttpConfigTests.java +++ b/config/src/test/java/org/springframework/security/config/http/HttpConfigTests.java @@ -20,7 +20,6 @@ import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponseWrapper; import org.apache.http.HttpStatus; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -43,7 +42,6 @@ public class HttpConfigTests { private static final String CONFIG_LOCATION_PREFIX = "classpath:org/springframework/security/config/http/HttpConfigTests"; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/http/HttpCorsConfigTests.java b/config/src/test/java/org/springframework/security/config/http/HttpCorsConfigTests.java index bc4be03202..59fbfccd0a 100644 --- a/config/src/test/java/org/springframework/security/config/http/HttpCorsConfigTests.java +++ b/config/src/test/java/org/springframework/security/config/http/HttpCorsConfigTests.java @@ -18,7 +18,6 @@ package org.springframework.security.config.http; import java.util.Arrays; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; @@ -51,7 +50,6 @@ public class HttpCorsConfigTests { private static final String CONFIG_LOCATION_PREFIX = "classpath:org/springframework/security/config/http/HttpCorsConfigTests"; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/http/HttpHeadersConfigTests.java b/config/src/test/java/org/springframework/security/config/http/HttpHeadersConfigTests.java index f0d5ed4048..c27dd72bef 100644 --- a/config/src/test/java/org/springframework/security/config/http/HttpHeadersConfigTests.java +++ b/config/src/test/java/org/springframework/security/config/http/HttpHeadersConfigTests.java @@ -24,7 +24,6 @@ import java.util.Map; import java.util.Set; import com.google.common.collect.ImmutableMap; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; @@ -63,7 +62,6 @@ public class HttpHeadersConfigTests { .build(); // @formatter:on - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/http/InterceptUrlConfigTests.java b/config/src/test/java/org/springframework/security/config/http/InterceptUrlConfigTests.java index 98d0aab926..35ee926566 100644 --- a/config/src/test/java/org/springframework/security/config/http/InterceptUrlConfigTests.java +++ b/config/src/test/java/org/springframework/security/config/http/InterceptUrlConfigTests.java @@ -21,7 +21,6 @@ import java.util.Map; import javax.servlet.ServletRegistration; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.mockito.stubbing.Answer; @@ -54,7 +53,6 @@ public class InterceptUrlConfigTests { private static final String CONFIG_LOCATION_PREFIX = "classpath:org/springframework/security/config/http/InterceptUrlConfigTests"; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/http/MiscHttpConfigTests.java b/config/src/test/java/org/springframework/security/config/http/MiscHttpConfigTests.java index a3d9ad5be3..ce28c47272 100644 --- a/config/src/test/java/org/springframework/security/config/http/MiscHttpConfigTests.java +++ b/config/src/test/java/org/springframework/security/config/http/MiscHttpConfigTests.java @@ -44,7 +44,6 @@ import ch.qos.logback.core.Appender; import org.apache.http.HttpStatus; import org.assertj.core.api.iterable.Extractor; import org.jetbrains.annotations.NotNull; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.mockito.stubbing.Answer; import org.slf4j.LoggerFactory; @@ -142,7 +141,6 @@ public class MiscHttpConfigTests { @Autowired MockMvc mvc; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Test diff --git a/config/src/test/java/org/springframework/security/config/http/MultiHttpBlockConfigTests.java b/config/src/test/java/org/springframework/security/config/http/MultiHttpBlockConfigTests.java index 0ba0bd96a5..f8972ed8d2 100644 --- a/config/src/test/java/org/springframework/security/config/http/MultiHttpBlockConfigTests.java +++ b/config/src/test/java/org/springframework/security/config/http/MultiHttpBlockConfigTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.http; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; @@ -47,7 +46,6 @@ public class MultiHttpBlockConfigTests { @Autowired MockMvc mvc; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Test diff --git a/config/src/test/java/org/springframework/security/config/http/OAuth2ClientBeanDefinitionParserTests.java b/config/src/test/java/org/springframework/security/config/http/OAuth2ClientBeanDefinitionParserTests.java index 1295bddd95..a0d20b8362 100644 --- a/config/src/test/java/org/springframework/security/config/http/OAuth2ClientBeanDefinitionParserTests.java +++ b/config/src/test/java/org/springframework/security/config/http/OAuth2ClientBeanDefinitionParserTests.java @@ -19,7 +19,6 @@ package org.springframework.security.config.http; import java.util.HashMap; import java.util.Map; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.ArgumentCaptor; @@ -73,7 +72,6 @@ public class OAuth2ClientBeanDefinitionParserTests { private static final String CONFIG_LOCATION_PREFIX = "classpath:org/springframework/security/config/http/OAuth2ClientBeanDefinitionParserTests"; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/http/OAuth2LoginBeanDefinitionParserTests.java b/config/src/test/java/org/springframework/security/config/http/OAuth2LoginBeanDefinitionParserTests.java index b4f6a9f7a1..0f8ab40e1a 100644 --- a/config/src/test/java/org/springframework/security/config/http/OAuth2LoginBeanDefinitionParserTests.java +++ b/config/src/test/java/org/springframework/security/config/http/OAuth2LoginBeanDefinitionParserTests.java @@ -20,7 +20,6 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.ArgumentCaptor; @@ -96,7 +95,6 @@ public class OAuth2LoginBeanDefinitionParserTests { private static final String CONFIG_LOCATION_PREFIX = "classpath:org/springframework/security/config/http/OAuth2LoginBeanDefinitionParserTests"; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/http/OAuth2ResourceServerBeanDefinitionParserTests.java b/config/src/test/java/org/springframework/security/config/http/OAuth2ResourceServerBeanDefinitionParserTests.java index 05d5eaca83..3d387d0602 100644 --- a/config/src/test/java/org/springframework/security/config/http/OAuth2ResourceServerBeanDefinitionParserTests.java +++ b/config/src/test/java/org/springframework/security/config/http/OAuth2ResourceServerBeanDefinitionParserTests.java @@ -46,7 +46,6 @@ import org.hamcrest.core.AllOf; import org.hamcrest.core.StringContains; import org.hamcrest.core.StringEndsWith; import org.hamcrest.core.StringStartsWith; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mockito; @@ -125,7 +124,6 @@ public class OAuth2ResourceServerBeanDefinitionParserTests { private static final String CONFIG_LOCATION_PREFIX = "classpath:org/springframework/security/config/http/OAuth2ResourceServerBeanDefinitionParserTests"; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/http/OpenIDConfigTests.java b/config/src/test/java/org/springframework/security/config/http/OpenIDConfigTests.java index f5781a5497..52ab857b69 100644 --- a/config/src/test/java/org/springframework/security/config/http/OpenIDConfigTests.java +++ b/config/src/test/java/org/springframework/security/config/http/OpenIDConfigTests.java @@ -24,7 +24,6 @@ import javax.servlet.http.HttpServletRequest; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.openid4java.consumer.ConsumerManager; import org.openid4java.discovery.yadis.YadisResolver; @@ -68,7 +67,6 @@ public class OpenIDConfigTests { @Autowired MockMvc mvc; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Test diff --git a/config/src/test/java/org/springframework/security/config/http/PlaceHolderAndELConfigTests.java b/config/src/test/java/org/springframework/security/config/http/PlaceHolderAndELConfigTests.java index 1b9107ce42..c4b0acea29 100644 --- a/config/src/test/java/org/springframework/security/config/http/PlaceHolderAndELConfigTests.java +++ b/config/src/test/java/org/springframework/security/config/http/PlaceHolderAndELConfigTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.http; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -44,7 +43,6 @@ public class PlaceHolderAndELConfigTests { private static final String CONFIG_LOCATION_PREFIX = "classpath:org/springframework/security/config/http/PlaceHolderAndELConfigTests"; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/http/RememberMeConfigTests.java b/config/src/test/java/org/springframework/security/config/http/RememberMeConfigTests.java index 2e9d2b966d..e1da90e522 100644 --- a/config/src/test/java/org/springframework/security/config/http/RememberMeConfigTests.java +++ b/config/src/test/java/org/springframework/security/config/http/RememberMeConfigTests.java @@ -20,7 +20,6 @@ import java.util.Collections; import javax.servlet.http.Cookie; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.FatalBeanException; @@ -64,7 +63,6 @@ public class RememberMeConfigTests { @Autowired MockMvc mvc; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Test diff --git a/config/src/test/java/org/springframework/security/config/http/SecurityContextHolderAwareRequestConfigTests.java b/config/src/test/java/org/springframework/security/config/http/SecurityContextHolderAwareRequestConfigTests.java index c1ccc0b78e..b348cc519b 100644 --- a/config/src/test/java/org/springframework/security/config/http/SecurityContextHolderAwareRequestConfigTests.java +++ b/config/src/test/java/org/springframework/security/config/http/SecurityContextHolderAwareRequestConfigTests.java @@ -23,7 +23,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.http.HttpHeaders; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -58,7 +57,6 @@ public class SecurityContextHolderAwareRequestConfigTests { private static final String CONFIG_LOCATION_PREFIX = "classpath:org/springframework/security/config/http/SecurityContextHolderAwareRequestConfigTests"; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/http/SessionManagementConfigTests.java b/config/src/test/java/org/springframework/security/config/http/SessionManagementConfigTests.java index 3b35d35e0a..26252c22c0 100644 --- a/config/src/test/java/org/springframework/security/config/http/SessionManagementConfigTests.java +++ b/config/src/test/java/org/springframework/security/config/http/SessionManagementConfigTests.java @@ -28,7 +28,6 @@ import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponseWrapper; import org.apache.http.HttpStatus; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -85,7 +84,6 @@ public class SessionManagementConfigTests { private static final String CONFIG_LOCATION_PREFIX = "classpath:org/springframework/security/config/http/SessionManagementConfigTests"; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/http/SessionManagementConfigTransientAuthenticationTests.java b/config/src/test/java/org/springframework/security/config/http/SessionManagementConfigTransientAuthenticationTests.java index 2edce8d3b4..d8127db672 100644 --- a/config/src/test/java/org/springframework/security/config/http/SessionManagementConfigTransientAuthenticationTests.java +++ b/config/src/test/java/org/springframework/security/config/http/SessionManagementConfigTransientAuthenticationTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.http; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -42,7 +41,6 @@ public class SessionManagementConfigTransientAuthenticationTests { @Autowired MockMvc mvc; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Test diff --git a/config/src/test/java/org/springframework/security/config/http/WellKnownChangePasswordBeanDefinitionParserTests.java b/config/src/test/java/org/springframework/security/config/http/WellKnownChangePasswordBeanDefinitionParserTests.java index 27ac8dd825..d4df269b54 100644 --- a/config/src/test/java/org/springframework/security/config/http/WellKnownChangePasswordBeanDefinitionParserTests.java +++ b/config/src/test/java/org/springframework/security/config/http/WellKnownChangePasswordBeanDefinitionParserTests.java @@ -16,7 +16,6 @@ package org.springframework.security.config.http; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -36,7 +35,6 @@ public class WellKnownChangePasswordBeanDefinitionParserTests { private static final String CONFIG_LOCATION_PREFIX = "classpath:org/springframework/security/config/http/WellKnownChangePasswordBeanDefinitionParserTests"; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired diff --git a/config/src/test/java/org/springframework/security/config/method/MethodSecurityBeanDefinitionParserTests.java b/config/src/test/java/org/springframework/security/config/method/MethodSecurityBeanDefinitionParserTests.java index c229f71657..47684072c6 100644 --- a/config/src/test/java/org/springframework/security/config/method/MethodSecurityBeanDefinitionParserTests.java +++ b/config/src/test/java/org/springframework/security/config/method/MethodSecurityBeanDefinitionParserTests.java @@ -25,7 +25,6 @@ import java.util.function.Supplier; import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; import org.jetbrains.annotations.NotNull; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -68,7 +67,6 @@ public class MethodSecurityBeanDefinitionParserTests { @Autowired(required = false) BusinessService businessService; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @WithMockUser(roles = "ADMIN") diff --git a/config/src/test/java/org/springframework/security/config/oauth2/client/ClientRegistrationsBeanDefinitionParserTests.java b/config/src/test/java/org/springframework/security/config/oauth2/client/ClientRegistrationsBeanDefinitionParserTests.java index dddce8a200..d6fea8a917 100644 --- a/config/src/test/java/org/springframework/security/config/oauth2/client/ClientRegistrationsBeanDefinitionParserTests.java +++ b/config/src/test/java/org/springframework/security/config/oauth2/client/ClientRegistrationsBeanDefinitionParserTests.java @@ -18,7 +18,6 @@ package org.springframework.security.config.oauth2.client; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; -import org.junit.Rule; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; @@ -125,7 +124,6 @@ public class ClientRegistrationsBeanDefinitionParserTests { @Autowired private ClientRegistrationRepository clientRegistrationRepository; - @Rule public final SpringTestContext spring = new SpringTestContext(this); private MockWebServer server; diff --git a/config/src/test/java/org/springframework/security/config/web/server/HttpsRedirectSpecTests.java b/config/src/test/java/org/springframework/security/config/web/server/HttpsRedirectSpecTests.java index 0671d2363f..c57616f855 100644 --- a/config/src/test/java/org/springframework/security/config/web/server/HttpsRedirectSpecTests.java +++ b/config/src/test/java/org/springframework/security/config/web/server/HttpsRedirectSpecTests.java @@ -17,7 +17,6 @@ package org.springframework.security.config.web.server; import org.apache.http.HttpHeaders; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -42,7 +41,6 @@ import static org.springframework.security.config.Customizer.withDefaults; */ public class HttpsRedirectSpecTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); WebTestClient client; diff --git a/config/src/test/java/org/springframework/security/config/web/server/OAuth2ClientSpecTests.java b/config/src/test/java/org/springframework/security/config/web/server/OAuth2ClientSpecTests.java index 73fd3d902c..86a7541dbe 100644 --- a/config/src/test/java/org/springframework/security/config/web/server/OAuth2ClientSpecTests.java +++ b/config/src/test/java/org/springframework/security/config/web/server/OAuth2ClientSpecTests.java @@ -18,7 +18,6 @@ package org.springframework.security.config.web.server; import java.net.URI; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import reactor.core.publisher.Mono; @@ -73,7 +72,6 @@ import static org.mockito.Mockito.verify; @SecurityTestExecutionListeners public class OAuth2ClientSpecTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); private WebTestClient client; diff --git a/config/src/test/java/org/springframework/security/config/web/server/OAuth2LoginTests.java b/config/src/test/java/org/springframework/security/config/web/server/OAuth2LoginTests.java index c192ef4511..10b564db62 100644 --- a/config/src/test/java/org/springframework/security/config/web/server/OAuth2LoginTests.java +++ b/config/src/test/java/org/springframework/security/config/web/server/OAuth2LoginTests.java @@ -20,7 +20,6 @@ import java.util.Collections; import java.util.HashMap; import java.util.Map; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.mockito.stubbing.Answer; import org.openqa.selenium.WebDriver; @@ -120,7 +119,6 @@ import static org.mockito.Mockito.verify; */ public class OAuth2LoginTests { - @Rule public final SpringTestContext spring = new SpringTestContext(this); private WebTestClient client; diff --git a/config/src/test/java/org/springframework/security/config/web/server/OAuth2ResourceServerSpecTests.java b/config/src/test/java/org/springframework/security/config/web/server/OAuth2ResourceServerSpecTests.java index 7785431b3a..873d8247e8 100644 --- a/config/src/test/java/org/springframework/security/config/web/server/OAuth2ResourceServerSpecTests.java +++ b/config/src/test/java/org/springframework/security/config/web/server/OAuth2ResourceServerSpecTests.java @@ -35,7 +35,6 @@ import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; import org.apache.http.HttpHeaders; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import reactor.core.publisher.Mono; @@ -139,7 +138,6 @@ public class OAuth2ResourceServerSpecTests { + " }"; // @formatter:on - @Rule public final SpringTestContext spring = new SpringTestContext(this); WebTestClient client; diff --git a/config/src/test/java/org/springframework/security/config/websocket/WebSocketMessageBrokerConfigTests.java b/config/src/test/java/org/springframework/security/config/websocket/WebSocketMessageBrokerConfigTests.java index ddff2642b9..52052af8a5 100644 --- a/config/src/test/java/org/springframework/security/config/websocket/WebSocketMessageBrokerConfigTests.java +++ b/config/src/test/java/org/springframework/security/config/websocket/WebSocketMessageBrokerConfigTests.java @@ -20,7 +20,6 @@ import java.util.HashMap; import java.util.Map; import org.assertj.core.api.ThrowableAssert; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -80,7 +79,6 @@ public class WebSocketMessageBrokerConfigTests { private static final String CONFIG_LOCATION_PREFIX = "classpath:org/springframework/security/config/websocket/WebSocketMessageBrokerConfigTests"; - @Rule public final SpringTestContext spring = new SpringTestContext(this); @Autowired(required = false) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/AuthorizeExchangeDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/AuthorizeExchangeDslTests.kt index 00b559b4ae..bb91311f56 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/AuthorizeExchangeDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/AuthorizeExchangeDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.server -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -38,7 +37,6 @@ import java.util.* * @author Eleftheria Stein */ class AuthorizeExchangeDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerAnonymousDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerAnonymousDslTests.kt index 0e5fdb1361..de141d362e 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerAnonymousDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerAnonymousDslTests.kt @@ -17,7 +17,6 @@ package org.springframework.security.config.web.server import org.assertj.core.api.Assertions.assertThat -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -41,7 +40,6 @@ import reactor.core.publisher.Mono * @author Eleftheria Stein */ class ServerAnonymousDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerCacheControlDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerCacheControlDslTests.kt index f984391c89..6d3b5fce0c 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerCacheControlDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerCacheControlDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.server -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -34,7 +33,6 @@ import org.springframework.web.reactive.config.EnableWebFlux * @author Eleftheria Stein */ class ServerCacheControlDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerContentSecurityPolicyDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerContentSecurityPolicyDslTests.kt index 4a79edc2a7..90b3c4cee6 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerContentSecurityPolicyDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerContentSecurityPolicyDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.server -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -34,7 +33,6 @@ import org.springframework.web.reactive.config.EnableWebFlux * @author Eleftheria Stein */ class ServerContentSecurityPolicyDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerContentTypeOptionsDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerContentTypeOptionsDslTests.kt index 5f206720ca..72ec278ce6 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerContentTypeOptionsDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerContentTypeOptionsDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.server -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -34,7 +33,6 @@ import org.springframework.web.reactive.config.EnableWebFlux * @author Eleftheria Stein */ class ServerContentTypeOptionsDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerCorsDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerCorsDslTests.kt index 71f1cb15aa..5c46a50147 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerCorsDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerCorsDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.server -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -37,7 +36,6 @@ import org.springframework.web.reactive.config.EnableWebFlux * @author Eleftheria Stein */ class ServerCorsDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerCsrfDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerCsrfDslTests.kt index 8e3c11d6a2..6b1ca143a9 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerCsrfDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerCsrfDslTests.kt @@ -19,7 +19,6 @@ package org.springframework.security.config.web.server import io.mockk.every import io.mockk.mockkObject import io.mockk.verify -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -47,7 +46,6 @@ import reactor.core.publisher.Mono * @author Eleftheria Stein */ class ServerCsrfDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerExceptionHandlingDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerExceptionHandlingDslTests.kt index 2ffc634a2c..30a9640d2a 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerExceptionHandlingDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerExceptionHandlingDslTests.kt @@ -17,7 +17,6 @@ package org.springframework.security.config.web.server import org.assertj.core.api.Assertions -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -40,7 +39,6 @@ import java.util.* * @author Eleftheria Stein */ class ServerExceptionHandlingDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerFormLoginDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerFormLoginDslTests.kt index 333bcd53be..8309bab7f7 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerFormLoginDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerFormLoginDslTests.kt @@ -19,7 +19,6 @@ package org.springframework.security.config.web.server import io.mockk.mockkObject import io.mockk.verify import org.assertj.core.api.Assertions.assertThat -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -52,7 +51,6 @@ import reactor.core.publisher.Mono * @author Eleftheria Stein */ class ServerFormLoginDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerFrameOptionsDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerFrameOptionsDslTests.kt index 1448acc052..ea79e0e47b 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerFrameOptionsDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerFrameOptionsDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.server -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -35,7 +34,6 @@ import org.springframework.web.reactive.config.EnableWebFlux * @author Eleftheria Stein */ class ServerFrameOptionsDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerHeadersDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerHeadersDslTests.kt index 5b2566aa00..0044333a55 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerHeadersDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerHeadersDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.server -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -39,7 +38,6 @@ import org.springframework.web.reactive.config.EnableWebFlux * @author Eleftheria Stein */ class ServerHeadersDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerHttpBasicDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerHttpBasicDslTests.kt index 11244b1f3d..a690531ab4 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerHttpBasicDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerHttpBasicDslTests.kt @@ -20,7 +20,6 @@ import io.mockk.every import io.mockk.mockkObject import io.mockk.verify import java.util.Base64 -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -49,7 +48,6 @@ import reactor.core.publisher.Mono * @author Eleftheria Stein */ class ServerHttpBasicDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerHttpSecurityDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerHttpSecurityDslTests.kt index 69bd53b803..9f6041e903 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerHttpSecurityDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerHttpSecurityDslTests.kt @@ -20,7 +20,6 @@ import io.mockk.every import io.mockk.mockkObject import io.mockk.verify import org.assertj.core.api.Assertions.assertThat -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -51,7 +50,6 @@ import reactor.core.publisher.Mono * @author Eleftheria Stein */ class ServerHttpSecurityDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerHttpStrictTransportSecurityDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerHttpStrictTransportSecurityDslTests.kt index fc165d39ca..c9abefae2e 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerHttpStrictTransportSecurityDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerHttpStrictTransportSecurityDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.server.headers -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -37,7 +36,6 @@ import java.time.Duration * @author Eleftheria Stein */ class ServerHttpStrictTransportSecurityDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerHttpsRedirectDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerHttpsRedirectDslTests.kt index 80a72c0354..0bc7bfa76b 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerHttpsRedirectDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerHttpsRedirectDslTests.kt @@ -17,7 +17,6 @@ package org.springframework.security.config.web.server import org.assertj.core.api.Assertions.assertThat -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -37,7 +36,6 @@ import java.util.* * @author Eleftheria Stein */ class ServerHttpsRedirectDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerJwtDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerJwtDslTests.kt index 8b5009ce4b..f6a151a6ed 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerJwtDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerJwtDslTests.kt @@ -27,7 +27,6 @@ import javax.annotation.PreDestroy import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.MockWebServer import org.assertj.core.api.Assertions.assertThat -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -69,7 +68,6 @@ class ServerJwtDslTests { " ]\n" + "}\n" - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerLogoutDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerLogoutDslTests.kt index d1577d6951..dbf9555ca5 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerLogoutDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerLogoutDslTests.kt @@ -20,7 +20,6 @@ import io.mockk.every import io.mockk.mockkObject import io.mockk.verify import org.assertj.core.api.Assertions.assertThat -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -42,7 +41,6 @@ import reactor.core.publisher.Mono * @author Eleftheria Stein */ class ServerLogoutDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerOAuth2ClientDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerOAuth2ClientDslTests.kt index 621fe72d18..8d4d551ba2 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerOAuth2ClientDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerOAuth2ClientDslTests.kt @@ -19,7 +19,6 @@ package org.springframework.security.config.web.server import io.mockk.every import io.mockk.mockkObject import io.mockk.verify -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -48,7 +47,6 @@ import reactor.core.publisher.Mono * @author Eleftheria Stein */ class ServerOAuth2ClientDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerOAuth2LoginDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerOAuth2LoginDslTests.kt index ff6f664878..215b699ebb 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerOAuth2LoginDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerOAuth2LoginDslTests.kt @@ -19,7 +19,6 @@ package org.springframework.security.config.web.server import io.mockk.every import io.mockk.mockkObject import io.mockk.verify -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -46,7 +45,6 @@ import reactor.core.publisher.Mono * @author Eleftheria Stein */ class ServerOAuth2LoginDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerOAuth2ResourceServerDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerOAuth2ResourceServerDslTests.kt index 5659a75496..0403ebe883 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerOAuth2ResourceServerDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerOAuth2ResourceServerDslTests.kt @@ -23,7 +23,6 @@ import java.math.BigInteger import java.security.KeyFactory import java.security.interfaces.RSAPublicKey import java.security.spec.RSAPublicKeySpec -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -49,7 +48,6 @@ import reactor.core.publisher.Mono class ServerOAuth2ResourceServerDslTests { private val validJwt = "eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJtb2NrLXN1YmplY3QiLCJzY29wZSI6Im1lc3NhZ2U6cmVhZCIsImV4cCI6NDY4ODY0MTQxM30.cRl1bv_dDYcAN5U4NlIVKj8uu4mLMwjABF93P4dShiq-GQ-owzaqTSlB4YarNFgV3PKQvT9wxN1jBpGribvISljakoC0E8wDV-saDi8WxN-qvImYsn1zLzYFiZXCfRIxCmonJpydeiAPRxMTPtwnYDS9Ib0T_iA80TBGd-INhyxUUfrwRW5sqKRbjUciRJhpp7fW2ZYXmi9iPt3HDjRQA4IloJZ7f4-spt5Q9wl5HcQTv1t4XrX4eqhVbE5cCoIkFQnKPOc-jhVM44_eazLU6Xk-CCXP8C_UT5pX0luRS2cJrVFfHp2IR_AWxC-shItg6LNEmNFD4Zc-JLZcr0Q86Q" - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerOpaqueTokenDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerOpaqueTokenDslTests.kt index 13ac09c5a2..eed207545b 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerOpaqueTokenDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerOpaqueTokenDslTests.kt @@ -19,7 +19,6 @@ package org.springframework.security.config.web.server import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.MockWebServer import org.assertj.core.api.Assertions.assertThat -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -40,7 +39,6 @@ import javax.annotation.PreDestroy * @author Eleftheria Stein */ class ServerOpaqueTokenDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerPasswordManagementDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerPasswordManagementDslTests.kt index e15b84ca66..31f70645ef 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerPasswordManagementDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerPasswordManagementDslTests.kt @@ -17,7 +17,6 @@ package org.springframework.security.config.web.server import org.apache.http.HttpHeaders -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -35,7 +34,6 @@ import org.springframework.web.reactive.config.EnableWebFlux */ class ServerPasswordManagementDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerPermissionsPolicyDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerPermissionsPolicyDslTests.kt index 82601806e8..fca6ef32cc 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerPermissionsPolicyDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerPermissionsPolicyDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.server -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -33,7 +32,6 @@ import org.springframework.web.reactive.config.EnableWebFlux * @author Christophe Gilles */ class ServerPermissionsPolicyDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerReferrerPolicyDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerReferrerPolicyDslTests.kt index dbd667630a..2bd1ef4349 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerReferrerPolicyDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerReferrerPolicyDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.server -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -35,7 +34,6 @@ import org.springframework.web.reactive.config.EnableWebFlux * @author Eleftheria Stein */ class ServerReferrerPolicyDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerRequestCacheDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerRequestCacheDslTests.kt index 68f4914812..2742944921 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerRequestCacheDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerRequestCacheDslTests.kt @@ -19,7 +19,6 @@ package org.springframework.security.config.web.server import io.mockk.every import io.mockk.mockkObject import io.mockk.verify -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -42,7 +41,6 @@ import reactor.core.publisher.Mono * @author Eleftheria Stein */ class ServerRequestCacheDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerX509DslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerX509DslTests.kt index 2c3c22970b..6f0a27bcde 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerX509DslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerX509DslTests.kt @@ -21,7 +21,6 @@ import io.mockk.mockk import java.security.cert.Certificate import java.security.cert.CertificateFactory import java.security.cert.X509Certificate -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -60,7 +59,6 @@ import reactor.core.publisher.Mono * @author Eleftheria Stein */ class ServerX509DslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerXssProtectionDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerXssProtectionDslTests.kt index 360ecf934f..087fb411c9 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/server/ServerXssProtectionDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/server/ServerXssProtectionDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.server -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext @@ -34,7 +33,6 @@ import org.springframework.web.reactive.config.EnableWebFlux * @author Eleftheria Stein */ class ServerXssProtectionDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/AnonymousDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/AnonymousDslTests.kt index 061bef1e5d..6d18f43283 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/AnonymousDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/AnonymousDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.servlet -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.security.authentication.AnonymousAuthenticationToken @@ -40,7 +39,6 @@ import java.util.* * @author Eleftheria Stein */ class AnonymousDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/AuthorizeRequestsDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/AuthorizeRequestsDslTests.kt index c6f8ec8572..60fdaf366a 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/AuthorizeRequestsDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/AuthorizeRequestsDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.servlet -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.annotation.Bean @@ -52,7 +51,6 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer * @author Eleftheria Stein */ class AuthorizeRequestsDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/CorsDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/CorsDslTests.kt index f06c2628b4..8c0be2d53b 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/CorsDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/CorsDslTests.kt @@ -17,7 +17,6 @@ package org.springframework.security.config.web.servlet import org.assertj.core.api.Assertions.assertThatThrownBy -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.BeanCreationException import org.springframework.beans.factory.annotation.Autowired @@ -41,7 +40,6 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc * @author Eleftheria Stein */ class CorsDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/CsrfDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/CsrfDslTests.kt index f2fb6cca10..daec607770 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/CsrfDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/CsrfDslTests.kt @@ -19,7 +19,6 @@ package org.springframework.security.config.web.servlet import io.mockk.every import io.mockk.mockkObject import io.mockk.verify -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.annotation.Bean @@ -49,7 +48,6 @@ import org.springframework.web.bind.annotation.RestController * @author Eleftheria Stein */ class CsrfDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/ExceptionHandlingDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/ExceptionHandlingDslTests.kt index d6955cf509..25e36b434b 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/ExceptionHandlingDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/ExceptionHandlingDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.servlet -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.security.access.AccessDeniedException @@ -39,7 +38,6 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc * @author Eleftheria Stein */ class ExceptionHandlingDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/FormLoginDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/FormLoginDslTests.kt index d830f11703..6aa3b90b90 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/FormLoginDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/FormLoginDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.servlet -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.annotation.Configuration @@ -42,7 +41,6 @@ import org.springframework.web.bind.annotation.GetMapping * @author Eleftheria Stein */ class FormLoginDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/HeadersDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/HeadersDslTests.kt index e5a6b0272a..5bdf705484 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/HeadersDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/HeadersDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.servlet -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.http.HttpHeaders @@ -40,7 +39,6 @@ import org.springframework.test.web.servlet.get * @author Eleftheria Stein */ class HeadersDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/HttpBasicDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/HttpBasicDslTests.kt index 23c8acf9ae..f4f9c05ded 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/HttpBasicDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/HttpBasicDslTests.kt @@ -20,7 +20,6 @@ import io.mockk.every import io.mockk.mockkObject import io.mockk.verify import javax.servlet.http.HttpServletRequest -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.annotation.Bean @@ -46,7 +45,6 @@ import org.springframework.web.bind.annotation.RestController * @author Eleftheria Stein */ class HttpBasicDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/HttpSecurityDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/HttpSecurityDslTests.kt index 9082fe2f24..d09f951c28 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/HttpSecurityDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/HttpSecurityDslTests.kt @@ -20,7 +20,6 @@ import io.mockk.every import io.mockk.mockkObject import io.mockk.verify import org.assertj.core.api.Assertions.assertThat -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.annotation.Bean @@ -59,7 +58,6 @@ import javax.servlet.Filter * @author Eleftheria Stein */ class HttpSecurityDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/LogoutDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/LogoutDslTests.kt index 8c69c43c9a..7b6054216d 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/LogoutDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/LogoutDslTests.kt @@ -20,7 +20,6 @@ import io.mockk.every import io.mockk.mockkObject import io.mockk.verify import org.assertj.core.api.Assertions.assertThat -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.mock.web.MockHttpSession @@ -44,7 +43,6 @@ import org.springframework.test.web.servlet.post * @author Eleftheria Stein */ class LogoutDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/OAuth2ClientDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/OAuth2ClientDslTests.kt index 394d58aef6..85e68ffd98 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/OAuth2ClientDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/OAuth2ClientDslTests.kt @@ -19,7 +19,6 @@ package org.springframework.security.config.web.servlet import io.mockk.every import io.mockk.mockkObject import io.mockk.verify -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.annotation.Bean @@ -50,7 +49,6 @@ import org.springframework.test.web.servlet.get * @author Eleftheria Stein */ class OAuth2ClientDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/OAuth2LoginDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/OAuth2LoginDslTests.kt index bb45614a58..8485b9c236 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/OAuth2LoginDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/OAuth2LoginDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.servlet -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.annotation.Bean @@ -39,7 +38,6 @@ import org.springframework.web.bind.annotation.RestController * @author Eleftheria Stein */ class OAuth2LoginDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/OAuth2ResourceServerDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/OAuth2ResourceServerDslTests.kt index 23de18152e..6f06a40f21 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/OAuth2ResourceServerDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/OAuth2ResourceServerDslTests.kt @@ -22,7 +22,6 @@ import io.mockk.mockkObject import io.mockk.verify import javax.servlet.http.HttpServletRequest import org.assertj.core.api.Assertions -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.BeanCreationException import org.springframework.beans.factory.annotation.Autowired @@ -51,7 +50,6 @@ import org.springframework.test.web.servlet.get * @author Eleftheria Stein */ class OAuth2ResourceServerDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/PasswordManagementDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/PasswordManagementDslTests.kt index afd826e1af..b8a34cc79f 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/PasswordManagementDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/PasswordManagementDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.servlet -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.security.config.annotation.web.builders.HttpSecurity @@ -33,7 +32,6 @@ import org.springframework.test.web.servlet.get */ class PasswordManagementDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/PortMapperDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/PortMapperDslTests.kt index a425d48be4..179d941584 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/PortMapperDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/PortMapperDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.servlet -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.security.config.annotation.web.builders.HttpSecurity @@ -34,7 +33,6 @@ import java.util.* * @author Eleftheria Stein */ class PortMapperDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/RememberMeDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/RememberMeDslTests.kt index bc394d707f..9bcb133f4d 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/RememberMeDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/RememberMeDslTests.kt @@ -25,7 +25,6 @@ import io.mockk.mockkObject import io.mockk.verify import javax.servlet.http.HttpServletRequest import org.assertj.core.api.Assertions.assertThat -import org.junit.Rule import org.junit.Test import org.junit.jupiter.api.fail import org.springframework.beans.factory.annotation.Autowired @@ -67,7 +66,6 @@ import org.springframework.test.web.servlet.post */ internal class RememberMeDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/RequestCacheDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/RequestCacheDslTests.kt index b528e2558f..998cbee094 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/RequestCacheDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/RequestCacheDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.servlet -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.security.config.annotation.web.builders.HttpSecurity @@ -35,7 +34,6 @@ import org.springframework.test.web.servlet.result.MockMvcResultMatchers.redirec * @author Eleftheria Stein */ class RequestCacheDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/RequiresChannelDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/RequiresChannelDslTests.kt index 82f206b416..267a7d268f 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/RequiresChannelDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/RequiresChannelDslTests.kt @@ -18,7 +18,6 @@ package org.springframework.security.config.web.servlet import io.mockk.mockkObject import io.mockk.verify -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.security.access.ConfigAttribute @@ -44,7 +43,6 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc * @author Eleftheria Stein */ class RequiresChannelDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/Saml2DslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/Saml2DslTests.kt index bc9ea7994d..08c32f672d 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/Saml2DslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/Saml2DslTests.kt @@ -21,7 +21,6 @@ import io.mockk.mockk import io.mockk.mockkObject import io.mockk.verify import org.assertj.core.api.Assertions -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.BeanCreationException import org.springframework.beans.factory.annotation.Autowired @@ -54,7 +53,6 @@ import java.util.Base64 * @author Eleftheria Stein */ class Saml2DslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/SessionManagementDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/SessionManagementDslTests.kt index 7516b278f4..67caa214fa 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/SessionManagementDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/SessionManagementDslTests.kt @@ -22,7 +22,6 @@ import io.mockk.mockk import io.mockk.mockkObject import io.mockk.verify import org.assertj.core.api.Assertions.assertThat -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.annotation.Bean @@ -49,7 +48,6 @@ import org.springframework.test.web.servlet.result.MockMvcResultMatchers.status * @author Eleftheria Stein */ class SessionManagementDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/X509DslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/X509DslTests.kt index a6b8c96d2f..f6268bb4d9 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/X509DslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/X509DslTests.kt @@ -20,7 +20,6 @@ import io.mockk.mockk import java.security.cert.Certificate import java.security.cert.CertificateFactory import java.security.cert.X509Certificate -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.annotation.Bean @@ -46,7 +45,6 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get * @author Eleftheria Stein */ class X509DslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/CacheControlDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/CacheControlDslTests.kt index aa9a7a16a2..27c838134b 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/CacheControlDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/CacheControlDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.servlet.headers -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.http.HttpHeaders @@ -34,7 +33,6 @@ import org.springframework.test.web.servlet.get * @author Eleftheria Stein */ class CacheControlDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/ContentSecurityPolicyDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/ContentSecurityPolicyDslTests.kt index 478521a957..f32ee3f042 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/ContentSecurityPolicyDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/ContentSecurityPolicyDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.servlet.headers -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.security.config.annotation.web.builders.HttpSecurity @@ -34,7 +33,6 @@ import org.springframework.test.web.servlet.get * @author Eleftheria Stein */ class ContentSecurityPolicyDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/ContentTypeOptionsDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/ContentTypeOptionsDslTests.kt index 7a00e91266..58254fb79e 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/ContentTypeOptionsDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/ContentTypeOptionsDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.servlet.headers -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.security.config.annotation.web.builders.HttpSecurity @@ -34,7 +33,6 @@ import org.springframework.test.web.servlet.get * @author Eleftheria Stein */ class ContentTypeOptionsDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/FrameOptionsDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/FrameOptionsDslTests.kt index b725f65e72..b8970c2830 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/FrameOptionsDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/FrameOptionsDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.servlet.headers -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.security.config.annotation.web.builders.HttpSecurity @@ -35,7 +34,6 @@ import org.springframework.test.web.servlet.get * @author Eleftheria Stein */ class FrameOptionsDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/HttpPublicKeyPinningDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/HttpPublicKeyPinningDslTests.kt index 364fd53e67..bd82cd9d58 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/HttpPublicKeyPinningDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/HttpPublicKeyPinningDslTests.kt @@ -17,7 +17,6 @@ package org.springframework.security.config.web.servlet.headers import org.assertj.core.api.Assertions -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.security.config.annotation.web.builders.HttpSecurity @@ -34,7 +33,6 @@ import org.springframework.test.web.servlet.get * @author Eleftheria Stein */ class HttpPublicKeyPinningDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/HttpStrictTransportSecurityDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/HttpStrictTransportSecurityDslTests.kt index 00f0e80c45..ad6aa9a7eb 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/HttpStrictTransportSecurityDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/HttpStrictTransportSecurityDslTests.kt @@ -17,7 +17,6 @@ package org.springframework.security.config.web.servlet.headers import org.assertj.core.api.Assertions -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.security.config.annotation.web.builders.HttpSecurity @@ -36,7 +35,6 @@ import org.springframework.test.web.servlet.get * @author Eleftheria Stein */ class HttpStrictTransportSecurityDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/ReferrerPolicyDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/ReferrerPolicyDslTests.kt index 5e6750e33c..f7420479bd 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/ReferrerPolicyDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/ReferrerPolicyDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.servlet.headers -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.security.config.annotation.web.builders.HttpSecurity @@ -34,7 +33,6 @@ import org.springframework.test.web.servlet.get * @author Eleftheria Stein */ class ReferrerPolicyDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/XssProtectionConfigDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/XssProtectionConfigDslTests.kt index 92a6e7cc88..d5f6b64d5f 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/XssProtectionConfigDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/headers/XssProtectionConfigDslTests.kt @@ -16,7 +16,6 @@ package org.springframework.security.config.web.servlet.headers -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.security.config.annotation.web.builders.HttpSecurity @@ -34,7 +33,6 @@ import org.springframework.test.web.servlet.get * @author Eleftheria Stein */ class XssProtectionConfigDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/client/AuthorizationCodeGrantDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/client/AuthorizationCodeGrantDslTests.kt index 21b98fd69e..7cfbc57bf7 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/client/AuthorizationCodeGrantDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/client/AuthorizationCodeGrantDslTests.kt @@ -20,7 +20,6 @@ import io.mockk.every import io.mockk.mockk import io.mockk.mockkObject import io.mockk.verify -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.annotation.Bean @@ -51,7 +50,6 @@ import org.springframework.test.web.servlet.get * @author Eleftheria Stein */ class AuthorizationCodeGrantDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/login/AuthorizationEndpointDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/login/AuthorizationEndpointDslTests.kt index 6d5ddbd50e..b85c8b6253 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/login/AuthorizationEndpointDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/login/AuthorizationEndpointDslTests.kt @@ -20,7 +20,6 @@ import io.mockk.every import io.mockk.mockkObject import io.mockk.verify import javax.servlet.http.HttpServletRequest -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.annotation.Bean @@ -46,7 +45,6 @@ import org.springframework.test.web.servlet.get * @author Eleftheria Stein */ class AuthorizationEndpointDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/login/RedirectionEndpointDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/login/RedirectionEndpointDslTests.kt index 55e87cfbc4..55d717338b 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/login/RedirectionEndpointDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/login/RedirectionEndpointDslTests.kt @@ -18,7 +18,6 @@ package org.springframework.security.config.web.servlet.oauth2.login import io.mockk.every import io.mockk.mockkObject -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.annotation.Bean @@ -54,7 +53,6 @@ import org.springframework.test.web.servlet.get * @author Eleftheria Stein */ class RedirectionEndpointDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/login/TokenEndpointDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/login/TokenEndpointDslTests.kt index 3326684792..6a7f54cb03 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/login/TokenEndpointDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/login/TokenEndpointDslTests.kt @@ -19,7 +19,6 @@ package org.springframework.security.config.web.servlet.oauth2.login import io.mockk.every import io.mockk.mockkObject import io.mockk.verify -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.annotation.Bean @@ -49,7 +48,6 @@ import org.springframework.test.web.servlet.get * @author Eleftheria Stein */ class TokenEndpointDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/login/UserInfoEndpointDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/login/UserInfoEndpointDslTests.kt index 47f4cd327f..ed48e322c6 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/login/UserInfoEndpointDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/login/UserInfoEndpointDslTests.kt @@ -20,7 +20,6 @@ import io.mockk.every import io.mockk.mockk import io.mockk.mockkObject import io.mockk.verify -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.annotation.Bean @@ -54,7 +53,6 @@ import org.springframework.test.web.servlet.get * @author Eleftheria Stein */ class UserInfoEndpointDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/resourceserver/JwtDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/resourceserver/JwtDslTests.kt index 3363c949e6..ebe0de6509 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/resourceserver/JwtDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/resourceserver/JwtDslTests.kt @@ -20,7 +20,6 @@ import io.mockk.every import io.mockk.mockk import io.mockk.mockkObject import io.mockk.verify -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.annotation.Bean @@ -61,7 +60,6 @@ class JwtDslTests { emptyList() ) - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/resourceserver/OpaqueTokenDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/resourceserver/OpaqueTokenDslTests.kt index 3f99902951..6c928b1591 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/resourceserver/OpaqueTokenDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/resourceserver/OpaqueTokenDslTests.kt @@ -19,7 +19,6 @@ package org.springframework.security.config.web.servlet.oauth2.resourceserver import io.mockk.every import io.mockk.mockkObject import io.mockk.verify -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.annotation.Bean @@ -55,7 +54,6 @@ import org.springframework.web.client.RestTemplate * @author Eleftheria Stein */ class OpaqueTokenDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/session/SessionConcurrencyDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/session/SessionConcurrencyDslTests.kt index b6e44c0918..30fe857928 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/session/SessionConcurrencyDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/session/SessionConcurrencyDslTests.kt @@ -19,7 +19,6 @@ package org.springframework.security.config.web.servlet.session import io.mockk.every import io.mockk.mockkObject import java.util.Date -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.annotation.Bean @@ -50,7 +49,6 @@ import org.springframework.test.web.servlet.result.MockMvcResultMatchers.status * @author Eleftheria Stein */ class SessionConcurrencyDslTests { - @Rule @JvmField val spring = SpringTestContext(this) diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/session/SessionFixationDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/session/SessionFixationDslTests.kt index d2647ea574..ec3059a19d 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/session/SessionFixationDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/session/SessionFixationDslTests.kt @@ -17,7 +17,6 @@ package org.springframework.security.config.web.servlet.session import org.assertj.core.api.Assertions.assertThat -import org.junit.Rule import org.junit.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.annotation.Bean @@ -41,7 +40,6 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders * @author Eleftheria Stein */ class SessionFixationDslTests { - @Rule @JvmField var spring = SpringTestContext(this)