瀏覽代碼

SEC-428: Security interceptor does not work with schema based aop:config
http://jira.springframework.org/browse/SEC-428. Fixed broken test method.

Luke Taylor 17 年之前
父節點
當前提交
028af06d61

+ 4 - 3
core/src/test/java/org/springframework/security/intercept/method/aopalliance/MethodSecurityInterceptorWithAopConfigTests.java

@@ -3,14 +3,15 @@ package org.springframework.security.intercept.method.aopalliance;
 import org.junit.After;
 import org.junit.Test;
 import org.springframework.context.support.AbstractXmlApplicationContext;
+import org.springframework.security.AccessDeniedException;
+import org.springframework.security.AuthenticationCredentialsNotFoundException;
 import org.springframework.security.ITargetObject;
 import org.springframework.security.util.InMemoryXmlApplicationContext;
 
 /**
  * Tests for SEC-428. 
  * 
- * @author Luke Taylor
- * 
+ * @author Luke Taylor 
  */
 public class MethodSecurityInterceptorWithAopConfigTests {
     static final String AUTH_PROVIDER_XML =
@@ -38,7 +39,7 @@ public class MethodSecurityInterceptorWithAopConfigTests {
         }
     }
     
-    @Test
+    @Test(expected=AuthenticationCredentialsNotFoundException.class)
     public void securityInterceptorIsAppliedWhenUsedWithAopConfig() {
         setContext(
                 "<aop:config>" +