directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r474723 - in /directory/branches/apacheds-schema/shared/ldap/src: main/java/org/apache/directory/shared/ldap/message/ test/java/org/apache/directory/shared/ldap/codec/ test/java/org/apache/directory/shared/ldap/codec/add/ test/java/org/apac...
Date Tue, 14 Nov 2006 10:57:50 GMT
Author: elecharny
Date: Tue Nov 14 02:57:49 2006
New Revision: 474723

URL: http://svn.apache.org/viewvc?view=rev&rev=474723
Log:
Fixed some errors in test due to Enum modifications

Modified:
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/ResultCodeEnum.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapResultTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddResponseTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindResponseTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareResponseTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelResponseTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponseTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneTest.java

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/ResultCodeEnum.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/ResultCodeEnum.java?view=diff&rev=474723&r1=474722&r2=474723
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/ResultCodeEnum.java
(original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/ResultCodeEnum.java
Tue Nov 14 02:57:49 2006
@@ -640,24 +640,21 @@
      * of the error should be provided in the error message. Applicable
      * operations: all. Result code type: General
      */
-    OTHER( 80 );
-
+    OTHER( 80 ),
     
+    /**
+     * A unknown result code to cover all the other cases
+     */
     // -- 15 unused --
-
     // -- 22-31 unused --
-
     // -- 35 reserved for undefined isLeaf --
-
     // -- 37-47 unused --
-
     // -- 55-63 unused --
-
     // -- 70 reserved for CLDAP --
-
     // -- 72-79 unused --
-
     // -- 81-90 reserved for APIs --
+    UNKNOWN( 99 );
+    
 
 	private int value;
 	
@@ -1509,39 +1506,17 @@
             case 12 : return UNAVAILABLE_CRITICAL_EXTENSION;
             case 13 : return CONFIDENTIALITY_REQUIRED;
             case 14 : return SASL_BIND_IN_PROGRESS;
-            case 15 : return null;
             case 16 : return NO_SUCH_ATTRIBUTE;
             case 17 : return UNDEFINED_ATTRIBUTE_TYPE;
             case 18 : return INAPPROPRIATE_MATCHING;
             case 19 : return CONSTRAINT_VIOLATION;
             case 20 : return ATTRIBUTE_OR_VALUE_EXISTS;
             case 21 : return INVALID_ATTRIBUTE_SYNTAX;
-            case 22 : return null;
-            case 23 : return null;
-            case 24 : return null;
-            case 25 : return null;
-            case 26 : return null;
-            case 27 : return null;
-            case 28 : return null;
-            case 29 : return null;
-            case 30 : return null;
-            case 31 : return null;
             case 32 : return NO_SUCH_OBJECT;
             case 33 : return ALIAS_PROBLEM;
             case 34 : return INVALID_DN_SYNTAX;
-            case 35 : return null;
+            case 35 : return UNKNOWN;
             case 36 : return ALIAS_DEREFERENCING_PROBLEM;
-            case 37 : return null;
-            case 38 : return null;
-            case 39 : return null;
-            case 40 : return null;
-            case 41 : return null;
-            case 42 : return null;
-            case 43 : return null;
-            case 44 : return null;
-            case 45 : return null;
-            case 46 : return null;
-            case 47 : return null;
             case 48 : return INAPPROPRIATE_AUTHENTICATION; 
             case 49 : return INVALID_CREDENTIALS;
             case 50 : return INSUFFICIENT_ACCESS_RIGHTS;
@@ -1549,43 +1524,15 @@
             case 52 : return UNAVAILABLE;
             case 53 : return UNWILLING_TO_PERFORM;
             case 54 : return LOOP_DETECT;
-            case 55 : return null;
-            case 56 : return null;
-            case 57 : return null;
-            case 58 : return null;
-            case 59 : return null;
-            case 60 : return null;
-            case 61 : return null;
-            case 62 : return null;
-            case 63 : return null;
             case 64 : return NAMING_VIOLATION;
             case 65 : return OBJECT_CLASS_VIOLATION;
             case 66 : return NOT_ALLOWED_ON_NON_LEAF;
             case 67 : return NOT_ALLOWED_ON_RDN;
             case 68 : return ENTRY_ALREADY_EXISTS;
             case 69 : return OBJECT_CLASS_MODS_PROHIBITED;
-            case 70 : return null;
             case 71 : return AFFECTS_MULTIPLE_DSAS;
-            case 72 : return null;
-            case 73 : return null;
-            case 74 : return null;
-            case 75 : return null;
-            case 76 : return null;
-            case 77 : return null;
-            case 78 : return null;
-            case 79 : return null;
             case 80 : return OTHER;
-            case 81 : return null;
-            case 82 : return null;
-            case 83 : return null;
-            case 84 : return null;
-            case 85 : return null;
-            case 86 : return null;
-            case 87 : return null;
-            case 88 : return null;
-            case 89 : return null;
-            case 90 : return null;
-            default : return null;
+            default : return UNKNOWN;
         }
     }
     

