SEC-954: Removed test dependency on AbstractMethodDefinitionSource.

This commit is contained in:
Luke Taylor 2008-08-12 17:08:55 +00:00
parent 36b35e3b1f
commit d9ab0758ee
1 changed files with 8 additions and 8 deletions

View File

@ -36,7 +36,7 @@ import org.springframework.security.RunAsManager;
import org.springframework.security.context.SecurityContextHolder; import org.springframework.security.context.SecurityContextHolder;
import org.springframework.security.intercept.method.AbstractMethodDefinitionSource; import org.springframework.security.intercept.method.MethodDefinitionSource;
import org.springframework.security.intercept.method.MockMethodDefinitionSource; import org.springframework.security.intercept.method.MockMethodDefinitionSource;
import org.springframework.security.providers.UsernamePasswordAuthenticationToken; import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
@ -446,15 +446,11 @@ public class MethodSecurityInterceptorTests extends TestCase {
} }
} }
private class MockObjectDefinitionSourceWhichOnlySupportsStrings extends AbstractMethodDefinitionSource { private class MockObjectDefinitionSourceWhichOnlySupportsStrings implements MethodDefinitionSource {
public Collection getConfigAttributeDefinitions() { public Collection getConfigAttributeDefinitions() {
return null; return null;
} }
protected ConfigAttributeDefinition lookupAttributes(Method method) {
throw new UnsupportedOperationException("mock method not implemented");
}
public ConfigAttributeDefinition getAttributes(Method method, Class targetClass) { public ConfigAttributeDefinition getAttributes(Method method, Class targetClass) {
throw new UnsupportedOperationException("mock method not implemented"); throw new UnsupportedOperationException("mock method not implemented");
} }
@ -466,6 +462,10 @@ public class MethodSecurityInterceptorTests extends TestCase {
return false; return false;
} }
} }
public ConfigAttributeDefinition getAttributes(Object object) {
throw new UnsupportedOperationException("mock method not implemented");
}
} }
private class MockRunAsManagerWhichOnlySupportsStrings implements RunAsManager { private class MockRunAsManagerWhichOnlySupportsStrings implements RunAsManager {