directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r426483 [5/5] - in /directory/trunks/apacheds/server-tools/src: main/java/org/apache/directory/server/tools/ main/java/org/apache/directory/server/tools/commands/ main/java/org/apache/directory/server/tools/commands/diagnosticcmd/ main/java...
Date Fri, 28 Jul 2006 11:50:43 GMT
Added: directory/trunks/apacheds/server-tools/src/test/java/org/apache/directory/server/tools/commands/importcmd/ImportCommandTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/server-tools/src/test/java/org/apache/directory/server/tools/commands/importcmd/ImportCommandTest.java?rev=426483&view=auto
==============================================================================
--- directory/trunks/apacheds/server-tools/src/test/java/org/apache/directory/server/tools/commands/importcmd/ImportCommandTest.java (added)
+++ directory/trunks/apacheds/server-tools/src/test/java/org/apache/directory/server/tools/commands/importcmd/ImportCommandTest.java Fri Jul 28 04:50:40 2006
@@ -0,0 +1,960 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.directory.server.tools.commands.importcmd;
+
+
+import java.io.File;
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.net.URISyntaxException;
+
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
+
+import org.apache.directory.server.tools.ToolCommandListener;
+import org.apache.directory.server.tools.commands.AbstractTestCase;
+import org.apache.directory.server.tools.commands.importcmd.ImportCommandExecutor;
+import org.apache.directory.server.tools.util.ListenerParameter;
+import org.apache.directory.server.tools.util.Parameter;
+
+
+/**
+ * Test Class for the Import Command Executor
+ */
+public class ImportCommandTest extends AbstractTestCase
+{
+    private boolean error;
+    private boolean added;
+    private boolean exception;
+
+
+    /**
+     * Tests the import with a valid LDIF file containing one entry
+     */
+    public void testOneEntryImport()
+    {
+        // Checking if server had been launched
+        if ( !bindSuccessful )
+        {
+            // The server hasn't been lauched, so we don't execute the test and return 
+            // a successful test, so Maven can is Ok when executing tests.
+            assertTrue( true );
+        }
+        else
+        {
+            try
+            {
+                // Getting the import file
+                File importFile = new File( ( ImportCommandTest.class.getResource( "import_1_entry.ldif" ) ).toURI() );
+
+                // Preparing the call to the Import Command
+                ImportCommandExecutor importCommandExecutor = new ImportCommandExecutor();
+                Parameter hostParam = new Parameter( ImportCommandExecutor.HOST_PARAMETER, host );
+                Parameter portParam = new Parameter( ImportCommandExecutor.PORT_PARAMETER, new Integer( port ) );
+                Parameter userParam = new Parameter( ImportCommandExecutor.USER_PARAMETER, user );
+                Parameter passwordParam = new Parameter( ImportCommandExecutor.PASSWORD_PARAMETER, password );
+                Parameter authParam = new Parameter( ImportCommandExecutor.AUTH_PARAMETER, "simple" );
+                Parameter fileParam = new Parameter( ImportCommandExecutor.FILE_PARAMETER, importFile );
+                Parameter ignoreErrorsParam = new Parameter( ImportCommandExecutor.IGNOREERRORS_PARAMETER, new Boolean(
+                    true ) );
+                Parameter debugParam = new Parameter( ImportCommandExecutor.DEBUG_PARAMETER, new Boolean( false ) );
+                Parameter verboseParam = new Parameter( ImportCommandExecutor.VERBOSE_PARAMETER, new Boolean( false ) );
+                Parameter quietParam = new Parameter( ImportCommandExecutor.QUIET_PARAMETER, new Boolean( false ) );
+
+                // Calling the import command
+                importCommandExecutor.execute( new Parameter[]
+                    { hostParam, portParam, userParam, passwordParam, authParam, fileParam, ignoreErrorsParam,
+                        debugParam, verboseParam, quietParam }, new ListenerParameter[0] );
+
+            }
+            catch ( URISyntaxException e )
+            {
+                fail();
+            }
+
+            // Testing if the import is successful
+            SearchControls ctls = new SearchControls();
+            ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
+            try
+            {
+                NamingEnumeration entries = ctx.search( "o=neworganization,dc=example,dc=com", "(objectClass=*)", ctls );
+
+                if ( entries.hasMore() )
+                {
+                    SearchResult sr = ( SearchResult ) entries.nextElement();
+
+                    assertEquals( "o=neworganization,dc=example,dc=com", sr.getNameInNamespace() );
+
+                    Attributes attributes = sr.getAttributes();
+
+                    Attribute attr = attributes.get( "objectclass" );
+                    assertTrue( attr.contains( "top" ) );
+                    assertTrue( attr.contains( "organization" ) );
+
+                    attr = attributes.get( "o" );
+                    assertTrue( attr.contains( "neworganization" ) );
+                }
+                else
+                {
+                    fail();
+                }
+            }
+            catch ( NamingException e )
+            {
+                fail();
+            }
+        }
+    }
+
+
+    /**
+     * Tests the import with a valid LDIF file containing ten entries
+     */
+    public void testTenEntriesImport()
+    {
+        // Checking if server had been launched
+        if ( !bindSuccessful )
+        {
+            // The server hasn't been lauched, so we don't execute the test and return 
+            // a successful test, so Maven can is Ok when executing tests.
+            assertTrue( true );
+        }
+        else
+        {
+            try
+            {
+                // Getting the import file
+                File importFile = new File( ( ImportCommandTest.class.getResource( "import_10_entries.ldif" ) ).toURI() );
+
+                // Preparing the call to the Import Command
+                ImportCommandExecutor importCommandExecutor = new ImportCommandExecutor();
+                Parameter hostParam = new Parameter( ImportCommandExecutor.HOST_PARAMETER, host );
+                Parameter portParam = new Parameter( ImportCommandExecutor.PORT_PARAMETER, new Integer( port ) );
+                Parameter userParam = new Parameter( ImportCommandExecutor.USER_PARAMETER, user );
+                Parameter passwordParam = new Parameter( ImportCommandExecutor.PASSWORD_PARAMETER, password );
+                Parameter authParam = new Parameter( ImportCommandExecutor.AUTH_PARAMETER, "simple" );
+                Parameter fileParam = new Parameter( ImportCommandExecutor.FILE_PARAMETER, importFile );
+                Parameter ignoreErrorsParam = new Parameter( ImportCommandExecutor.IGNOREERRORS_PARAMETER, new Boolean(
+                    true ) );
+                Parameter debugParam = new Parameter( ImportCommandExecutor.DEBUG_PARAMETER, new Boolean( false ) );
+                Parameter verboseParam = new Parameter( ImportCommandExecutor.VERBOSE_PARAMETER, new Boolean( false ) );
+                Parameter quietParam = new Parameter( ImportCommandExecutor.QUIET_PARAMETER, new Boolean( false ) );
+
+                // Calling the import command
+                importCommandExecutor.execute( new Parameter[]
+                    { hostParam, portParam, userParam, passwordParam, authParam, fileParam, ignoreErrorsParam,
+                        debugParam, verboseParam, quietParam }, new ListenerParameter[0] );
+
+            }
+            catch ( URISyntaxException e )
+            {
+                fail();
+            }
+
+            // Testing if the import is successful
+            SearchControls ctls = new SearchControls();
+            ctls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
+            try
+            {
+                NamingEnumeration entries = ctx.search( "o=neworganization,dc=example,dc=com", "(objectClass=*)", ctls );
+
+                int counter = 0;
+                while ( entries.hasMore() )
+                {
+                    counter++;
+                    entries.next();
+                }
+
+                // Testing the number of entries added
+                assertEquals( 9, counter );
+            }
+            catch ( NamingException e )
+            {
+                fail();
+            }
+        }
+    }
+
+
+    /**
+     * Tests the import with a file containing one entry on error.
+     */
+    public void testOneEntryOnErrorImport()
+    {
+        // Checking if server had been launched
+        if ( !bindSuccessful )
+        {
+            // The server hasn't been lauched, so we don't execute the test and return 
+            // a successful test, so Maven can is Ok when executing tests.
+            assertTrue( true );
+        }
+        else
+        {
+            error = false;
+            try
+            {
+                // Getting the import file
+                File importFile = new File( ( ImportCommandTest.class.getResource( "import_1_entry_on_error.ldif" ) )
+                    .toURI() );
+
+                // Preparing the call to the Import Command
+                ImportCommandExecutor importCommandExecutor = new ImportCommandExecutor();
+                Parameter hostParam = new Parameter( ImportCommandExecutor.HOST_PARAMETER, host );
+                Parameter portParam = new Parameter( ImportCommandExecutor.PORT_PARAMETER, new Integer( port ) );
+                Parameter userParam = new Parameter( ImportCommandExecutor.USER_PARAMETER, user );
+                Parameter passwordParam = new Parameter( ImportCommandExecutor.PASSWORD_PARAMETER, password );
+                Parameter authParam = new Parameter( ImportCommandExecutor.AUTH_PARAMETER, "simple" );
+                Parameter fileParam = new Parameter( ImportCommandExecutor.FILE_PARAMETER, importFile );
+                Parameter ignoreErrorsParam = new Parameter( ImportCommandExecutor.IGNOREERRORS_PARAMETER, new Boolean(
+                    true ) );
+                Parameter debugParam = new Parameter( ImportCommandExecutor.DEBUG_PARAMETER, new Boolean( false ) );
+                Parameter verboseParam = new Parameter( ImportCommandExecutor.VERBOSE_PARAMETER, new Boolean( false ) );
+                Parameter quietParam = new Parameter( ImportCommandExecutor.QUIET_PARAMETER, new Boolean( false ) );
+
+                ToolCommandListener errorListener = new ToolCommandListener()
+                {
+                    public void notify( Serializable o )
+                    {
+                        error = true;
+                    }
+                };
+                ListenerParameter errorListenerParam = new ListenerParameter(
+                    ImportCommandExecutor.ERRORLISTENER_PARAMETER, errorListener );
+
+                // Calling the import command
+                importCommandExecutor.execute( new Parameter[]
+                    { hostParam, portParam, userParam, passwordParam, authParam, fileParam, ignoreErrorsParam,
+                        debugParam, verboseParam, quietParam }, new ListenerParameter[]
+                    { errorListenerParam } );
+
+            }
+            catch ( URISyntaxException e )
+            {
+                fail();
+            }
+
+            // Testing if the error notification has been raised.
+            if ( error )
+            {
+                assertTrue( true );
+            }
+            else
+            {
+                fail();
+            }
+        }
+    }
+
+
+    /**
+     * Tests the import with a file containing two entries, one on error and one that is Ok.
+     * As we use the ignore-errors parameter, the command should have fired the error flag and
+     * imported the Ok entry.
+     */
+    public void testTwoEntriesImportOneOnErrorAndOneOk()
+    {
+        // Checking if server had been launched
+        if ( !bindSuccessful )
+        {
+            // The server hasn't been lauched, so we don't execute the test and return 
+            // a successful test, so Maven can is Ok when executing tests.
+            assertTrue( true );
+        }
+        else
+        {
+            error = false;
+            try
+            {
+                // Getting the import file
+                File importFile = new File( ( ImportCommandTest.class
+                    .getResource( "import_2_entries_error_and_ok.ldif" ) ).toURI() );
+
+                // Preparing the call to the Import Command
+                ImportCommandExecutor importCommandExecutor = new ImportCommandExecutor();
+                Parameter hostParam = new Parameter( ImportCommandExecutor.HOST_PARAMETER, host );
+                Parameter portParam = new Parameter( ImportCommandExecutor.PORT_PARAMETER, new Integer( port ) );
+                Parameter userParam = new Parameter( ImportCommandExecutor.USER_PARAMETER, user );
+                Parameter passwordParam = new Parameter( ImportCommandExecutor.PASSWORD_PARAMETER, password );
+                Parameter authParam = new Parameter( ImportCommandExecutor.AUTH_PARAMETER, "simple" );
+                Parameter fileParam = new Parameter( ImportCommandExecutor.FILE_PARAMETER, importFile );
+                Parameter ignoreErrorsParam = new Parameter( ImportCommandExecutor.IGNOREERRORS_PARAMETER, new Boolean(
+                    true ) );
+                Parameter debugParam = new Parameter( ImportCommandExecutor.DEBUG_PARAMETER, new Boolean( false ) );
+                Parameter verboseParam = new Parameter( ImportCommandExecutor.VERBOSE_PARAMETER, new Boolean( false ) );
+                Parameter quietParam = new Parameter( ImportCommandExecutor.QUIET_PARAMETER, new Boolean( false ) );
+
+                ToolCommandListener errorListener = new ToolCommandListener()
+                {
+                    public void notify( Serializable o )
+                    {
+                        // Should be fired by the add of the first entry
+                        error = true;
+                    }
+                };
+                ListenerParameter errorListenerParam = new ListenerParameter(
+                    ImportCommandExecutor.ERRORLISTENER_PARAMETER, errorListener );
+
+                // Calling the import command
+                importCommandExecutor.execute( new Parameter[]
+                    { hostParam, portParam, userParam, passwordParam, authParam, fileParam, ignoreErrorsParam,
+                        debugParam, verboseParam, quietParam }, new ListenerParameter[]
+                    { errorListenerParam } );
+
+            }
+            catch ( URISyntaxException e )
+            {
+                fail();
+            }
+
+            // Testing if the error notification has been raised.
+            if ( error )
+            {
+                // Testing if the import is successful
+                SearchControls ctls = new SearchControls();
+                ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
+                try
+                {
+                    NamingEnumeration entries = ctx.search( "cn=newperson2,o=neworganization,dc=example,dc=com",
+                        "(objectClass=*)", ctls );
+
+                    if ( entries.hasMore() )
+                    {
+                        SearchResult sr = ( SearchResult ) entries.nextElement();
+
+                        // Even if the first was on error, the second error should have been added
+                        assertEquals( "cn=newperson2,o=neworganization,dc=example,dc=com", sr.getNameInNamespace() );
+
+                        Attributes attributes = sr.getAttributes();
+
+                        Attribute attr = attributes.get( "objectclass" );
+                        assertTrue( attr.contains( "top" ) );
+                        assertTrue( attr.contains( "person" ) );
+
+                        attr = attributes.get( "cn" );
+                        assertTrue( attr.contains( "newperson2" ) );
+                    }
+                    else
+                    {
+                        fail();
+                    }
+                }
+                catch ( NamingException e )
+                {
+                    fail();
+                }
+
+                assertTrue( true );
+            }
+            else
+            {
+                fail();
+            }
+        }
+    }
+
+
+    /**
+     * Tests the import with a file containing one entry and checks if the entry added notification
+     * is received.
+     */
+    public void testOneEntryImportWithEntryAddedNotification()
+    {
+        // Checking if server had been launched
+        if ( !bindSuccessful )
+        {
+            // The server hasn't been lauched, so we don't execute the test and return 
+            // a successful test, so Maven can is Ok when executing tests.
+            assertTrue( true );
+        }
+        else
+        {
+            added = false;
+            try
+            {
+                // Getting the import file
+                File importFile = new File( ( ImportCommandTest.class.getResource( "import_1_entry.ldif" ) ).toURI() );
+
+                // Preparing the call to the Import Command
+                ImportCommandExecutor importCommandExecutor = new ImportCommandExecutor();
+                Parameter hostParam = new Parameter( ImportCommandExecutor.HOST_PARAMETER, host );
+                Parameter portParam = new Parameter( ImportCommandExecutor.PORT_PARAMETER, new Integer( port ) );
+                Parameter userParam = new Parameter( ImportCommandExecutor.USER_PARAMETER, user );
+                Parameter passwordParam = new Parameter( ImportCommandExecutor.PASSWORD_PARAMETER, password );
+                Parameter authParam = new Parameter( ImportCommandExecutor.AUTH_PARAMETER, "simple" );
+                Parameter fileParam = new Parameter( ImportCommandExecutor.FILE_PARAMETER, importFile );
+                Parameter ignoreErrorsParam = new Parameter( ImportCommandExecutor.IGNOREERRORS_PARAMETER, new Boolean(
+                    true ) );
+                Parameter debugParam = new Parameter( ImportCommandExecutor.DEBUG_PARAMETER, new Boolean( false ) );
+                Parameter verboseParam = new Parameter( ImportCommandExecutor.VERBOSE_PARAMETER, new Boolean( false ) );
+                Parameter quietParam = new Parameter( ImportCommandExecutor.QUIET_PARAMETER, new Boolean( false ) );
+
+                ToolCommandListener entryAddedListener = new ToolCommandListener()
+                {
+                    public void notify( Serializable o )
+                    {
+                        added = true;
+                    }
+                };
+                ListenerParameter entryAddedListenerParam = new ListenerParameter(
+                    ImportCommandExecutor.ENTRYADDEDLISTENER_PARAMETER, entryAddedListener );
+
+                // Calling the import command
+                importCommandExecutor.execute( new Parameter[]
+                    { hostParam, portParam, userParam, passwordParam, authParam, fileParam, ignoreErrorsParam,
+                        debugParam, verboseParam, quietParam }, new ListenerParameter[]
+                    { entryAddedListenerParam } );
+
+            }
+            catch ( URISyntaxException e )
+            {
+                fail();
+            }
+
+            // Testing if the error notification has been raised.
+            if ( added )
+            {
+                assertTrue( true );
+            }
+            else
+            {
+                fail();
+            }
+        }
+    }
+
+
+    /**
+     * Tests the import with a file containing error and checks if the exception notification
+     * is received.
+     */
+    public void testOneEntryImportWithExceptionNotification()
+    {
+        // Checking if server had been launched
+        if ( !bindSuccessful )
+        {
+            // The server hasn't been lauched, so we don't execute the test and return 
+            // a successful test, so Maven can is Ok when executing tests.
+            assertTrue( true );
+        }
+        else
+        {
+            exception = false;
+            try
+            {
+                // Getting the import file
+                File importFile = new File( ( ImportCommandTest.class.getResource( "import_1_entry_on_error.ldif" ) )
+                    .toURI() );
+
+                // Preparing the call to the Import Command
+                ImportCommandExecutor importCommandExecutor = new ImportCommandExecutor();
+                Parameter hostParam = new Parameter( ImportCommandExecutor.HOST_PARAMETER, host );
+                Parameter portParam = new Parameter( ImportCommandExecutor.PORT_PARAMETER, new Integer( port ) );
+                Parameter userParam = new Parameter( ImportCommandExecutor.USER_PARAMETER, user );
+                Parameter passwordParam = new Parameter( ImportCommandExecutor.PASSWORD_PARAMETER, password );
+                Parameter authParam = new Parameter( ImportCommandExecutor.AUTH_PARAMETER, "simple" );
+                Parameter fileParam = new Parameter( ImportCommandExecutor.FILE_PARAMETER, importFile );
+                Parameter ignoreErrorsParam = new Parameter( ImportCommandExecutor.IGNOREERRORS_PARAMETER, new Boolean(
+                    true ) );
+                Parameter debugParam = new Parameter( ImportCommandExecutor.DEBUG_PARAMETER, new Boolean( false ) );
+                Parameter verboseParam = new Parameter( ImportCommandExecutor.VERBOSE_PARAMETER, new Boolean( false ) );
+                Parameter quietParam = new Parameter( ImportCommandExecutor.QUIET_PARAMETER, new Boolean( false ) );
+
+                ToolCommandListener exceptionListener = new ToolCommandListener()
+                {
+                    public void notify( Serializable o )
+                    {
+                        exception = true;
+                    }
+                };
+                ListenerParameter exceptionListenerParam = new ListenerParameter(
+                    ImportCommandExecutor.EXCEPTIONLISTENER_PARAMETER, exceptionListener );
+
+                // Calling the import command
+                importCommandExecutor.execute( new Parameter[]
+                    { hostParam, portParam, userParam, passwordParam, authParam, fileParam, ignoreErrorsParam,
+                        debugParam, verboseParam, quietParam }, new ListenerParameter[]
+                    { exceptionListenerParam } );
+
+            }
+            catch ( URISyntaxException e )
+            {
+                fail();
+            }
+
+            // Testing if the error notification has been raised.
+            if ( exception )
+            {
+                assertTrue( true );
+            }
+            else
+            {
+                fail();
+            }
+        }
+    }
+
+
+    public void testRFC2849Sample1()
+    {
+        // Checking if server had been launched
+        if ( !bindSuccessful )
+        {
+            // The server hasn't been lauched, so we don't execute the test and return 
+            // a successful test, so Maven can is Ok when executing tests.
+            assertTrue( true );
+        }
+        else
+        {
+            try
+            {
+                // Getting the import file
+                File importFile = new File( ( ImportCommandTest.class.getResource( "RFC2849Sample1.ldif" ) ).toURI() );
+
+                // Preparing the call to the Import Command
+                ImportCommandExecutor importCommandExecutor = new ImportCommandExecutor();
+                Parameter hostParam = new Parameter( ImportCommandExecutor.HOST_PARAMETER, host );
+                Parameter portParam = new Parameter( ImportCommandExecutor.PORT_PARAMETER, new Integer( port ) );
+                Parameter userParam = new Parameter( ImportCommandExecutor.USER_PARAMETER, user );
+                Parameter passwordParam = new Parameter( ImportCommandExecutor.PASSWORD_PARAMETER, password );
+                Parameter authParam = new Parameter( ImportCommandExecutor.AUTH_PARAMETER, "simple" );
+                Parameter fileParam = new Parameter( ImportCommandExecutor.FILE_PARAMETER, importFile );
+                Parameter ignoreErrorsParam = new Parameter( ImportCommandExecutor.IGNOREERRORS_PARAMETER, new Boolean(
+                    true ) );
+                Parameter debugParam = new Parameter( ImportCommandExecutor.DEBUG_PARAMETER, new Boolean( false ) );
+                Parameter verboseParam = new Parameter( ImportCommandExecutor.VERBOSE_PARAMETER, new Boolean( false ) );
+                Parameter quietParam = new Parameter( ImportCommandExecutor.QUIET_PARAMETER, new Boolean( false ) );
+
+                ToolCommandListener errorListener = new ToolCommandListener()
+                {
+                    public void notify( Serializable o )
+                    {
+                        fail();
+                    }
+                };
+                ListenerParameter errorListenerParam = new ListenerParameter(
+                    ImportCommandExecutor.ERRORLISTENER_PARAMETER, errorListener );
+
+                // Calling the import command
+                importCommandExecutor.execute( new Parameter[]
+                    { hostParam, portParam, userParam, passwordParam, authParam, fileParam, ignoreErrorsParam,
+                        debugParam, verboseParam, quietParam }, new ListenerParameter[]
+                    { errorListenerParam } );
+
+            }
+            catch ( URISyntaxException e )
+            {
+                fail();
+            }
+
+            // Testing if the import is successful
+            SearchControls ctls = new SearchControls();
+            ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
+            try
+            {
+                NamingEnumeration entries = ctx.search(
+                    "cn=Barbara Jensen, ou=Product Development, dc=example, dc=com", "(objectClass=*)", ctls );
+
+                if ( entries.hasMore() )
+                {
+                    SearchResult sr = ( SearchResult ) entries.nextElement();
+
+                    assertEquals( "cn=Barbara Jensen,ou=Product Development,dc=example,dc=com", sr.getNameInNamespace() );
+
+                    Attributes attributes = sr.getAttributes();
+
+                    Attribute attr = attributes.get( "objectclass" );
+                    assertTrue( attr.contains( "top" ) );
+                    assertTrue( attr.contains( "person" ) );
+                    assertTrue( attr.contains( "organizationalPerson" ) );
+
+                    attr = attributes.get( "cn" );
+                    assertTrue( attr.contains( "Barbara Jensen" ) );
+                    assertTrue( attr.contains( "Barbara J Jensen" ) );
+                    assertTrue( attr.contains( "Babs Jensen" ) );
+
+                    attr = attributes.get( "sn" );
+                    assertTrue( attr.contains( "Jensen" ) );
+
+                    attr = attributes.get( "uid" );
+                    assertTrue( attr.contains( "bjensen" ) );
+
+                    attr = attributes.get( "telephonenumber" );
+                    assertTrue( attr.contains( "+1 408 555 1212" ) );
+
+                    attr = attributes.get( "description" );
+                    assertTrue( attr.contains( "A big sailing fan." ) );
+                }
+                else
+                {
+                    fail();
+                }
+
+                // Testing the second entry
+                entries = ctx.search( "cn=Bjorn Jensen, ou=Accounting, dc=example, dc=com", "(objectClass=*)", ctls );
+
+                if ( entries.hasMore() )
+                {
+                    SearchResult sr = ( SearchResult ) entries.nextElement();
+
+                    assertEquals( "cn=Bjorn Jensen,ou=Accounting,dc=example,dc=com", sr.getNameInNamespace() );
+
+                    Attributes attributes = sr.getAttributes();
+
+                    Attribute attr = attributes.get( "objectclass" );
+                    assertTrue( attr.contains( "top" ) );
+                    assertTrue( attr.contains( "person" ) );
+                    assertTrue( attr.contains( "organizationalPerson" ) );
+
+                    attr = attributes.get( "cn" );
+                    assertTrue( attr.contains( "Bjorn Jensen" ) );
+
+                    attr = attributes.get( "sn" );
+                    assertTrue( attr.contains( "Jensen" ) );
+
+                    attr = attributes.get( "telephonenumber" );
+                    assertTrue( attr.contains( "+1 408 555 1212" ) );
+                }
+                else
+                {
+                    fail();
+                }
+            }
+            catch ( NamingException e )
+            {
+                fail();
+            }
+        }
+    }
+
+
+    public void testRFC2849Sample2()
+    {
+        // Checking if server had been launched
+        if ( !bindSuccessful )
+        {
+            // The server hasn't been lauched, so we don't execute the test and return 
+            // a successful test, so Maven can is Ok when executing tests.
+            assertTrue( true );
+        }
+        else
+        {
+            try
+            {
+                // Getting the import file
+                File importFile = new File( ( ImportCommandTest.class.getResource( "RFC2849Sample2.ldif" ) ).toURI() );
+
+                // Preparing the call to the Import Command
+                ImportCommandExecutor importCommandExecutor = new ImportCommandExecutor();
+                Parameter hostParam = new Parameter( ImportCommandExecutor.HOST_PARAMETER, host );
+                Parameter portParam = new Parameter( ImportCommandExecutor.PORT_PARAMETER, new Integer( port ) );
+                Parameter userParam = new Parameter( ImportCommandExecutor.USER_PARAMETER, user );
+                Parameter passwordParam = new Parameter( ImportCommandExecutor.PASSWORD_PARAMETER, password );
+                Parameter authParam = new Parameter( ImportCommandExecutor.AUTH_PARAMETER, "simple" );
+                Parameter fileParam = new Parameter( ImportCommandExecutor.FILE_PARAMETER, importFile );
+                Parameter ignoreErrorsParam = new Parameter( ImportCommandExecutor.IGNOREERRORS_PARAMETER, new Boolean(
+                    true ) );
+                Parameter debugParam = new Parameter( ImportCommandExecutor.DEBUG_PARAMETER, new Boolean( false ) );
+                Parameter verboseParam = new Parameter( ImportCommandExecutor.VERBOSE_PARAMETER, new Boolean( false ) );
+                Parameter quietParam = new Parameter( ImportCommandExecutor.QUIET_PARAMETER, new Boolean( false ) );
+
+                ToolCommandListener errorListener = new ToolCommandListener()
+                {
+                    public void notify( Serializable o )
+                    {
+                        fail();
+                    }
+                };
+                ListenerParameter errorListenerParam = new ListenerParameter(
+                    ImportCommandExecutor.ERRORLISTENER_PARAMETER, errorListener );
+
+                // Calling the import command
+                importCommandExecutor.execute( new Parameter[]
+                    { hostParam, portParam, userParam, passwordParam, authParam, fileParam, ignoreErrorsParam,
+                        debugParam, verboseParam, quietParam }, new ListenerParameter[]
+                    { errorListenerParam } );
+
+            }
+            catch ( URISyntaxException e )
+            {
+                fail();
+            }
+
+            // Testing if the import is successful
+            SearchControls ctls = new SearchControls();
+            ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
+            try
+            {
+                NamingEnumeration entries = ctx.search(
+                    "cn=Barbara Jensen, ou=Product Development, dc=example, dc=com", "(objectClass=*)", ctls );
+
+                if ( entries.hasMore() )
+                {
+                    SearchResult sr = ( SearchResult ) entries.nextElement();
+
+                    assertEquals( "cn=Barbara Jensen,ou=Product Development,dc=example,dc=com", sr.getNameInNamespace() );
+
+                    Attributes attributes = sr.getAttributes();
+
+                    Attribute attr = attributes.get( "objectclass" );
+                    assertTrue( attr.contains( "top" ) );
+                    assertTrue( attr.contains( "person" ) );
+                    assertTrue( attr.contains( "organizationalPerson" ) );
+
+                    attr = attributes.get( "cn" );
+                    assertTrue( attr.contains( "Barbara Jensen" ) );
+                    assertTrue( attr.contains( "Barbara J Jensen" ) );
+                    assertTrue( attr.contains( "Babs Jensen" ) );
+
+                    attr = attributes.get( "sn" );
+                    assertTrue( attr.contains( "Jensen" ) );
+
+                    attr = attributes.get( "uid" );
+                    assertTrue( attr.contains( "bjensen" ) );
+
+                    attr = attributes.get( "telephonenumber" );
+                    assertTrue( attr.contains( "+1 408 555 1212" ) );
+
+                    attr = attributes.get( "description" );
+                    assertTrue( attr
+                        .contains( "Babs is a big sailing fan, and travels extensively in search of perfect sailing conditions." ) );
+
+                    attr = attributes.get( "title" );
+                    assertTrue( attr.contains( "Product Manager, Rod and Reel Division" ) );
+                }
+                else
+                {
+                    fail();
+                }
+            }
+            catch ( NamingException e )
+            {
+                fail();
+            }
+        }
+    }
+
+
+    public void testRFC2849Sample3() throws UnsupportedEncodingException
+    {
+        // Checking if server had been launched
+        if ( !bindSuccessful )
+        {
+            // The server hasn't been lauched, so we don't execute the test and return 
+            // a successful test, so Maven can is Ok when executing tests.
+            assertTrue( true );
+        }
+        else
+        {
+            try
+            {
+                // Getting the import file
+                File importFile = new File( ( ImportCommandTest.class.getResource( "RFC2849Sample3.ldif" ) ).toURI() );
+
+                // Preparing the call to the Import Command
+                ImportCommandExecutor importCommandExecutor = new ImportCommandExecutor();
+                Parameter hostParam = new Parameter( ImportCommandExecutor.HOST_PARAMETER, host );
+                Parameter portParam = new Parameter( ImportCommandExecutor.PORT_PARAMETER, new Integer( port ) );
+                Parameter userParam = new Parameter( ImportCommandExecutor.USER_PARAMETER, user );
+                Parameter passwordParam = new Parameter( ImportCommandExecutor.PASSWORD_PARAMETER, password );
+                Parameter authParam = new Parameter( ImportCommandExecutor.AUTH_PARAMETER, "simple" );
+                Parameter fileParam = new Parameter( ImportCommandExecutor.FILE_PARAMETER, importFile );
+                Parameter ignoreErrorsParam = new Parameter( ImportCommandExecutor.IGNOREERRORS_PARAMETER, new Boolean(
+                    true ) );
+                Parameter debugParam = new Parameter( ImportCommandExecutor.DEBUG_PARAMETER, new Boolean( false ) );
+                Parameter verboseParam = new Parameter( ImportCommandExecutor.VERBOSE_PARAMETER, new Boolean( false ) );
+                Parameter quietParam = new Parameter( ImportCommandExecutor.QUIET_PARAMETER, new Boolean( false ) );
+
+                ToolCommandListener errorListener = new ToolCommandListener()
+                {
+                    public void notify( Serializable o )
+                    {
+                        fail();
+                    }
+                };
+                ListenerParameter errorListenerParam = new ListenerParameter(
+                    ImportCommandExecutor.ERRORLISTENER_PARAMETER, errorListener );
+
+                // Calling the import command
+                importCommandExecutor.execute( new Parameter[]
+                    { hostParam, portParam, userParam, passwordParam, authParam, fileParam, ignoreErrorsParam,
+                        debugParam, verboseParam, quietParam }, new ListenerParameter[]
+                    { errorListenerParam } );
+
+            }
+            catch ( URISyntaxException e )
+            {
+                fail();
+            }
+
+            // Testing if the import is successful
+            SearchControls ctls = new SearchControls();
+            ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
+            try
+            {
+                NamingEnumeration entries = ctx.search( "cn=Gern Jensen, ou=Product Testing, dc=example, dc=com",
+                    "(objectClass=*)", ctls );
+
+                if ( entries.hasMore() )
+                {
+                    SearchResult sr = ( SearchResult ) entries.nextElement();
+
+                    assertEquals( "cn=Gern Jensen,ou=Product Testing,dc=example,dc=com", sr.getNameInNamespace() );
+
+                    Attributes attributes = sr.getAttributes();
+
+                    Attribute attr = attributes.get( "objectclass" );
+                    assertTrue( attr.contains( "top" ) );
+                    assertTrue( attr.contains( "person" ) );
+                    assertTrue( attr.contains( "organizationalPerson" ) );
+
+                    attr = attributes.get( "cn" );
+                    assertTrue( attr.contains( "Gern Jensen" ) );
+                    assertTrue( attr.contains( "Gern O Jensen" ) );
+
+                    attr = attributes.get( "sn" );
+                    assertTrue( attr.contains( "Jensen" ) );
+
+                    attr = attributes.get( "uid" );
+                    assertTrue( attr.contains( "gernj" ) );
+
+                    attr = attributes.get( "telephonenumber" );
+                    assertTrue( attr.contains( "+1 408 555 1212" ) );
+
+                    attr = attributes.get( "description" );
+                    assertTrue( attr
+                        .contains( "What a careful reader you are!  This value is base-64-encoded because it has a control character in it (a CR).\r  By the way, you should really get out more." ) );
+                }
+                else
+                {
+                    fail();
+                }
+            }
+            catch ( NamingException e )
+            {
+                fail();
+            }
+        }
+    }
+
+
+    public void testRFC2849Sample3VariousSpacing()
+    {
+        // Checking if server had been launched
+        if ( !bindSuccessful )
+        {
+            // The server hasn't been lauched, so we don't execute the test and return 
+            // a successful test, so Maven can is Ok when executing tests.
+            assertTrue( true );
+        }
+        else
+        {
+            try
+            {
+                // Getting the import file
+                File importFile = new File(
+                    ( ImportCommandTest.class.getResource( "RFC2849Sample3VariousSpacing.ldif" ) ).toURI() );
+
+                // Preparing the call to the Import Command
+                ImportCommandExecutor importCommandExecutor = new ImportCommandExecutor();
+                Parameter hostParam = new Parameter( ImportCommandExecutor.HOST_PARAMETER, host );
+                Parameter portParam = new Parameter( ImportCommandExecutor.PORT_PARAMETER, new Integer( port ) );
+                Parameter userParam = new Parameter( ImportCommandExecutor.USER_PARAMETER, user );
+                Parameter passwordParam = new Parameter( ImportCommandExecutor.PASSWORD_PARAMETER, password );
+                Parameter authParam = new Parameter( ImportCommandExecutor.AUTH_PARAMETER, "simple" );
+                Parameter fileParam = new Parameter( ImportCommandExecutor.FILE_PARAMETER, importFile );
+                Parameter ignoreErrorsParam = new Parameter( ImportCommandExecutor.IGNOREERRORS_PARAMETER, new Boolean(
+                    true ) );
+                Parameter debugParam = new Parameter( ImportCommandExecutor.DEBUG_PARAMETER, new Boolean( false ) );
+                Parameter verboseParam = new Parameter( ImportCommandExecutor.VERBOSE_PARAMETER, new Boolean( false ) );
+                Parameter quietParam = new Parameter( ImportCommandExecutor.QUIET_PARAMETER, new Boolean( false ) );
+
+                ToolCommandListener errorListener = new ToolCommandListener()
+                {
+                    public void notify( Serializable o )
+                    {
+                        fail();
+                    }
+                };
+                ListenerParameter errorListenerParam = new ListenerParameter(
+                    ImportCommandExecutor.ERRORLISTENER_PARAMETER, errorListener );
+
+                // Calling the import command
+                importCommandExecutor.execute( new Parameter[]
+                    { hostParam, portParam, userParam, passwordParam, authParam, fileParam, ignoreErrorsParam,
+                        debugParam, verboseParam, quietParam }, new ListenerParameter[]
+                    { errorListenerParam } );
+
+            }
+            catch ( URISyntaxException e )
+            {
+                fail();
+            }
+
+            // Testing if the import is successful
+            SearchControls ctls = new SearchControls();
+            ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
+            try
+            {
+                NamingEnumeration entries = ctx.search( "cn=Gern Jensen, ou=Product Testing, dc=example, dc=com",
+                    "(objectClass=*)", ctls );
+
+                if ( entries.hasMore() )
+                {
+                    SearchResult sr = ( SearchResult ) entries.nextElement();
+
+                    assertEquals( "cn=Gern Jensen,ou=Product Testing,dc=example,dc=com", sr.getNameInNamespace() );
+
+                    Attributes attributes = sr.getAttributes();
+
+                    Attribute attr = attributes.get( "objectclass" );
+                    assertTrue( attr.contains( "top" ) );
+                    assertTrue( attr.contains( "person" ) );
+                    assertTrue( attr.contains( "organizationalPerson" ) );
+
+                    attr = attributes.get( "cn" );
+                    assertTrue( attr.contains( "Gern Jensen" ) );
+                    assertTrue( attr.contains( "Gern O Jensen" ) );
+
+                    attr = attributes.get( "sn" );
+                    assertTrue( attr.contains( "Jensen" ) );
+
+                    attr = attributes.get( "uid" );
+                    assertTrue( attr.contains( "gernj" ) );
+
+                    attr = attributes.get( "telephonenumber" );
+                    assertTrue( attr.contains( "+1 408 555 1212" ) );
+
+                    attr = attributes.get( "description" );
+                    assertTrue( attr
+                        .contains( "What a careful reader you are!  This value is base-64-encoded because it has a control character in it (a CR).\r  By the way, you should really get out more." ) );
+                }
+                else
+                {
+                    fail();
+                }
+            }
+            catch ( NamingException e )
+            {
+                fail();
+            }
+        }
+    }
+}
\ No newline at end of file