Modified: directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapResultTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapResultTest.java?view=diff&rev=474723&r1=474722&r2=474723
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapResultTest.java
(original)
+++ directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapResultTest.java
Tue Nov 14 02:57:49 2006
@@ -309,7 +309,7 @@
         AddResponse addResponse = message.getAddResponse();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 0, addResponse.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.SUCCESS, addResponse.getLdapResult().getResultCode()
);
         assertEquals( "", addResponse.getLdapResult().getMatchedDN() );
         assertEquals( "", addResponse.getLdapResult().getErrorMessage() );
 

Modified: directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddResponseTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddResponseTest.java?view=diff&rev=474723&r1=474722&r2=474723
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddResponseTest.java
(original)
+++ directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddResponseTest.java
Tue Nov 14 02:57:49 2006
@@ -34,6 +34,7 @@
 import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.add.AddResponse;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
 
 import junit.framework.TestCase;
@@ -95,7 +96,7 @@
         AddResponse addResponse = message.getAddResponse();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 0, addResponse.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.SUCCESS, addResponse.getLdapResult().getResultCode()
);
         assertEquals( "", addResponse.getLdapResult().getMatchedDN() );
         assertEquals( "", addResponse.getLdapResult().getErrorMessage() );
 
@@ -211,7 +212,7 @@
         AddResponse addResponse = message.getAddResponse();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 0, addResponse.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.SUCCESS, addResponse.getLdapResult().getResultCode()
);
         assertEquals( "", addResponse.getLdapResult().getMatchedDN() );
         assertEquals( "", addResponse.getLdapResult().getErrorMessage() );
 

Modified: directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindResponseTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindResponseTest.java?view=diff&rev=474723&r1=474722&r2=474723
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindResponseTest.java
(original)
+++ directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindResponseTest.java
Tue Nov 14 02:57:49 2006
@@ -34,6 +34,7 @@
 import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.bind.BindResponse;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
 
 import junit.framework.TestCase;
@@ -96,7 +97,7 @@
         BindResponse br = message.getBindResponse();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 0, br.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.SUCCESS, br.getLdapResult().getResultCode() );
         assertEquals( "", br.getLdapResult().getMatchedDN() );
         assertEquals( "", br.getLdapResult().getErrorMessage() );
 
@@ -178,7 +179,7 @@
         BindResponse br = message.getBindResponse();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 0, br.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.SUCCESS, br.getLdapResult().getResultCode() );
         assertEquals( "", br.getLdapResult().getMatchedDN() );
         assertEquals( "", br.getLdapResult().getErrorMessage() );
 
@@ -265,7 +266,7 @@
         BindResponse br = message.getBindResponse();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 0, br.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.SUCCESS, br.getLdapResult().getResultCode() );
         assertEquals( "", br.getLdapResult().getMatchedDN() );
         assertEquals( "", br.getLdapResult().getErrorMessage() );
         assertEquals( "", StringTools.utf8ToString( br.getServerSaslCreds() ) );
@@ -346,7 +347,7 @@
         BindResponse br = message.getBindResponse();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 0, br.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.SUCCESS, br.getLdapResult().getResultCode() );
         assertEquals( "", br.getLdapResult().getMatchedDN() );
         assertEquals( "", br.getLdapResult().getErrorMessage() );
         assertEquals( "", StringTools.utf8ToString( br.getServerSaslCreds() ) );
@@ -433,7 +434,7 @@
         BindResponse br = message.getBindResponse();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 0, br.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.SUCCESS, br.getLdapResult().getResultCode() );
         assertEquals( "", br.getLdapResult().getMatchedDN() );
         assertEquals( "", br.getLdapResult().getErrorMessage() );
         assertEquals( "AB", StringTools.utf8ToString( br.getServerSaslCreds() ) );

Modified: directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareResponseTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareResponseTest.java?view=diff&rev=474723&r1=474722&r2=474723
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareResponseTest.java
(original)
+++ directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareResponseTest.java
Tue Nov 14 02:57:49 2006
@@ -34,6 +34,7 @@
 import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.compare.CompareResponse;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
 
 import junit.framework.TestCase;
