directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1035586 [2/2] - in /directory/studio/trunk/tests/test.integration.ui: ./ src/main/java/org/apache/directory/studio/test/integration/ui/ src/main/java/org/apache/directory/studio/test/integration/ui/bots/
Date Tue, 16 Nov 2010 11:03:12 GMT
Modified: directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/RenameEntryDialogTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/RenameEntryDialogTest.java?rev=1035586&r1=1035585&r2=1035586&view=diff
==============================================================================
--- directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/RenameEntryDialogTest.java
(original)
+++ directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/RenameEntryDialogTest.java
Tue Nov 16 11:03:12 2010
@@ -6,16 +6,16 @@
  *  to you 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. 
- *  
+ *  under the License.
+ *
  */
 
 package org.apache.directory.studio.test.integration.ui;
@@ -23,11 +23,11 @@ package org.apache.directory.studio.test
 
 import static junit.framework.Assert.assertTrue;
 
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifFiles;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.annotations.CreateLdapServer;
+import org.apache.directory.server.annotations.CreateTransport;
+import org.apache.directory.server.core.annotations.ApplyLdifFiles;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.studio.test.integration.ui.bots.BrowserViewBot;
 import org.apache.directory.studio.test.integration.ui.bots.ConnectionsViewBot;
 import org.apache.directory.studio.test.integration.ui.bots.RenameEntryDialogBot;
@@ -40,17 +40,17 @@ import org.junit.runner.RunWith;
 
 /**
  * Tests the rename entry dialog.
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-@RunWith(SiRunner.class)
-@CleanupLevel(Level.SUITE)
-@ApplyLdifFiles("RenameEntryDialogTest.ldif")
-public class RenameEntryDialogTest
+@RunWith(FrameworkRunner.class)
+@CreateLdapServer(transports =
+    { @CreateTransport(protocol = "LDAP") })
+@ApplyLdifFiles(
+    { "org/apache/directory/studio/test/integration/ui/RenameEntryDialogTest.ldif" })
+public class RenameEntryDialogTest extends AbstractLdapTestUnit
 {
-    public static LdapServer ldapServer;
-
     private StudioBot studioBot;
     private ConnectionsViewBot connectionsViewBot;
     private BrowserViewBot browserViewBot;
@@ -76,9 +76,9 @@ public class RenameEntryDialogTest
 
     /**
      * Test for DIRSTUDIO-318.
-     * 
+     *
      * Renames a multi-valued RDN by changing both RDN attributes.
-     * 
+     *
      * @throws Exception
      *             the exception
      */
@@ -101,9 +101,9 @@ public class RenameEntryDialogTest
 
     /**
      * Test for DIRSTUDIO-484.
-     * 
+     *
      * Renames a RDN with escaped characters.
-     * 
+     *
      * @throws Exception
      *             the exception
      */
@@ -127,7 +127,7 @@ public class RenameEntryDialogTest
 
     /**
      * Test for DIRSTUDIO-589, DIRSTUDIO-591, DIRSHARED-38.
-     * 
+     *
      * Rename an entry with sharp in DN: cn=\#123456.
      */
     @Test
@@ -147,7 +147,7 @@ public class RenameEntryDialogTest
 
     /**
      * Test for DIRSHARED-39.
-     * 
+     *
      * Rename an entry with trailing space in RDN.
      */
     @Test

Modified: directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SearchTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SearchTest.java?rev=1035586&r1=1035585&r2=1035586&view=diff
==============================================================================
--- directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SearchTest.java
(original)
+++ directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SearchTest.java
Tue Nov 16 11:03:12 2010
@@ -6,16 +6,16 @@
  *  to you 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. 
- *  
+ *  under the License.
+ *
  */
 
 package org.apache.directory.studio.test.integration.ui;
@@ -24,18 +24,13 @@ package org.apache.directory.studio.test
 import static junit.framework.Assert.assertEquals;
 import static junit.framework.Assert.assertTrue;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