Added: directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/exportcmd/10_entries.ldif
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/exportcmd/10_entries.ldif?rev=426483&view=auto
==============================================================================
--- directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/exportcmd/10_entries.ldif (added)
+++ directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/exportcmd/10_entries.ldif Fri Jul 28 04:50:40 2006
@@ -0,0 +1,58 @@
+dn: o=neworganization, dc=example,dc=com
+objectclass: organization
+objectclass: top
+o: neworganization
+
+dn: cn=newperson1, o=neworganization, dc=example,dc=com
+cn: newperson1
+objectclass: top
+objectclass: person
+telephoneNumber: 0101010101
+
+dn: cn=newperson2, o=neworganization, dc=example,dc=com
+cn: newperson2
+objectclass: top
+objectclass: person
+telephoneNumber: 0202020202
+
+dn: cn=newperson3, o=neworganization, dc=example,dc=com
+cn: newperson3
+objectclass: top
+objectclass: person
+telephoneNumber: 0303030303
+
+dn: cn=newperson4, o=neworganization, dc=example,dc=com
+cn: newperson4
+objectclass: top
+objectclass: person
+telephoneNumber: 0404040404
+
+dn: cn=newperson5, o=neworganization, dc=example,dc=com
+cn: newperson5
+objectclass: top
+objectclass: person
+telephoneNumber: 0505050505
+
+dn: cn=newperson6, o=neworganization, dc=example,dc=com
+cn: newperson6
+objectclass: top
+objectclass: person
+telephoneNumber: 0606060606
+
+dn: cn=newperson7, o=neworganization, dc=example,dc=com
+cn: newperson7
+objectclass: top
+objectclass: person
+telephoneNumber: 0707070707
+
+dn: cn=newperson8, o=neworganization, dc=example,dc=com
+cn: newperson8
+objectclass: top
+objectclass: person
+telephoneNumber: 0808080808
+
+dn: cn=newperson9, o=neworganization, dc=example,dc=com
+cn: newperson9
+objectclass: top
+objectclass: person
+telephoneNumber: 0909090909