@@ -98,7 +99,7 @@
         CompareResponse compareResponse = message.getCompareResponse();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 0, compareResponse.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.SUCCESS, compareResponse.getLdapResult().getResultCode()
);
         assertEquals( "", compareResponse.getLdapResult().getMatchedDN() );
         assertEquals( "", compareResponse.getLdapResult().getErrorMessage() );
 
@@ -176,7 +177,7 @@
         CompareResponse compareResponse = message.getCompareResponse();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 0, compareResponse.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.SUCCESS, compareResponse.getLdapResult().getResultCode()
);
         assertEquals( "", compareResponse.getLdapResult().getMatchedDN() );
         assertEquals( "", compareResponse.getLdapResult().getErrorMessage() );
 

Modified: directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelResponseTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelResponseTest.java?view=diff&rev=474723&r1=474722&r2=474723
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelResponseTest.java
(original)
+++ directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelResponseTest.java
Tue Nov 14 02:57:49 2006
@@ -34,6 +34,7 @@
 import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.del.DelResponse;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
 
 import junit.framework.TestCase;
@@ -99,7 +100,7 @@
         DelResponse delResponse = message.getDelResponse();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 33, delResponse.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.ALIAS_PROBLEM, delResponse.getLdapResult().getResultCode()
);
         assertEquals( "uid=akarasulu,dc=example,dc=com", delResponse.getLdapResult().getMatchedDN()
);
         assertEquals( "", delResponse.getLdapResult().getErrorMessage() );
 
@@ -220,7 +221,7 @@
         DelResponse delResponse = message.getDelResponse();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 33, delResponse.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.ALIAS_PROBLEM, delResponse.getLdapResult().getResultCode()
);
         assertEquals( "uid=akarasulu,dc=example,dc=com", delResponse.getLdapResult().getMatchedDN()
);
         assertEquals( "", delResponse.getLdapResult().getErrorMessage() );
 

Modified: directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseTest.java?view=diff&rev=474723&r1=474722&r2=474723
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseTest.java
(original)
+++ directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseTest.java
Tue Nov 14 02:57:49 2006
@@ -34,6 +34,7 @@
 import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.extended.ExtendedResponse;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
 
 import junit.framework.TestCase;
@@ -95,7 +96,7 @@
         ExtendedResponse extendedResponse = message.getExtendedResponse();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 0, extendedResponse.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.SUCCESS, extendedResponse.getLdapResult().getResultCode()
);
         assertEquals( "", extendedResponse.getLdapResult().getMatchedDN() );
         assertEquals( "", extendedResponse.getLdapResult().getErrorMessage() );
         assertEquals( "1.3.6.1.5.5.2", extendedResponse.getResponseName() );
@@ -180,7 +181,7 @@
         ExtendedResponse extendedResponse = message.getExtendedResponse();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 0, extendedResponse.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.SUCCESS, extendedResponse.getLdapResult().getResultCode()
);
         assertEquals( "", extendedResponse.getLdapResult().getMatchedDN() );
         assertEquals( "", extendedResponse.getLdapResult().getErrorMessage() );
         assertEquals( "1.3.6.1.5.5.2", extendedResponse.getResponseName() );
@@ -262,7 +263,7 @@
         ExtendedResponse extendedResponse = message.getExtendedResponse();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 0, extendedResponse.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.SUCCESS, extendedResponse.getLdapResult().getResultCode()
);
         assertEquals( "", extendedResponse.getLdapResult().getMatchedDN() );
         assertEquals( "", extendedResponse.getLdapResult().getErrorMessage() );
 
@@ -335,7 +336,7 @@
         ExtendedResponse extendedResponse = message.getExtendedResponse();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 0, extendedResponse.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.SUCCESS, extendedResponse.getLdapResult().getResultCode()
);
         assertEquals( "", extendedResponse.getLdapResult().getMatchedDN() );
         assertEquals( "", extendedResponse.getLdapResult().getErrorMessage() );
 
@@ -535,7 +536,7 @@
         ExtendedResponse extendedResponse = message.getExtendedResponse();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 0, extendedResponse.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.SUCCESS, extendedResponse.getLdapResult().getResultCode()
);
         assertEquals( "", extendedResponse.getLdapResult().getMatchedDN() );
         assertEquals( "", extendedResponse.getLdapResult().getErrorMessage() );
         assertEquals( "1.3.6.1.5.5.2", extendedResponse.getResponseName() );
@@ -611,7 +612,7 @@
         ExtendedResponse extendedResponse = message.getExtendedResponse();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 0, extendedResponse.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.SUCCESS, extendedResponse.getLdapResult().getResultCode()
);
         assertEquals( "", extendedResponse.getLdapResult().getMatchedDN() );
         assertEquals( "", extendedResponse.getLdapResult().getErrorMessage() );
         assertEquals( "1.3.6.1.5.5.2", extendedResponse.getResponseName() );
