1
0
mirror of synced 2026-08-06 02:08:01 +00:00

Use "'" for XML attributes in in-memory test contexts for readability.

This commit is contained in:
Luke Taylor
2008-01-21 20:08:24 +00:00
parent 7d88ee8c48
commit 1b8f13aa4c
2 changed files with 8 additions and 13 deletions
@@ -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);