directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1073175 - in /directory/shared/branches/akarasulu/ldap-extras/codec/src: main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/ test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/
Date Mon, 21 Feb 2011 22:19:36 GMT
Author: akarasulu
Date: Mon Feb 21 22:19:36 2011
New Revision: 1073175

URL: http://svn.apache.org/viewvc?rev=1073175&view=rev
Log:
DIRSHARED-86: stored procedure ext. op code compiling

Modified:
    directory/shared/branches/akarasulu/ldap-extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/CertGenerationRequestDecorator.java
    directory/shared/branches/akarasulu/ldap-extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/CertGenerationRequestTest.java

Modified: directory/shared/branches/akarasulu/ldap-extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/CertGenerationRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/CertGenerationRequestDecorator.java?rev=1073175&r1=1073174&r2=1073175&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/CertGenerationRequestDecorator.java
(original)
+++ directory/shared/branches/akarasulu/ldap-extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/CertGenerationRequestDecorator.java
Mon Feb 21 22:19:36 2011
@@ -57,7 +57,7 @@ public class CertGenerationRequestDecora
     {
         return certGenObj;
     }
-    
+
     
     /**
      * {@inheritDoc}

Modified: directory/shared/branches/akarasulu/ldap-extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/CertGenerationRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/CertGenerationRequestTest.java?rev=1073175&r1=1073174&r2=1073175&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/CertGenerationRequestTest.java
(original)
+++ directory/shared/branches/akarasulu/ldap-extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/CertGenerationRequestTest.java
Mon Feb 21 22:19:36 2011
@@ -29,8 +29,9 @@ import java.nio.ByteBuffer;
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
 import org.apache.directory.shared.asn1.EncoderException;
+import org.apache.directory.shared.ldap.codec.api.LdapCodecServiceFactory;
+import org.apache.directory.shared.ldap.extras.extended.CertGenerationRequestImpl;
 import org.apache.directory.shared.ldap.extras.extended.ads_impl.CertGenerationContainer;
-import org.apache.directory.shared.ldap.extras.extended.ads_impl.CertGenerationObject;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -105,18 +106,20 @@ public class CertGenerationRequestTest
             fail( e.getMessage() );
         }
 
-        CertGenerationObject certGenObj = container.getCertGenerationObject();
-        assertEquals( dn, certGenObj.getTargetDN() );
-        assertEquals( dn, certGenObj.getIssuerDN() );
-        assertEquals( dn, certGenObj.getSubjectDN() );
-        assertEquals( keyAlgo, certGenObj.getKeyAlgorithm() );
+        CertGenerationRequestDecorator req = new CertGenerationRequestDecorator( 
+            LdapCodecServiceFactory.getSingleton(), new CertGenerationRequestImpl() );
+        req = container.getCertGenerationObject();
+        assertEquals( dn, req.getTargetDN() );
+        assertEquals( dn, req.getIssuerDN() );
+        assertEquals( dn, req.getSubjectDN() );
+        assertEquals( keyAlgo, req.getKeyAlgorithm() );
 
-        assertEquals( bufLen, certGenObj.computeLength() );
+        assertEquals( bufLen, req.computeLength() );
 
         try
         {
-            ByteBuffer encodedBuf = certGenObj.encode();
-            String encodedPdu = Strings.dumpBytes(encodedBuf.array());
+            ByteBuffer encodedBuf = req.getCertGenerationObject().encode();
+            String encodedPdu = Strings.dumpBytes( encodedBuf.array() );
 
             assertEquals( decodedPdu, encodedPdu );
         }



Mime
View raw message