From 4ae29c76c2703bb7f36aee70aaf09c6bb7590464 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 4 May 2011 21:37:29 +0200 Subject: Add mock events git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@121 72836036-5685-4462-b002-a69064685172 --- test/jrummikub/util/MockEvent.java | 17 +++++++++++++++++ test/jrummikub/util/MockEvent1.java | 17 +++++++++++++++++ test/jrummikub/util/MockEvent2.java | 17 +++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 test/jrummikub/util/MockEvent.java create mode 100644 test/jrummikub/util/MockEvent1.java create mode 100644 test/jrummikub/util/MockEvent2.java (limited to 'test/jrummikub/util') 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 listeners = new HashSet(); + + @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 implements IEvent1 { + public HashSet> listeners = new HashSet>(); + + @Override + public void add(IListener1 listener) { + listeners.add(listener); + } + + @Override + public void remove(IListener1 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 implements IEvent2 { + public HashSet> listeners = new HashSet>(); + + @Override + public void add(IListener2 listener) { + listeners.add(listener); + } + + @Override + public void remove(IListener2 listener) { + listeners.remove(listener); + } +} -- cgit v1.2.3