You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by lh...@apache.org on 2012/01/07 04:39:38 UTC
svn commit: r1228565 -
/shiro/trunk/core/src/test/groovy/org/apache/shiro/config/ReflectionBuilderTest.groovy
Author: lhazlewood
Date: Sat Jan 7 03:39:38 2012
New Revision: 1228565
URL: http://svn.apache.org/viewvc?rev=1228565&view=rev
Log:
SHIRO-305: expanded pn one test case
Modified:
shiro/trunk/core/src/test/groovy/org/apache/shiro/config/ReflectionBuilderTest.groovy
Modified: shiro/trunk/core/src/test/groovy/org/apache/shiro/config/ReflectionBuilderTest.groovy
URL: http://svn.apache.org/viewvc/shiro/trunk/core/src/test/groovy/org/apache/shiro/config/ReflectionBuilderTest.groovy?rev=1228565&r1=1228564&r2=1228565&view=diff
==============================================================================
--- shiro/trunk/core/src/test/groovy/org/apache/shiro/config/ReflectionBuilderTest.groovy (original)
+++ shiro/trunk/core/src/test/groovy/org/apache/shiro/config/ReflectionBuilderTest.groovy Sat Jan 7 03:39:38 2012
@@ -21,6 +21,7 @@ package org.apache.shiro.config
import org.apache.shiro.codec.Base64
import org.apache.shiro.codec.CodecSupport
import org.apache.shiro.codec.Hex
+import org.apache.shiro.realm.ldap.JndiLdapRealm
import org.apache.shiro.util.CollectionUtils
/**
@@ -85,14 +86,17 @@ class ReflectionBuilderTest extends Groo
ini.load('''
ldapRealm = org.apache.shiro.realm.ldap.JndiLdapRealm
ldapRealm.contextFactory.environment[java.naming.security.protocol] = ssl
- ldapRealm.contextFactory.environment[com.sun.jndi.ldap.connect.pool.protocol] = plain ssl
ldapRealm.contextFactory.environment[com.sun.jndi.ldap.connect.pool] = true
+ ldapRealm.contextFactory.environment[com.sun.jndi.ldap.connect.pool.protocol] = plain ssl
''')
def builder = new ReflectionBuilder()
def objects = builder.buildObjects(ini.getSections().iterator().next())
assertFalse objects.isEmpty()
- assertEquals 'ssl', objects['ldapRealm'].contextFactory.environment['java.naming.security.protocol']
+ def ldapRealm = objects['ldapRealm'] as JndiLdapRealm
+ assertEquals 'ssl', ldapRealm.contextFactory.environment['java.naming.security.protocol']
+ assertEquals 'true', ldapRealm.contextFactory.environment['com.sun.jndi.ldap.connect.pool']
+ assertEquals 'plain ssl', ldapRealm.contextFactory.environment['com.sun.jndi.ldap.connect.pool.protocol']
}
void testSimpleConfig() {