summaryrefslogtreecommitdiffstats
path: root/test/jrummikub/util
diff options
context:
space:
mode:
Diffstat (limited to 'test/jrummikub/util')
-rw-r--r--test/jrummikub/util/MockEvent.java17
-rw-r--r--test/jrummikub/util/MockEvent1.java17
-rw-r--r--test/jrummikub/util/MockEvent2.java17
3 files changed, 51 insertions, 0 deletions
diff --git a/test/jrummikub/util/MockEvent.java b/test/jrummikub/util/MockEvent.java
new file mode 100644
index 0000000..85f2c28
--- /dev/null
+++ b/test/jrummikub/util/MockEvent.java
@@ -0,0 +1,17 @@
+package jrummikub.util;
+
+import java.util.HashSet;
+
+public class MockEvent implements IEvent {
+ public HashSet<IListener> listeners = new HashSet<IListener>();
+
+ @Override
+ public void add(IListener listener) {
+ listeners.add(listener);
+ }
+
+ @Override
+ public void remove(IListener listener) {
+ listeners.remove(listener);
+ }
+}
diff --git a/test/jrummikub/util/MockEvent1.java b/test/jrummikub/util/MockEvent1.java
new file mode 100644
index 0000000..36af527
--- /dev/null
+++ b/test/jrummikub/util/MockEvent1.java
@@ -0,0 +1,17 @@
+package jrummikub.util;
+
+import java.util.HashSet;
+
+public class MockEvent1<T> implements IEvent1<T> {
+ public HashSet<IListener1<T>> listeners = new HashSet<IListener1<T>>();
+
+ @Override
+ public void add(IListener1<T> listener) {
+ listeners.add(listener);
+ }
+
+ @Override
+ public void remove(IListener1<T> listener) {
+ listeners.remove(listener);
+ }
+}
diff --git a/test/jrummikub/util/MockEvent2.java b/test/jrummikub/util/MockEvent2.java
new file mode 100644
index 0000000..4f01372
--- /dev/null
+++ b/test/jrummikub/util/MockEvent2.java
@@ -0,0 +1,17 @@
+package jrummikub.util;
+
+import java.util.HashSet;
+
+public class MockEvent2<T1, T2> implements IEvent2<T1, T2> {
+ public HashSet<IListener2<T1, T2>> listeners = new HashSet<IListener2<T1, T2>>();
+
+ @Override
+ public void add(IListener2<T1, T2> listener) {
+ listeners.add(listener);
+ }
+
+ @Override
+ public void remove(IListener2<T1, T2> listener) {
+ listeners.remove(listener);
+ }
+}