-import org.apache.directory.shared.ldap.entry.Modification;
-import org.apache.directory.shared.ldap.entry.ModificationOperation;
-import org.apache.directory.shared.ldap.entry.client.ClientModification;
-import org.apache.directory.shared.ldap.entry.client.DefaultClientAttribute;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.server.annotations.CreateLdapServer;
+import org.apache.directory.server.annotations.CreateTransport;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
+import org.apache.directory.shared.ldap.message.ModifyRequest;
+import org.apache.directory.shared.ldap.message.ModifyRequestImpl;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.ldapbrowser.core.BrowserConnectionManager;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
@@ -56,16 +51,15 @@ import org.junit.runner.RunWith;
 
 /**
  * Tests the Search dialog and Search category in the LDAP Browser view.
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-@RunWith(SiRunner.class)
-@CleanupLevel(Level.SUITE)
-public class SearchTest
+@RunWith(FrameworkRunner.class)
+@CreateLdapServer(transports =
+    { @CreateTransport(protocol = "LDAP") })
+public class SearchTest extends AbstractLdapTestUnit
 {
-    public static LdapServer ldapServer;
-
     private StudioBot studioBot;
     private ConnectionsViewBot connectionsViewBot;
     private BrowserViewBot browserViewBot;
@@ -95,7 +89,7 @@ public class SearchTest
 
     /**
      * Test for DIRSTUDIO-490.
-     * 
+     *
      * Copy/Paste a search between connections and verify that the associated browser connection
is correct.
      *
      * @throws Exception
@@ -147,7 +141,7 @@ public class SearchTest
 
     /**
      * Test for DIRSTUDIO-587 (UI flickers on quick search).
-     * 
+     *
      * When performing a quick search only one UI update should be fired.
      *
      * @throws Exception
@@ -167,7 +161,7 @@ public class SearchTest
 
         browserViewBot.selectEntry( "DIT", "Root DSE", "ou=system", "Quick Search" );
 
-        // verify that only one events was fired 
+        // verify that only one events was fired
         long fireCount = fireCount1 - fireCount0;
         assertEquals( "Only 1 event firings expected when running quick search.", 1, fireCount
);
     }
@@ -200,10 +194,10 @@ public class SearchTest
         assertEquals( "", srEditorBot.getContent( 1, 4 ) );
 
         // add description
-        List<Modification> modifications = new ArrayList<Modification>();
-        modifications.add( new ClientModification( ModificationOperation.REPLACE_ATTRIBUTE,
new DefaultClientAttribute(
-            "description", "The 1st description." ) ) );
-        ldapServer.getDirectoryService().getAdminSession().modify( new LdapDN( "uid=admin,ou=system"
), modifications );
+        ModifyRequest request = new ModifyRequestImpl();
+        request.setName( new DN( "uid=admin,ou=system" ) );
+        request.replace( "description", "The 1st description." );
+        ldapServer.getDirectoryService().getAdminSession().modify( request );
 
         // refresh the search, using the toolbar icon
         srEditorBot.refresh();

Modified: directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SwtResourcesTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SwtResourcesTest.java?rev=1035586&r1=1035585&r2=1035586&view=diff
==============================================================================
--- directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SwtResourcesTest.java
(original)
+++ directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SwtResourcesTest.java
Tue Nov 16 11:03:12 2010
@@ -6,16 +6,16 @@
  *  to you 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. 
- *  
+ *  under the License.
+ *
  */
 
 package org.apache.directory.studio.test.integration.ui;
@@ -24,10 +24,10 @@ package org.apache.directory.studio.test
 import static junit.framework.Assert.assertTrue;
 import static junit.framework.Assert.fail;
 
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.annotations.CreateLdapServer;
+import org.apache.directory.server.annotations.CreateTransport;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.studio.test.integration.ui.bots.BrowserViewBot;
 import org.apache.directory.studio.test.integration.ui.bots.ConnectionsViewBot;
 import org.apache.directory.studio.test.integration.ui.bots.DeleteDialogBot;
