You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by jm...@apache.org on 2003/12/13 04:04:07 UTC

svn commit: rev 1406 - incubator/directory/ldap/trunk/clients/src/java/org/apache/ldap/clients/ldaptest

Author: jmachols
Date: Fri Dec 12 19:04:06 2003
New Revision: 1406

Added:
   incubator/directory/ldap/trunk/clients/src/java/org/apache/ldap/clients/ldaptest/LdapTestCase.java
Modified:
   incubator/directory/ldap/trunk/clients/src/java/org/apache/ldap/clients/ldaptest/TestConfiguration.java
Log:
Added the shell for the TestCase class and created the list of test casesin the configuration manager

Added: incubator/directory/ldap/trunk/clients/src/java/org/apache/ldap/clients/ldaptest/LdapTestCase.java
==============================================================================
--- (empty file)
+++ incubator/directory/ldap/trunk/clients/src/java/org/apache/ldap/clients/ldaptest/LdapTestCase.java	Fri Dec 12 19:04:06 2003
@@ -0,0 +1,126 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ *    nor may "Apache" appear in their name, without prior written
+ *    permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ * Portions of this software are based upon public domain software
+ * originally written at the National Center for Supercomputing Applications,
+ * University of Illinois, Urbana-Champaign.
+ */
+
+package org.apache.ldap.clients.ldaptest;
+
+
+/**
+ * Interface into the LDAP TEST case.  This will define a test case, which
+ * is the ldap operation and the parameters that go along with it.  These
+ * cases will be paired up with session for test runs.
+ *
+ * @author <a href="mailto:jmachols@apache.org">Jeff Machols</a>
+ * @author $Author: jmachols $
+ * @version $Revision: 1349 $
+ */
+public class LdapTestCase
+{
+    /**
+     * Ldap Operation to run, can be bind, add, modify, delete, 
+     * modifydn or search
+     * 
+     * @TODO  This just be setup as an enumeration, not a string
+     */
+    private String m_operation ;
+    
+    /**
+     * The command line aruguments to send with the operation
+     */
+    private String m_args ;
+        
+    /**
+     * Get the command line arguments for the operation
+     * @return arguments, just as they would appear from a command line
+     */
+    public String getArgs()
+    {
+        return m_args;
+    }
+
+    /**
+     * Get the LDAP Operation to perform.  can be bind, add, modify, delete, 
+     * modifydn or search
+     * 
+     * @return LDAP Operation to perform
+     */
+    public String getOperation()
+    {
+        return m_operation;
+    }
+
+    /**
+     * Set the command line arguments for the operation
+     * @param a_string arguments, just as they would appear from a command line
+     */
+    public void setArgs(String a_string)
+    {
+        m_args = a_string;
+    }
+
+    /**
+     * Set the LDAP Operation to perform.  can be bind, add, modify, delete, 
+     * modifydn or search
+     * 
+     * @param a_string LDAP Operation to perform
+     */
+    public void setOperation(String a_string)
+    {
+        m_operation = a_string;
+    }
+
+}

Modified: incubator/directory/ldap/trunk/clients/src/java/org/apache/ldap/clients/ldaptest/TestConfiguration.java
==============================================================================
--- incubator/directory/ldap/trunk/clients/src/java/org/apache/ldap/clients/ldaptest/TestConfiguration.java	(original)
+++ incubator/directory/ldap/trunk/clients/src/java/org/apache/ldap/clients/ldaptest/TestConfiguration.java	Fri Dec 12 19:04:06 2003
@@ -80,8 +80,7 @@
 public class TestConfiguration
 {
 
-    private LinkedList m_sessions ;
-    
+    private LinkedList m_sessions ;  
     private LinkedList m_testCases ;
     
     public TestConfiguration()
@@ -182,4 +181,28 @@
     }
     
     
