directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 36789 - incubator/directory/ldap/trunk/common/src/test/org/apache/ldap/common/message
Date Mon, 23 Aug 2004 21:46:06 GMT
Author: akarasulu
Date: Mon Aug 23 14:46:05 2004
New Revision: 36789

Modified:
   incubator/directory/ldap/trunk/common/src/test/org/apache/ldap/common/message/BindRequestImplTest.java
   incubator/directory/ldap/trunk/common/src/test/org/apache/ldap/common/message/SearchResponseDoneImplTest.java
Log:
Fixed a couple of bugs in tests causing NPE.


Modified: incubator/directory/ldap/trunk/common/src/test/org/apache/ldap/common/message/BindRequestImplTest.java
==============================================================================
--- incubator/directory/ldap/trunk/common/src/test/org/apache/ldap/common/message/BindRequestImplTest.java
(original)
+++ incubator/directory/ldap/trunk/common/src/test/org/apache/ldap/common/message/BindRequestImplTest.java
Mon Aug 23 14:46:05 2004
@@ -20,6 +20,7 @@
 import junit.framework.TestCase;
 
 import java.util.Collection;
+import java.util.Collections;
 
 import org.apache.ldap.common.Lockable;
 import org.apache.ldap.common.LockException;
@@ -224,7 +225,7 @@
 
             public MessageTypeEnum getResponseType()
             {
-                return null;
+                return MessageTypeEnum.BINDREQUEST;
             }
 
             public boolean hasResponse()
@@ -239,11 +240,11 @@
 
             public Collection getControls()
             {
-                return null;
+                return Collections.EMPTY_LIST;
             }
 
             public void add( Control a_control ) throws MessageException
-            {
+            {                                
             }
 
             public void remove( Control a_control ) throws MessageException

Modified: incubator/directory/ldap/trunk/common/src/test/org/apache/ldap/common/message/SearchResponseDoneImplTest.java
==============================================================================
--- incubator/directory/ldap/trunk/common/src/test/org/apache/ldap/common/message/SearchResponseDoneImplTest.java
(original)
+++ incubator/directory/ldap/trunk/common/src/test/org/apache/ldap/common/message/SearchResponseDoneImplTest.java
Mon Aug 23 14:46:05 2004
@@ -20,6 +20,7 @@
 import junit.framework.TestCase;
 
 import java.util.Collection;
+import java.util.Collections;
 
 import org.apache.ldap.common.Lockable;
 import org.apache.ldap.common.LockException;
@@ -105,12 +106,12 @@
 
             public MessageTypeEnum getType()
             {
-                return null;
+                return MessageTypeEnum.SEARCHRESDONE;
             }
 
             public Collection getControls()
             {
-                return null;
+                return Collections.EMPTY_LIST;
             }
 
             public void add( Control a_control ) throws MessageException

Mime
View raw message