Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2008-06-11 22:52:34 +0000
committerslewis2008-06-11 22:52:34 +0000
commitb773764875cc7ec6008616bacbbbbab4d2065736 (patch)
tree1262b45ec708615e8dfc8bacfb84208e15a433c4
parent2b13588b96512321bf22d470ad318b038d3f43b3 (diff)
downloadorg.eclipse.ecf-b773764875cc7ec6008616bacbbbbab4d2065736.tar.gz
org.eclipse.ecf-b773764875cc7ec6008616bacbbbbab4d2065736.tar.xz
org.eclipse.ecf-b773764875cc7ec6008616bacbbbbab4d2065736.zip
Fix for ClientContainerConnectTestv20080611-1541
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/connect/ClientContainerConnectTest.java39
1 files changed, 23 insertions, 16 deletions
diff --git a/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/connect/ClientContainerConnectTest.java b/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/connect/ClientContainerConnectTest.java
index 32bde03b7..94a87882a 100755
--- a/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/connect/ClientContainerConnectTest.java
+++ b/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/connect/ClientContainerConnectTest.java
@@ -21,6 +21,7 @@ import org.eclipse.ecf.core.events.IContainerConnectingEvent;
import org.eclipse.ecf.core.events.IContainerDisconnectedEvent;
import org.eclipse.ecf.core.events.IContainerDisconnectingEvent;
import org.eclipse.ecf.core.events.IContainerEvent;
+import org.eclipse.ecf.core.security.IConnectContext;
import org.eclipse.ecf.tests.ContainerAbstractTestCase;
public class ClientContainerConnectTest extends ContainerAbstractTestCase {
@@ -37,7 +38,6 @@ public class ClientContainerConnectTest extends ContainerAbstractTestCase {
List clientDisconnectedEvents = new ArrayList();
-
/*
* (non-Javadoc)
*
@@ -72,7 +72,7 @@ public class ClientContainerConnectTest extends ContainerAbstractTestCase {
clientDisconnectingEvents.clear();
clientDisconnectedEvents.clear();
}
-
+
/*
* (non-Javadoc)
*
@@ -91,6 +91,13 @@ public class ClientContainerConnectTest extends ContainerAbstractTestCase {
assertTrue(serverConnectEvents.size() == getClientCount());
}
+ /* (non-Javadoc)
+ * @see org.eclipse.ecf.tests.ContainerAbstractTestCase#getConnectContext(int)
+ */
+ protected IConnectContext getConnectContext(int client) {
+ return null;
+ }
+
public void testClientsDisconnect() throws Exception {
connectClients();
assertTrue(serverConnectEvents.size() == getClientCount());
@@ -99,7 +106,7 @@ public class ClientContainerConnectTest extends ContainerAbstractTestCase {
}
public void testGetConnectedID() throws Exception {
- IContainer client = getClients()[0];
+ final IContainer client = getClients()[0];
assertNull(client.getConnectedID());
client.connect(createServerID(), null);
assertNotNull(client.getConnectedID());
@@ -125,7 +132,7 @@ public class ClientContainerConnectTest extends ContainerAbstractTestCase {
}
public void testClientListener() throws Exception {
- IContainer client = getClients()[0];
+ final IContainer client = getClients()[0];
client.addListener(createListener());
assertTrue(clientConnectingEvents.size() == 0);
assertTrue(clientConnectedEvents.size() == 0);
@@ -141,43 +148,43 @@ public class ClientContainerConnectTest extends ContainerAbstractTestCase {
}
public void testListenerConnecting() throws Exception {
- IContainer client = getClients()[0];
+ final IContainer client = getClients()[0];
client.addListener(createListener());
client.connect(createServerID(), null);
- Object o = clientConnectingEvents.get(0);
+ final Object o = clientConnectingEvents.get(0);
assertTrue(o instanceof IContainerConnectingEvent);
- IContainerConnectingEvent cco = (IContainerConnectingEvent) o;
+ final IContainerConnectingEvent cco = (IContainerConnectingEvent) o;
assertTrue(cco.getLocalContainerID().equals(client.getID()));
assertTrue(cco.getTargetID().equals(createServerID()));
assertTrue(cco.getData() == null);
}
public void testListenerConnected() throws Exception {
- IContainer client = getClients()[0];
+ final IContainer client = getClients()[0];
client.addListener(createListener());
client.connect(createServerID(), null);
- Object o = clientConnectedEvents.get(0);
+ final Object o = clientConnectedEvents.get(0);
assertTrue(o instanceof IContainerConnectedEvent);
- IContainerConnectedEvent cco = (IContainerConnectedEvent) o;
+ final IContainerConnectedEvent cco = (IContainerConnectedEvent) o;
assertTrue(cco.getLocalContainerID().equals(client.getID()));
assertTrue(cco.getTargetID().equals(createServerID()));
}
public void testListenerDisconnected() throws Exception {
- IContainer client = getClients()[0];
+ final IContainer client = getClients()[0];
client.addListener(createListener());
client.connect(createServerID(), null);
client.disconnect();
- Object o = clientDisconnectedEvents.get(0);
+ final Object o = clientDisconnectedEvents.get(0);
assertTrue(o instanceof IContainerDisconnectedEvent);
- IContainerDisconnectedEvent cco = (IContainerDisconnectedEvent) o;
+ final IContainerDisconnectedEvent cco = (IContainerDisconnectedEvent) o;
assertTrue(cco.getLocalContainerID().equals(client.getID()));
assertTrue(cco.getTargetID().equals(createServerID()));
}
-
+
public void testRemoveListener() throws Exception {
- IContainer client = getClients()[0];
- IContainerListener l = createListener();
+ final IContainer client = getClients()[0];
+ final IContainerListener l = createListener();
client.addListener(l);
client.removeListener(l);
client.connect(createServerID(), null);

Back to the top