summaryrefslogtreecommitdiff
path: root/same/src/test/java
diff options
context:
space:
mode:
authorKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-01-27 14:03:54 +0100
committerKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-01-27 14:03:54 +0100
commitf1be615e30f4a6832bd0b805e155c0775b624964 (patch)
tree3c1edc9b91e5bb0f43fcdb2bce93790cf4f9fd2d /same/src/test/java
parent3d0ddd70342bee8826997e9a2343a5741e243a0d (diff)
Client answers discovery events.
Diffstat (limited to 'same/src/test/java')
-rw-r--r--same/src/test/java/com/orbekk/same/ClientServiceImplTest.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/same/src/test/java/com/orbekk/same/ClientServiceImplTest.java b/same/src/test/java/com/orbekk/same/ClientServiceImplTest.java
index 39c0e7c..69e4511 100644
--- a/same/src/test/java/com/orbekk/same/ClientServiceImplTest.java
+++ b/same/src/test/java/com/orbekk/same/ClientServiceImplTest.java
@@ -24,4 +24,13 @@ public class ClientServiceImplTest {
client.notifyNetwork("MyNetwork", "MasterUrl");
verify(listener).notifyNetwork("MyNetwork", "MasterUrl");
}
+
+ @Test public void discover() {
+ client.setState(".masterUrl", "master", 1);
+ ClientServiceImpl mockClient = mock(ClientServiceImpl.class);
+ connections.clientMap.put("mockClient/ClientService.json",
+ mockClient);
+ client.discover("mockClient");
+ verify(mockClient).notifyNetwork("ClientNetwork", "master");
+ }
}