From 028af06d614dd8b38c9807f5eabf986a109f83cf Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Mon, 24 Mar 2008 22:43:08 +0000 Subject: [PATCH] SEC-428: Security interceptor does not work with schema based aop:config http://jira.springframework.org/browse/SEC-428. Fixed broken test method. --- .../MethodSecurityInterceptorWithAopConfigTests.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/test/java/org/springframework/security/intercept/method/aopalliance/MethodSecurityInterceptorWithAopConfigTests.java b/core/src/test/java/org/springframework/security/intercept/method/aopalliance/MethodSecurityInterceptorWithAopConfigTests.java index 9f812ebf3a..fd6f51b5ce 100644 --- a/core/src/test/java/org/springframework/security/intercept/method/aopalliance/MethodSecurityInterceptorWithAopConfigTests.java +++ b/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( "" +