summaryrefslogtreecommitdiff
path: root/same/src/test/java/com/orbekk
diff options
context:
space:
mode:
authorKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-04-10 14:55:56 +0200
committerKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-04-10 14:55:56 +0200
commit72101219235a9e4858a0d585d8278581b67c11f0 (patch)
tree39d6b07c6dafee3f6c132edf491f283491478c74 /same/src/test/java/com/orbekk
parentf4da6504442ba16829ddd206ef73329a7b02ad8c (diff)
Add protobuf based Client service.protobuf-benchmark
Use the new service internally in Client.
Diffstat (limited to 'same/src/test/java/com/orbekk')
-rw-r--r--same/src/test/java/com/orbekk/same/ClientTest.java10
-rw-r--r--same/src/test/java/com/orbekk/same/MasterTest.java6
2 files changed, 1 insertions, 15 deletions
diff --git a/same/src/test/java/com/orbekk/same/ClientTest.java b/same/src/test/java/com/orbekk/same/ClientTest.java
index 6c617be..d494fe7 100644
--- a/same/src/test/java/com/orbekk/same/ClientTest.java
+++ b/same/src/test/java/com/orbekk/same/ClientTest.java
@@ -33,7 +33,7 @@ public class ClientTest {
}
@Test public void connectedUpdateWorks() throws Exception {
- clientS.masterTakeover("master", null, 1);
+ clientS.masterTakeover("master", "MyNetwork", 1);
ClientInterface clientI = client.getInterface();
State.Component component = new State.Component(
"TestVariable", 1, "meow");
@@ -49,14 +49,6 @@ public class ClientTest {
assertEquals("Test data", state.getDataOf("TestState"));
}
- @Test public void testNetworkListener() throws Exception {
- NetworkNotificationListener listener =
- mock(NetworkNotificationListener.class);
- client.setNetworkListener(listener);
- clientS.notifyNetwork("MyNetwork", "MasterUrl");
- verify(listener).notifyNetwork("MyNetwork", "MasterUrl");
- }
-
@Test public void stateListenerReceivesUpdate() throws Exception {
StateChangedListener listener = mock(StateChangedListener.class);
client.getInterface().addStateListener(listener);
diff --git a/same/src/test/java/com/orbekk/same/MasterTest.java b/same/src/test/java/com/orbekk/same/MasterTest.java
index f369d06..39bee1f 100644
--- a/same/src/test/java/com/orbekk/same/MasterTest.java
+++ b/same/src/test/java/com/orbekk/same/MasterTest.java
@@ -18,12 +18,6 @@ public class MasterTest {
public static class UnreachableClient implements ClientService {
@Override
- public void notifyNetwork(String networkName, String masterUrl)
- throws Exception {
- throw new Exception("Unreachable client");
- }
-
- @Override
public void setState(String component, String data, long revision)
throws Exception {
throw new Exception("Unreachable client");