directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r888133 - /directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/SearchTest.java
Date Mon, 07 Dec 2009 20:55:03 GMT
Author: seelmann
Date: Mon Dec  7 20:55:02 2009
New Revision: 888133

URL: http://svn.apache.org/viewvc?rev=888133&view=rev
Log:
Get connection name from connection object

Modified:
    directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/SearchTest.java

Modified: directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/SearchTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/SearchTest.java?rev=888133&r1=888132&r2=888133&view=diff
==============================================================================
--- directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/SearchTest.java
(original)
+++ directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/SearchTest.java
Mon Dec  7 20:55:02 2009
@@ -36,6 +36,7 @@
 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.studio.connection.core.Connection;
 import org.apache.directory.studio.ldapbrowser.core.BrowserConnectionManager;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
@@ -69,6 +70,9 @@
     private ConnectionsViewBot connectionsViewBot;
     private BrowserViewBot browserViewBot;
 
+    private Connection connection1;
+    private Connection connection2;
+
 
     @Before
     public void setUp() throws Exception
@@ -76,8 +80,8 @@
         studioBot = new StudioBot();
         studioBot.resetLdapPerspective();
         connectionsViewBot = studioBot.getConnectionView();
-        connectionsViewBot.createTestConnection( "SearchTest1", ldapServer.getPort() );
-        connectionsViewBot.createTestConnection( "SearchTest2", ldapServer.getPort() );
+        connection1 = connectionsViewBot.createTestConnection( "SearchTest1", ldapServer.getPort()
);
+        connection2 = connectionsViewBot.createTestConnection( "SearchTest2", ldapServer.getPort()
);
         browserViewBot = studioBot.getBrowserView();
     }
 
@@ -100,13 +104,15 @@
     public void testCopyPasteSearchBetweenConnections() throws Exception
     {
         BrowserConnectionManager browserConnectionManager = BrowserCorePlugin.getDefault().getConnectionManager();
-        IBrowserConnection browserConnection1 = browserConnectionManager.getBrowserConnectionByName(
"SearchTest1" );
-        IBrowserConnection browserConnection2 = browserConnectionManager.getBrowserConnectionByName(
"SearchTest2" );
+        IBrowserConnection browserConnection1 = browserConnectionManager.getBrowserConnectionByName(
connection1
+            .getName() );
+        IBrowserConnection browserConnection2 = browserConnectionManager.getBrowserConnectionByName(
connection2
+            .getName() );
         assertEquals( 0, browserConnection1.getSearchManager().getSearches().size() );
         assertEquals( 0, browserConnection2.getSearchManager().getSearches().size() );
 
         // create a search for in connection 1
-        connectionsViewBot.selectConnection( "SearchTest1" );
+        connectionsViewBot.selectConnection( connection1.getName() );
         browserViewBot.selectEntry( "DIT", "Root DSE", "ou=system" );
         SearchDialogBot dialogBot = browserViewBot.openSearchDialog();
         assertTrue( dialogBot.isVisible() );
@@ -123,7 +129,7 @@
 
         // copy/paste the created search from connection 1 to connection 2
         browserViewBot.copy();
-        connectionsViewBot.selectConnection( "SearchTest2" );
+        connectionsViewBot.selectConnection( connection2.getName() );
         browserViewBot.selectEntry( "Searches" );
         SearchPropertiesDialogBot searchPropertiesDialogBot = browserViewBot.pasteSearch();
         assertTrue( searchPropertiesDialogBot.isVisible() );



Mime
View raw message