Переглянути джерело

Added test file for CustomAuthenticationProviderBeanDefinitionDecorator

Luke Taylor 17 роки тому
батько
коміт
ed08ba10ba

+ 21 - 0
core/src/test/java/org/springframework/security/config/CustomAuthenticationProviderBeanDefinitionDecoratorTests.java

@@ -0,0 +1,21 @@
+package org.springframework.security.config;
+
+import org.junit.Test;
+import org.springframework.security.util.InMemoryXmlApplicationContext;
+
+
+public class CustomAuthenticationProviderBeanDefinitionDecoratorTests {
+    
+    @Test
+    public void decoratorParsesSuccessfully() {
+        InMemoryXmlApplicationContext ctx = new InMemoryXmlApplicationContext(
+                "<b:bean id='someBean' class='org.springframework.security.config.TestBusinessBeanImpl'>" +
+                "   <intercept-methods>" +
+                "       <protect method='org.springframework.security.config.TestBusinessBean.*' access='ROLE_A' />" +
+                "   </intercept-methods>" +
+                "</b:bean>" + HttpSecurityBeanDefinitionParserTests.AUTH_PROVIDER_XML
+        );
+        
+        ctx.getBean("someBean");
+    }
+}