Added: directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/RFC2849Sample1.ldif
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/RFC2849Sample1.ldif?rev=426483&view=auto
==============================================================================
--- directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/RFC2849Sample1.ldif (added)
+++ directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/RFC2849Sample1.ldif Fri Jul 28 04:50:40 2006
@@ -0,0 +1,27 @@
+dn: ou=Product Development, dc=example, dc=com
+ou: Product Development
+objectclass: top
+
+dn: ou=Accounting, dc=example, dc=com 
+ou: Accounting
+objectclass: top
+
+dn: cn=Barbara Jensen, ou=Product Development, dc=example, dc=com
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+cn: Barbara Jensen
+cn: Barbara J Jensen
+cn: Babs Jensen 
+sn: Jensen
+uid: bjensen
+telephonenumber: +1 408 555 1212
+description: A big sailing fan.
+
+dn: cn=Bjorn Jensen, ou=Accounting, dc=example, dc=com 
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+cn: Bjorn Jensen 
+sn: Jensen
+telephonenumber: +1 408 555 1212

Added: directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/RFC2849Sample2.ldif
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/RFC2849Sample2.ldif?rev=426483&view=auto
==============================================================================
--- directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/RFC2849Sample2.ldif (added)
+++ directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/RFC2849Sample2.ldif Fri Jul 28 04:50:40 2006
@@ -0,0 +1,21 @@
+dn: ou=Product Development, dc=example, dc=com
+ou: Product Development
+objectclass: top
+
+dn: ou=Accounting, dc=example, dc=com 
+ou: Accounting
+objectclass: top
+
+dn: cn=Barbara Jensen, ou=Product Development, dc=example, dc=com
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+cn: Barbara Jensen
+cn: Barbara J Jensen
+cn: Babs Jensen
+sn: Jensen
+uid: bjensen
+telephonenumber: +1 408 555 1212
+description:Babs is a big sailing fan, and travels extensively in sea
+ rch of perfect sailing conditions.
+title:Product Manager, Rod and Reel Division

