summaryrefslogtreecommitdiff
path: root/jsonrpc/src/test/java
diff options
context:
space:
mode:
authorKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-01-11 15:33:19 +0100
committerKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-01-11 15:33:19 +0100
commitee0b57e81fce368e931a0d7282d8d84a9ecffd71 (patch)
tree549062eb4601e703c0333199da200fe5abf90eb2 /jsonrpc/src/test/java
parent47e43eefebae63afee1a1743602c15e3b1ede8ff (diff)
Add participant synchronization.
- No error handling in the protocol at the moment.
Diffstat (limited to 'jsonrpc/src/test/java')
-rw-r--r--jsonrpc/src/test/java/com/orbekk/same/SameStateTest.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/jsonrpc/src/test/java/com/orbekk/same/SameStateTest.java b/jsonrpc/src/test/java/com/orbekk/same/SameStateTest.java
index 77bbbee..7e21e7a 100644
--- a/jsonrpc/src/test/java/com/orbekk/same/SameStateTest.java
+++ b/jsonrpc/src/test/java/com/orbekk/same/SameStateTest.java
@@ -56,5 +56,18 @@ public class SameStateTest {
assertTrue(state1.getParticipants().size() == 2);
assertTrue(state2.getParticipants().size() == 2);
assertEquals(state1.getNetworkName(), state2.getNetworkName());
+
+ connections.getConnection(state2.getUrl()).
+ participateNetwork("Network1", state3.getClientId(),
+ state3.getUrl());
+ state2.internalRun();
+ state1.internalRun();
+ state3.internalRun();
+
+ assertTrue(state1.getParticipants().size() == 3);
+ assertTrue(state2.getParticipants().size() == 3);
+ assertTrue(state3.getParticipants().size() == 3);
+ assertEquals(state1.getNetworkName(), state2.getNetworkName());
+ assertEquals(state2.getNetworkName(), state3.getNetworkName());
}
}