@@ -694,7 +695,7 @@
         ExtendedResponse extendedResponse = message.getExtendedResponse();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 0, extendedResponse.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.SUCCESS, extendedResponse.getLdapResult().getResultCode()
);
         assertEquals( "", extendedResponse.getLdapResult().getMatchedDN() );
         assertEquals( "", extendedResponse.getLdapResult().getErrorMessage() );
         assertEquals( "1.3.6.1.5.5.2", extendedResponse.getResponseName() );
@@ -771,7 +772,7 @@
         ExtendedResponse extendedResponse = message.getExtendedResponse();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 0, extendedResponse.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.SUCCESS, extendedResponse.getLdapResult().getResultCode()
);
         assertEquals( "", extendedResponse.getLdapResult().getMatchedDN() );
         assertEquals( "", extendedResponse.getLdapResult().getErrorMessage() );
         assertEquals( "1.3.6.1.5.5.2", extendedResponse.getResponseName() );

Modified: directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponseTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponseTest.java?view=diff&rev=474723&r1=474722&r2=474723
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponseTest.java
(original)
+++ directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponseTest.java
Tue Nov 14 02:57:49 2006
@@ -34,6 +34,7 @@
 import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.modify.ModifyResponse;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
 
 import junit.framework.TestCase;
@@ -97,7 +98,7 @@
         ModifyResponse modifyResponse = message.getModifyResponse();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 0, modifyResponse.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.SUCCESS, modifyResponse.getLdapResult().getResultCode()
);
         assertEquals( "", modifyResponse.getLdapResult().getMatchedDN() );
         assertEquals( "", modifyResponse.getLdapResult().getErrorMessage() );
 
@@ -174,7 +175,7 @@
         ModifyResponse modifyResponse = message.getModifyResponse();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 0, modifyResponse.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.SUCCESS, modifyResponse.getLdapResult().getResultCode()
);
         assertEquals( "", modifyResponse.getLdapResult().getMatchedDN() );
         assertEquals( "", modifyResponse.getLdapResult().getErrorMessage() );
 

Modified: directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseTest.java?view=diff&rev=474723&r1=474722&r2=474723
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseTest.java
(original)
+++ directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseTest.java
Tue Nov 14 02:57:49 2006
@@ -34,6 +34,7 @@
 import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNResponse;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
 
 import junit.framework.TestCase;
@@ -98,7 +99,7 @@
         ModifyDNResponse modifyDNResponse = message.getModifyDNResponse();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 0, modifyDNResponse.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.SUCCESS, modifyDNResponse.getLdapResult().getResultCode()
);
         assertEquals( "", modifyDNResponse.getLdapResult().getMatchedDN() );
         assertEquals( "", modifyDNResponse.getLdapResult().getErrorMessage() );
 
@@ -176,7 +177,7 @@
         ModifyDNResponse modifyDNResponse = message.getModifyDNResponse();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 0, modifyDNResponse.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.SUCCESS, modifyDNResponse.getLdapResult().getResultCode()
);
         assertEquals( "", modifyDNResponse.getLdapResult().getMatchedDN() );
         assertEquals( "", modifyDNResponse.getLdapResult().getErrorMessage() );
 

Modified: directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneTest.java?view=diff&rev=474723&r1=474722&r2=474723
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneTest.java
(original)
+++ directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneTest.java
Tue Nov 14 02:57:49 2006
@@ -34,6 +34,7 @@
 import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.search.SearchResultDone;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
 
 import junit.framework.TestCase;
@@ -96,7 +97,7 @@
         SearchResultDone searchResultDone = message.getSearchResultDone();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 0, searchResultDone.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.SUCCESS, searchResultDone.getLdapResult().getResultCode()
);
         assertEquals( "", searchResultDone.getLdapResult().getMatchedDN() );
         assertEquals( "", searchResultDone.getLdapResult().getErrorMessage() );
 
@@ -173,7 +174,7 @@
         SearchResultDone searchResultDone = message.getSearchResultDone();
 
         assertEquals( 1, message.getMessageId() );
-        assertEquals( 0, searchResultDone.getLdapResult().getResultCode() );
+        assertEquals( ResultCodeEnum.SUCCESS, searchResultDone.getLdapResult().getResultCode()
);
         assertEquals( "", searchResultDone.getLdapResult().getMatchedDN() );
         assertEquals( "", searchResultDone.getLdapResult().getErrorMessage() );
 



Mime
View raw message