Added: directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/RFC2849Sample3.ldif
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/RFC2849Sample3.ldif?rev=426483&view=auto
==============================================================================
--- directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/RFC2849Sample3.ldif (added)
+++ directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/RFC2849Sample3.ldif Fri Jul 28 04:50:40 2006
@@ -0,0 +1,17 @@
+dn: ou=Product Testing, dc=example, dc=com
+ou: Product Development
+objectclass: top
+
+dn: cn=Gern Jensen, ou=Product Testing, dc=example, dc=com
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+cn: Gern Jensen
+cn: Gern O Jensen
+sn: Jensen
+uid: gernj
+telephonenumber: +1 408 555 1212
+description:: V2hhdCBhIGNhcmVmdWwgcmVhZGVyIHlvdSBhcmUhICBUaGlzIHZhbHVl
+ IGlzIGJhc2UtNjQtZW5jb2RlZCBiZWNhdXNlIGl0IGhhcyBhIGNvbnRyb2wgY2hhcmFjdG
+ VyIGluIGl0IChhIENSKS4NICBCeSB0aGUgd2F5LCB5b3Ugc2hvdWxkIHJlYWxseSBnZXQg
+ b3V0IG1vcmUu

Added: directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/RFC2849Sample3VariousSpacing.ldif
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/RFC2849Sample3VariousSpacing.ldif?rev=426483&view=auto
==============================================================================
--- directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/RFC2849Sample3VariousSpacing.ldif (added)
+++ directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/RFC2849Sample3VariousSpacing.ldif Fri Jul 28 04:50:40 2006
@@ -0,0 +1,17 @@
+dn: ou=Product Testing, dc=example, dc=com
+ou: Product Development
+objectclass: top
+
+dn:cn=Gern Jensen, ou=Product Testing, dc=example, dc=com  
+objectclass:top
+objectclass:   person   
+objectclass:organizationalPerson
+cn:Gern Jensen
+cn:Gern O Jensen
+sn:Jensen
+uid:gernj
+telephonenumber:+1 408 555 1212  
+description::  V2hhdCBhIGNhcmVmdWwgcmVhZGVyIHlvdSBhcmUhICBUaGlzIHZhbHVl
+ IGlzIGJhc2UtNjQtZW5jb2RlZCBiZWNhdXNlIGl0IGhhcyBhIGNvbnRyb2wgY2hhcmFjdG
+ VyIGluIGl0IChhIENSKS4NICBCeSB0aGUgd2F5LCB5b3Ugc2hvdWxkIHJlYWxseSBnZXQg
+ b3V0IG1vcmUu  

