SEC-1438: Removed JoinPoint support from AbstractMethodSecurityMetadataSource

This commit is contained in:
Luke Taylor
2010-03-11 21:51:19 +00:00
parent 1be44ecd18
commit 9e049dfef4
2 changed files with 3 additions and 48 deletions

View File

@@ -24,7 +24,6 @@ import junit.framework.TestCase;
import org.aopalliance.intercept.MethodInvocation;
import org.springframework.security.ITargetObject;
import org.springframework.security.MockJoinPoint;
import org.springframework.security.OtherTargetObject;
import org.springframework.security.TargetObject;
import org.springframework.security.access.ConfigAttribute;
@@ -46,22 +45,6 @@ public class MethodSecurityMetadataSourceEditorTests extends TestCase {
super.setUp();
}
public void testAspectJJointPointLookup() throws Exception {
MethodSecurityMetadataSourceEditor editor = new MethodSecurityMetadataSourceEditor();
editor.setAsText("org.springframework.security.TargetObject.countLength=ROLE_ONE,ROLE_TWO,RUN_AS_ENTRY");
MapBasedMethodSecurityMetadataSource map = (MapBasedMethodSecurityMetadataSource) editor.getValue();
Class<TargetObject> clazz = TargetObject.class;
Method method = clazz.getMethod("countLength", new Class[] {String.class});
MockJoinPoint joinPoint = new MockJoinPoint(new TargetObject(), method);
Collection<ConfigAttribute> returnedCountLength = map.getAttributes(joinPoint);
List<ConfigAttribute> expectedCountLength = SecurityConfig.createList("ROLE_ONE", "ROLE_TWO", "RUN_AS_ENTRY");
assertEquals(expectedCountLength, returnedCountLength);
}
public void testClassNameNotFoundResultsInException() {
MethodSecurityMetadataSourceEditor editor = new MethodSecurityMetadataSourceEditor();