source: exampleparties/timedependentparty/src/test/java/geniusweb/exampleparties/timedependentparty/TestConnection.java@ 52

Last change on this file since 52 was 52, checked in by ruud, 14 months ago

Fixed small issues in domaineditor.

File size: 1.1 KB
Line 
1package geniusweb.exampleparties.timedependentparty;
2
3import java.io.IOException;
4import java.net.URI;
5import java.util.LinkedList;
6import java.util.List;
7
8import geniusweb.actions.Action;
9import geniusweb.connection.ConnectionEnd;
10import geniusweb.inform.Inform;
11import geniusweb.references.Reference;
12import tudelft.utilities.listener.DefaultListenable;
13
14/**
15 * A "real" connection object, because the party is going to subscribe etc, and
16 * without a real connection we would have to do a lot of mocks that would make
17 * the test very hard to read.
18 *
19 */
20class TestConnection extends DefaultListenable<Inform>
21 implements ConnectionEnd<Inform, Action> {
22 private List<Action> actions = new LinkedList<>();
23
24 @Override
25 public void send(Action action) throws IOException {
26 actions.add(action);
27 }
28
29 @Override
30 public Reference getReference() {
31 return null;
32 }
33
34 @Override
35 public URI getRemoteURI() {
36 return null;
37 }
38
39 @Override
40 public void close() {
41
42 }
43
44 @Override
45 public Error getError() {
46 return null;
47 }
48
49 public List<Action> getActions() {
50 return actions;
51 }
52
53}
Note: See TracBrowser for help on using the repository browser.