Added: directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/import_10_entries.ldif
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/import_10_entries.ldif?rev=426483&view=auto
==============================================================================
--- directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/import_10_entries.ldif (added)
+++ directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/import_10_entries.ldif Fri Jul 28 04:50:40 2006
@@ -0,0 +1,50 @@
+dn: o=neworganization, dc=example,dc=com
+objectclass: organization
+objectclass: top
+o: neworganization
+
+dn: cn=newperson1, o=neworganization, dc=example,dc=com
+cn: newperson1
+objectclass: top
+objectclass: person
+
+dn: cn=newperson2, o=neworganization, dc=example,dc=com
+cn: newperson2
+objectclass: top
+objectclass: person
+
+dn: cn=newperson3, o=neworganization, dc=example,dc=com
+cn: newperson3
+objectclass: top
+objectclass: person
+
+dn: cn=newperson4, o=neworganization, dc=example,dc=com
+cn: newperson4
+objectclass: top
+objectclass: person
+
+dn: cn=newperson5, o=neworganization, dc=example,dc=com
+cn: newperson5
+objectclass: top
+objectclass: person
+
+dn: cn=newperson6, o=neworganization, dc=example,dc=com
+cn: newperson6
+objectclass: top
+objectclass: person
+
+dn: cn=newperson7, o=neworganization, dc=example,dc=com
+cn: newperson7
+objectclass: top
+objectclass: person
+
+dn: cn=newperson8, o=neworganization, dc=example,dc=com
+cn: newperson8
+objectclass: top
+objectclass: person
+
+dn: cn=newperson9, o=neworganization, dc=example,dc=com
+cn: newperson9
+objectclass: top
+objectclass: person
+

