summaryrefslogtreecommitdiff
path: root/same/src/test/java/com/orbekk
diff options
context:
space:
mode:
Diffstat (limited to 'same/src/test/java/com/orbekk')
-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 2baa829..39c0e7c 100644
--- a/same/src/test/java/com/orbekk/same/ClientServiceImplTest.java
+++ b/same/src/test/java/com/orbekk/same/ClientServiceImplTest.java
@@ -3,6 +3,7 @@ package com.orbekk.same;
import static org.junit.Assert.*;
import org.junit.Test;
+import static org.mockito.Mockito.*;
public class ClientServiceImplTest {
private State state = new State("ClientNetwork");
@@ -15,4 +16,12 @@ public class ClientServiceImplTest {
assertEquals(100, state.getRevision("TestState"));
assertEquals("Test data", state.getDataOf("TestState"));
}
+
+ @Test public void testNetworkListener() {
+ NetworkNotificationListener listener =
+ mock(NetworkNotificationListener.class);
+ client.setNetworkListener(listener);
+ client.notifyNetwork("MyNetwork", "MasterUrl");
+ verify(listener).notifyNetwork("MyNetwork", "MasterUrl");
+ }
}