Răsfoiți Sursa

SEC-2684: Correct spelling of WithSecurityContextTestExecutionListener

Rob Winch 11 ani în urmă
părinte
comite
906a0cb0e2

+ 2 - 2
samples/hellomvc-jc/src/test/java/org/springframework/security/samples/config/SecurityConfigTests.java

@@ -29,7 +29,7 @@ import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.samples.mvc.config.WebMvcConfiguration;
 import org.springframework.security.test.context.support.WithMockUser;
-import org.springframework.security.test.context.support.WithSecurityContextTestExcecutionListener;
+import org.springframework.security.test.context.support.WithSecurityContextTestExecutionListener;
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.TestExecutionListeners;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -54,7 +54,7 @@ import org.springframework.web.context.WebApplicationContext;
         DependencyInjectionTestExecutionListener.class,
         DirtiesContextTestExecutionListener.class,
         TransactionalTestExecutionListener.class,
-        WithSecurityContextTestExcecutionListener.class})
+        WithSecurityContextTestExecutionListener.class})
 public class SecurityConfigTests {
     private MockMvc mvc;
 

+ 0 - 7
samples/inmemory-jc/src/test/java/org/springframework/security/samples/config/SecurityConfigTests.java

@@ -30,17 +30,10 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.samples.mvc.config.WebMvcConfiguration;
 import org.springframework.security.test.context.DefaultSecurityTestExecutionListeners;
 import org.springframework.security.test.context.support.WithMockUser;
-import org.springframework.security.test.context.support.WithSecurityContextTestExcecutionListener;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.TestExecutionListeners;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;
-import org.springframework.test.context.support.DirtiesContextTestExecutionListener;
-import org.springframework.test.context.transaction.TransactionalTestExecutionListener;
-import org.springframework.test.context.web.ServletTestExecutionListener;
 import org.springframework.test.context.web.WebAppConfiguration;
 import org.springframework.test.web.servlet.MockMvc;
-import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder;
 import org.springframework.test.web.servlet.setup.MockMvcBuilders;
 import org.springframework.web.context.WebApplicationContext;
 

+ 2 - 2
test/src/main/java/org/springframework/security/test/context/DefaultSecurityTestExecutionListeners.java

@@ -15,7 +15,7 @@
  */
 package org.springframework.security.test.context;
 
-import org.springframework.security.test.context.support.WithSecurityContextTestExcecutionListener;
+import org.springframework.security.test.context.support.WithSecurityContextTestExecutionListener;
 import org.springframework.test.context.TestExecutionListeners;
 import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;
 import org.springframework.test.context.support.DirtiesContextTestExecutionListener;
@@ -38,5 +38,5 @@ import java.lang.annotation.*;
         DependencyInjectionTestExecutionListener.class,
         DirtiesContextTestExecutionListener.class,
         TransactionalTestExecutionListener.class,
-        WithSecurityContextTestExcecutionListener.class})
+        WithSecurityContextTestExecutionListener.class})
 public @interface DefaultSecurityTestExecutionListeners {}

+ 1 - 2
test/src/main/java/org/springframework/security/test/context/TestSecurityContextHolder.java

@@ -19,7 +19,6 @@ import javax.servlet.FilterChain;
 
 import org.springframework.security.core.context.SecurityContext;
 import org.springframework.security.core.context.SecurityContextHolder;
-import org.springframework.security.test.context.support.WithSecurityContextTestExcecutionListener;
 import org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors;
 import org.springframework.security.web.context.SecurityContextPersistenceFilter;
 import org.springframework.security.web.context.SecurityContextRepository;
@@ -43,7 +42,7 @@ import org.springframework.util.Assert;
  * <ul>
  * <li>Before a test is executed, the {@link TestSecurityContextHolder} is
  * populated. Typically this is done using the
- * {@link WithSecurityContextTestExcecutionListener}</li>
+ * {@link org.springframework.security.test.context.support.WithSecurityContextTestExecutionListener}</li>
  * <li>The test is ran. When used with {@link MockMvc} it is typically used with
  * {@link SecurityMockMvcRequestPostProcessors#testSecurityContext()}. Which ensures
  * the {@link SecurityContext} from {@link TestSecurityContextHolder} is

+ 1 - 1
test/src/main/java/org/springframework/security/test/context/support/WithMockUser.java

@@ -29,7 +29,7 @@ import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.test.web.servlet.MockMvc;
 
 /**
- * When used with {@link WithSecurityContextTestExcecutionListener} this annotation can be
+ * When used with {@link WithSecurityContextTestExecutionListener} this annotation can be
  * added to a test method to emulate running with a mocked user. In order to work with {@link MockMvc}  The
  * {@link SecurityContext} that is used will have the following properties:
  *

+ 1 - 1
test/src/main/java/org/springframework/security/test/context/support/WithSecurityContextTestExcecutionListener.java → test/src/main/java/org/springframework/security/test/context/support/WithSecurityContextTestExecutionListener.java

@@ -39,7 +39,7 @@ import org.springframework.test.web.servlet.MockMvc;
  * @author Rob Winch
  * @since 4.0
  */
-public class WithSecurityContextTestExcecutionListener extends
+public class WithSecurityContextTestExecutionListener extends
         AbstractTestExecutionListener {
 
     /**

+ 1 - 1
test/src/main/java/org/springframework/security/test/context/support/WithUserDetails.java

@@ -31,7 +31,7 @@ import org.springframework.security.core.userdetails.UserDetailsService;
 import org.springframework.test.web.servlet.MockMvc;
 
 /**
- * When used with {@link WithSecurityContextTestExcecutionListener} this annotation can be
+ * When used with {@link WithSecurityContextTestExecutionListener} this annotation can be
  * added to a test method to emulate running with a {@link UserDetails} returned
  * from the {@link UserDetailsService}. In order to work with {@link MockMvc}
  * The {@link SecurityContext} that is used will have the following properties:

+ 2 - 2
test/src/test/java/org/springframework/security/test/context/support/WithSecurityContextTestExcecutionListenerTests.java

@@ -37,11 +37,11 @@ public class WithSecurityContextTestExcecutionListenerTests {
     @Mock
     private TestContext testContext;
 
-    private WithSecurityContextTestExcecutionListener listener;
+    private WithSecurityContextTestExecutionListener listener;
 
     @Before
     public void setup() {
-        listener = new WithSecurityContextTestExcecutionListener();
+        listener = new WithSecurityContextTestExecutionListener();
         context = new AnnotationConfigApplicationContext(Config.class);
     }
 

+ 0 - 6
test/src/test/java/org/springframework/security/test/web/servlet/showcase/secured/WithUserDetailsAuthenticationTests.java

@@ -35,14 +35,8 @@ import org.springframework.security.config.annotation.web.servlet.configuration.
 import org.springframework.security.core.userdetails.UserDetailsService;
 import org.springframework.security.test.context.DefaultSecurityTestExecutionListeners;
 import org.springframework.security.test.context.support.WithUserDetails;
-import org.springframework.security.test.context.support.WithSecurityContextTestExcecutionListener;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.TestExecutionListeners;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;
-import org.springframework.test.context.support.DirtiesContextTestExecutionListener;
-import org.springframework.test.context.transaction.TransactionalTestExecutionListener;
-import org.springframework.test.context.web.ServletTestExecutionListener;
 import org.springframework.test.context.web.WebAppConfiguration;
 import org.springframework.test.web.servlet.MockMvc;
 import org.springframework.test.web.servlet.setup.MockMvcBuilders;