Added: directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/import_1_entry.ldif
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/import_1_entry.ldif?rev=426483&view=auto
==============================================================================
--- directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/import_1_entry.ldif (added)
+++ directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/import_1_entry.ldif Fri Jul 28 04:50:40 2006
@@ -0,0 +1,4 @@
+dn: o=neworganization, dc=example,dc=com
+objectclass: organization
+objectclass: top
+o: neworganization

Added: directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/import_1_entry_on_error.ldif
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/import_1_entry_on_error.ldif?rev=426483&view=auto
==============================================================================
--- directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/import_1_entry_on_error.ldif (added)
+++ directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/import_1_entry_on_error.ldif Fri Jul 28 04:50:40 2006
@@ -0,0 +1 @@
+objectclass: top

Added: directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/import_2_entries_error_and_ok.ldif
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/import_2_entries_error_and_ok.ldif?rev=426483&view=auto
==============================================================================
--- directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/import_2_entries_error_and_ok.ldif (added)
+++ directory/trunks/apacheds/server-tools/src/test/resources/org/apache/directory/server/tools/commands/importcmd/import_2_entries_error_and_ok.ldif Fri Jul 28 04:50:40 2006
@@ -0,0 +1,14 @@
+dn: o=neworganization, dc=example,dc=com
+objectclass: organization
+objectclass: top
+o: neworganization
+
+dn: bn=newperson1, o=neworganization, dc=example,dc=com
+bn: newperson1
+azerty: top
+azerty: person
+
+dn: cn=newperson2, o=neworganization, dc=example,dc=com
+cn: newperson2
+objectclass: top
+objectclass: person



Mime
View raw message