+    public int getTestCaseCount()
+    {
+        return m_testCases.size() ;
+    }
+    
+    public LdapTestCase getTestCase( int a_index )
+    {
+        return ( LdapTestCase) m_testCases.get( a_index ) ;
+    }
+    
+    public void addTestCase( LdapTestCase a_session )
+    {
+        m_testCases.add( a_session ) ;
+    }
+    
+    public void addTestCase( int a_index , LdapTestCase a_session )
+    {
+        m_testCases.add( a_index, a_session ) ;
+    }
+    
+    public void removeTestCase ( int a_index )
+    {
+        m_testCases.remove( a_index ) ;
+    }
 }

RE: svn commit: rev 1406 - incubator/directory/ldap/trunk/clients/src/java/org/apache/ldap/clients/ldaptest

Posted by Jeff Machols <jm...@comcast.net>.
> > + *
> > + * Portions of this software are based upon public domain software
> > + * originally written at the National Center for Supercomputing
> Applications,
> > + * University of Illinois, Urbana-Champaign.
> > + */
> 
> What exactly does the paragraph above mean?  Are we sure that no one else
> (e.g. Netscape/Sun) holds copyright on LDAPTest?  Did we get this code
> directly from NCSA?
> 
> Phil
> 

Good catch Phil, that paragraph should not be there.  It must have been
tacked on to the license file when did the conversion.  I will find out
which files are affected.  




Re: svn commit: rev 1406 - incubator/directory/ldap/trunk/clients/src/java/org/apache/ldap/clients/ldaptest

Posted by Phil Steitz <ph...@steitz.com>.
jmachols@apache.org wrote:
> Author: jmachols
> Date: Fri Dec 12 19:04:06 2003
> New Revision: 1406
> 
> Added:
>    incubator/directory/ldap/trunk/clients/src/java/org/apache/ldap/clients/ldaptest/LdapTestCase.java
> Modified:
>    incubator/directory/ldap/trunk/clients/src/java/org/apache/ldap/clients/ldaptest/TestConfiguration.java
> Log:
> Added the shell for the TestCase class and created the list of test casesin the configuration manager
> 
> Added: incubator/directory/ldap/trunk/clients/src/java/org/apache/ldap/clients/ldaptest/LdapTestCase.java
> ==============================================================================
> --- (empty file)
> +++ incubator/directory/ldap/trunk/clients/src/java/org/apache/ldap/clients/ldaptest/LdapTestCase.java	Fri Dec 12 19:04:06 2003
> @@ -0,0 +1,126 @@
> +/* ====================================================================
> + * The Apache Software License, Version 1.1
> + *
> + * Copyright (c) 2000 The Apache Software Foundation.  All rights
> + * reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + *
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + *
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in
> + *    the documentation and/or other materials provided with the
> + *    distribution.
> + *
> + * 3. The end-user documentation included with the redistribution,
> + *    if any, must include the following acknowledgment:
> + *       "This product includes software developed by the
> + *        Apache Software Foundation (http://www.apache.org/)."
> + *    Alternately, this acknowledgment may appear in the software itself,
> + *    if and wherever such third-party acknowledgments normally appear.
> + *
> + * 4. The names "Apache" and "Apache Software Foundation" must
> + *    not be used to endorse or promote products derived from this
> + *    software without prior written permission. For written
> + *    permission, please contact apache@apache.org.
> + *
> + * 5. Products derived from this software may not be called "Apache",
> + *    nor may "Apache" appear in their name, without prior written
> + *    permission of the Apache Software Foundation.
> + *
> + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
> + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
> + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
> + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
> + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
> + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
> + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
> + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
> + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
> + * SUCH DAMAGE.
> + * ====================================================================
> + *
> + * This software consists of voluntary contributions made by many
> + * individuals on behalf of the Apache Software Foundation.  For more
> + * information on the Apache Software Foundation, please see
> + * <http://www.apache.org/>.
> + *
> + * Portions of this software are based upon public domain software
> + * originally written at the National Center for Supercomputing Applications,
> + * University of Illinois, Urbana-Champaign.
> + */

What exactly does the paragraph above mean?  Are we sure that no one else 
(e.g. Netscape/Sun) holds copyright on LDAPTest?  Did we get this code 
directly from NCSA?

Phil