directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ersi...@apache.org
Subject svn commit: r414829 - /directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/StoredProcedureTest.java
Date Fri, 16 Jun 2006 13:51:47 GMT
Author: ersiner
Date: Fri Jun 16 06:51:47 2006
New Revision: 414829

URL: http://svn.apache.org/viewvc?rev=414829&view=rev
Log:
Added new test for calling SP with parameters.

Modified:
    directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/StoredProcedureTest.java

Modified: directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/StoredProcedureTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/StoredProcedureTest.java?rev=414829&r1=414828&r2=414829&view=diff
==============================================================================
--- directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/StoredProcedureTest.java
(original)
+++ directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/StoredProcedureTest.java
Fri Jun 16 06:51:47 2006
@@ -29,6 +29,7 @@
 
 import java.io.File;
 import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
 import java.net.URL;
 import java.util.HashSet;
 import java.util.Hashtable;
@@ -89,10 +90,7 @@
         ctx.close();
         ctx = null;
     }
-
-
-    /**
-     */
+    
     public void testExecuteProcedure() throws NamingException
     {
         String language = "java";
@@ -101,4 +99,15 @@
         StoredProcedureResponse resp = ( StoredProcedureResponse ) ctx.extendedOperation(
req );
         assertNotNull( resp );
     }
+
+    public void testExecuteProcedureWithParameters() throws NamingException, UnsupportedEncodingException
+    {
+        String language = "java";
+        String procedure = "org.apache.directory.server.HelloWorldProcedure.sayHelloTo";
+        StoredProcedureRequest req = new StoredProcedureRequest( 0, procedure, language );
+        req.addParameter( "java.lang.String".getBytes( "UTF-8" ), "Ersin".getBytes( "UTF-8"
) );
+        StoredProcedureResponse resp = ( StoredProcedureResponse ) ctx.extendedOperation(
req );
+        assertNotNull( resp );
+    }
+    
 }



Mime
View raw message