|
@@ -3,7 +3,6 @@ package org.springframework.security.config;
|
|
|
import org.springframework.security.util.InMemoryXmlApplicationContext;
|
|
|
import org.springframework.security.ldap.SpringSecurityContextSource;
|
|
|
|
|
|
-import org.springframework.ldap.core.support.BaseLdapPathContextSource;
|
|
|
import org.springframework.ldap.core.LdapTemplate;
|
|
|
|
|
|
import org.junit.Test;
|
|
@@ -38,8 +37,8 @@ public class LdapServerBeanDefinitionParserTests {
|
|
|
@Test
|
|
|
public void useOfUrlAttributeCreatesCorrectContextSource() {
|
|
|
// Create second "server" with a url pointing at embedded one
|
|
|
- appCtx = new InMemoryXmlApplicationContext("<ldap-server port=\"33388\"/>" +
|
|
|
- "<ldap-server id=\"blah\" url=\"ldap://127.0.0.1:33388/dc=springframework,dc=org\" />");
|
|
|
+ appCtx = new InMemoryXmlApplicationContext("<ldap-server port='33388'/>" +
|
|
|
+ "<ldap-server id='blah' url='ldap://127.0.0.1:33388/dc=springframework,dc=org' />");
|
|
|
|
|
|
// Check the default context source is still there.
|
|
|
appCtx.getBean(BeanIds.CONTEXT_SOURCE);
|
|
@@ -54,7 +53,7 @@ public class LdapServerBeanDefinitionParserTests {
|
|
|
@Test
|
|
|
public void loadingSpecificLdifFileIsSuccessful() {
|
|
|
appCtx = new InMemoryXmlApplicationContext(
|
|
|
- "<ldap-server ldif=\"classpath*:test-server2.xldif\" root=\"dc=monkeymachine,dc=co,dc=uk\" />");
|
|
|
+ "<ldap-server ldif='classpath*:test-server2.xldif' root='dc=monkeymachine,dc=co,dc=uk' />");
|
|
|
SpringSecurityContextSource contextSource = (SpringSecurityContextSource) appCtx.getBean(BeanIds.CONTEXT_SOURCE);
|
|
|
|
|
|
LdapTemplate template = new LdapTemplate(contextSource);
|