浏览代码

Minor itest updates

Luke Taylor 16 年之前
父节点
当前提交
68364f06a2

+ 1 - 1
itest/web/src/main/webapp/WEB-INF/http-security.xml

@@ -4,7 +4,7 @@
     xmlns:beans="http://www.springframework.org/schema/beans"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-                        http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.2.xsd">
+                        http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd">
 
     <!--
        Http App Context to test form login, remember-me and concurrent session control.

+ 9 - 9
itest/web/src/main/webapp/WEB-INF/in-memory-provider.xml

@@ -4,14 +4,14 @@
     xmlns:beans="http://www.springframework.org/schema/beans"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-                        http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.2.xsd">
+                        http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd">
 
-	<authentication-provider>
-		<user-service>
-			<user name="miles" password="milespassword" authorities="ROLE_USER,ROLE_JAZZ,ROLE_TRUMPETER"/>
-			<user name="johnc" password="johncspassword" authorities="ROLE_USER,ROLE_JAZZ,ROLE_SAXOPHONIST"/>			
-			<user name="jimi" password="jimispassword" authorities="ROLE_USER,ROLE_ROCK,ROLE_GUITARIST"/>
-		</user-service>
-	</authentication-provider>
+  <authentication-provider>
+    <user-service>
+      <user name="miles" password="milespassword" authorities="ROLE_USER,ROLE_JAZZ,ROLE_TRUMPETER"/>
+      <user name="johnc" password="johncspassword" authorities="ROLE_USER,ROLE_JAZZ,ROLE_SAXOPHONIST"/>
+      <user name="jimi" password="jimispassword" authorities="ROLE_USER,ROLE_ROCK,ROLE_GUITARIST"/>
+    </user-service>
+  </authentication-provider>
 
-</beans:beans>
+</beans:beans>

+ 6 - 3
itest/web/src/test/java/org/springframework/security/integration/AbstractWebServerIntegrationTests.java

@@ -17,6 +17,11 @@ import org.testng.annotations.*;
 import com.meterware.httpunit.WebConversation;
 
 /**
+ * Base class which allows the application to be started with a particular Spring application
+ * context. Subclasses override the <tt>getContextConfigLocations</tt> method to return
+ * a list of context file names which is passed to the <tt>ContextLoaderListener</tt> when
+ * starting up the webapp.
+ *
  * @author Luke Taylor
  * @version $Id$
  */
@@ -51,7 +56,7 @@ public abstract class AbstractWebServerIntegrationTests {
     }
 
     @SuppressWarnings("unchecked")
-    protected WebAppContext createWebContext() {
+    private WebAppContext createWebContext() {
         WebAppContext webCtx = new WebAppContext("src/main/webapp", getContextPath());
 
         if (StringUtils.hasText(getContextConfigLocations())) {
@@ -117,8 +122,6 @@ public abstract class AbstractWebServerIntegrationTests {
         tester.assertTextPresent(text);
     }
 
-
-
     // Security-specific utility methods
 
     protected void login(String username, String password) {