directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r806829 - /directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValueTest.java
Date Sat, 22 Aug 2009 10:00:35 GMT
Author: elecharny
Date: Sat Aug 22 10:00:35 2009
New Revision: 806829

URL: http://svn.apache.org/viewvc?rev=806829&view=rev
Log:
Fixed the Normalizer by passing a faked OID for the tests

Modified:
    directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValueTest.java

Modified: directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValueTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValueTest.java?rev=806829&r1=806828&r2=806829&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValueTest.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValueTest.java
Sat Aug 22 10:00:35 2009
@@ -33,7 +33,6 @@
 import java.util.Arrays;
 
 import javax.naming.NamingException;
-import javax.naming.directory.InvalidAttributeValueException;
 
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.schema.Normalizer;
@@ -55,7 +54,7 @@
     private static final byte[] INVALID_BYTES = new byte[]{0x01, 0x02, 0x03, 0x04, 0x05};
     private static final byte[] BYTES_MOD = new byte[]{0x11, 0x02, 0x03, 0x04};
     
-    private static final Normalizer BINARY_NORMALIZER = new Normalizer()
+    private static final Normalizer BINARY_NORMALIZER = new Normalizer( "1.1.1" )
     {
         private static final long serialVersionUID = 1L;
         
@@ -89,7 +88,7 @@
     /**
      * A binary normalizer which set the normalized value to a empty byte array
      */
-    private static final Normalizer BINARY_NORMALIZER_EMPTY = new Normalizer()
+    private static final Normalizer BINARY_NORMALIZER_EMPTY = new Normalizer( "1.1.1" )
     {
         private static final long serialVersionUID = 1L;
         
@@ -110,12 +109,8 @@
     };
 
     
-    private static final SyntaxChecker BINARY_CHECKER = new SyntaxChecker()
+    private static final SyntaxChecker BINARY_CHECKER = new SyntaxChecker( "1.1.1" )
     {
-        public String getSyntaxOid()
-        {
-            return "1.1.1";
-        }
         public boolean isValidSyntax( Object value )
         {
             if ( value == null )
@@ -125,14 +120,6 @@
             
             return ((byte[])value).length < 5 ;
         }
-
-        public void assertSyntax( Object value ) throws NamingException
-        {
-            if ( ! isValidSyntax( value ) )
-            {
-                throw new InvalidAttributeValueException();
-            }
-        }
     };
     
     



Mime
View raw message