From 353d33a988242bd8ee362e3dcf60de4173a15fc6 Mon Sep 17 00:00:00 2001 From: Mattias Arthursson Date: Mon, 19 Nov 2007 07:00:01 +0000 Subject: [PATCH] Removed test cases connected to the LdapCtlFactory stuff in LdapContextSource. --- .../core/support/LdapContextSourceTest.java | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/spring-ldap/src/test/java/org/springframework/ldap/core/support/LdapContextSourceTest.java b/spring-ldap/src/test/java/org/springframework/ldap/core/support/LdapContextSourceTest.java index 84bbd4dd..abce5c51 100644 --- a/spring-ldap/src/test/java/org/springframework/ldap/core/support/LdapContextSourceTest.java +++ b/spring-ldap/src/test/java/org/springframework/ldap/core/support/LdapContextSourceTest.java @@ -20,16 +20,12 @@ import java.util.HashMap; import java.util.Hashtable; import javax.naming.Context; -import javax.naming.ldap.Control; -import javax.naming.ldap.ControlFactory; import junit.framework.TestCase; import org.springframework.ldap.core.AuthenticationSource; import org.springframework.ldap.core.DistinguishedName; -import com.sun.jndi.ldap.ctl.ResponseControlFactory; - /** * Unit tests for the LdapContextSource class. * @@ -268,29 +264,6 @@ public class LdapContextSourceTest extends TestCase { assertEquals("ldap://ldap2.example.com:389/dc=example,dc=se", env.get(Context.PROVIDER_URL)); } - public void testSetResponseControlFactoryToNull() throws Exception { - tested.setResponseControlFactory(null); - assertNotNull(tested.getResponseControlFactory()); - assertEquals(ResponseControlFactory.class, tested.getResponseControlFactory()); - } - - public void testSetValidResponseControlFactory() throws Exception { - Class validClass = ControlFactory.class; - tested.setResponseControlFactory(validClass); - assertEquals(validClass, tested.getResponseControlFactory()); - } - - public void testSetInvalidResponseControlFactory() throws Exception { - try { - Class invalidClass = Control.class; - tested.setResponseControlFactory(invalidClass); - fail("IllegalArgumentException expected"); - } - catch (IllegalArgumentException expected) { - assertTrue(true); - } - } - private class DummyAuthenticationProvider implements AuthenticationSource { private String principal;