@@ -45,16 +45,15 @@ import org.junit.runner.RunWith;
 
 /**
  * Tests allocation of SWT Resources.
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-@RunWith(SiRunner.class)
-@CleanupLevel(Level.SUITE)
-public class SwtResourcesTest
+@RunWith(FrameworkRunner.class)
+@CreateLdapServer(transports =
+    { @CreateTransport(protocol = "LDAP") })
+public class SwtResourcesTest extends AbstractLdapTestUnit
 {
-    public static LdapServer ldapServer;
-
     private StudioBot studioBot;
     private ConnectionsViewBot connectionsViewBot;
     private BrowserViewBot browserViewBot;
@@ -80,10 +79,10 @@ public class SwtResourcesTest
 
     /**
      * Test for DIRSTUDIO-319.
-     * 
+     *
      * Creates multiple entries using the New Entry wizard. Checks that we don't
      * allocate too much SWT resources during the run.
-     * 
+     *
      * @throws Exception
      *             the exception
      */
@@ -114,9 +113,9 @@ public class SwtResourcesTest
     /**
      * Ensure that we have not allocated more the 1000 SWT resources during the
      * complete test suite.
-     * 
+     *
      * 1000 is not a fix number but it is a good starting point.
-     * 
+     *
      * @throws Exception
      *             the exception
      */

Modified: directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ConnectionsViewBot.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ConnectionsViewBot.java?rev=1035586&r1=1035585&r2=1035586&view=diff
==============================================================================
--- directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ConnectionsViewBot.java
(original)
+++ directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ConnectionsViewBot.java
Tue Nov 16 11:03:12 2010
@@ -6,16 +6,16 @@
  *  to you 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. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.studio.test.integration.ui.bots;
 
@@ -28,6 +28,7 @@ import org.apache.directory.studio.conne
 import org.apache.directory.studio.connection.core.ConnectionParameter;
 import org.apache.directory.studio.connection.core.ConnectionParameter.AuthenticationMethod;
 import org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod;
+import org.apache.directory.studio.connection.core.ConnectionParameter.NetworkProvider;
 import org.apache.directory.studio.connection.core.jobs.OpenConnectionsRunnable;
 import org.apache.directory.studio.connection.core.jobs.StudioConnectionJob;
 import org.apache.directory.studio.test.integration.ui.ContextMenuHelper;
@@ -55,7 +56,7 @@ public class ConnectionsViewBot
     {
         getConnectionsTree().contextMenu( "Open Connection" ).click();
     }
-    
+
 
     public void closeSelectedConnections()
     {
@@ -124,14 +125,14 @@ public class ConnectionsViewBot
 
     /**
      * Creates the test connection.
-     * 
+     *
      * @param name
      *            the name of the connection
      * @param port
      *            the port to use
-     * 
+     *
      * @return the connection
-     * 
+     *
      */
     public Connection createTestConnection( String name, int port ) throws Exception
     {
@@ -139,6 +140,7 @@ public class ConnectionsViewBot
 
         ConnectionManager connectionManager = ConnectionCorePlugin.getDefault().getConnectionManager();
         ConnectionParameter connectionParameter = new ConnectionParameter();
+        connectionParameter.setNetworkProvider( NetworkProvider.JNDI );
         connectionParameter.setName( name );
         connectionParameter.setHost( "localhost" );
         connectionParameter.setPort( port );

Modified: directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/NewEntryWizardBot.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/NewEntryWizardBot.java?rev=1035586&r1=1035585&r2=1035586&view=diff
==============================================================================
--- directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/NewEntryWizardBot.java
(original)
+++ directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/NewEntryWizardBot.java
Tue Nov 16 11:03:12 2010
@@ -20,7 +20,7 @@
 package org.apache.directory.studio.test.integration.ui.bots;
 
 
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 
 
 public class NewEntryWizardBot extends WizardBot
@@ -106,7 +106,7 @@ public class NewEntryWizardBot extends W
         for ( int i = 0;; i++ )
         {
             String text = bot.text( 1 ).getText();
-            if ( LdapDN.isValid( text ) )
+            if ( DN.isValid( text ) )
             {
                 return text;
             }



Mime
View raw message