diff options
author | Martin <marcin.j.chrzanowski@gmail.com> | 2020-01-03 18:29:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-03 18:29:55 +0100 |
commit | 9be545d6f2609d5fe8143a1964d44f6eee588ea2 (patch) | |
tree | f0bb8d159249e9ddf328e92d7fb5eda10122ab3b /src/test/java/pl/edu/mimuw/cloudatlas/agent/MockEventBus.java | |
parent | fda20e7aa496926d4f4d78921925025040414d9b (diff) | |
parent | ec2da92e9636e219f5ad7caa73c9334dae12e5b1 (diff) |
Merge pull request #83 from m-chrzan/remik
Use new modular architecture when implementing the RMI API
Diffstat (limited to 'src/test/java/pl/edu/mimuw/cloudatlas/agent/MockEventBus.java')
-rw-r--r-- | src/test/java/pl/edu/mimuw/cloudatlas/agent/MockEventBus.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/java/pl/edu/mimuw/cloudatlas/agent/MockEventBus.java b/src/test/java/pl/edu/mimuw/cloudatlas/agent/MockEventBus.java new file mode 100644 index 0000000..e8f8bfa --- /dev/null +++ b/src/test/java/pl/edu/mimuw/cloudatlas/agent/MockEventBus.java @@ -0,0 +1,17 @@ +package pl.edu.mimuw.cloudatlas.agent; + +import java.util.concurrent.LinkedBlockingQueue; + +import pl.edu.mimuw.cloudatlas.agent.messages.AgentMessage; + +public class MockEventBus extends EventBus { + public LinkedBlockingQueue<AgentMessage> events; + + public MockEventBus() { + events = new LinkedBlockingQueue<AgentMessage>(); + } + + public void addMessage(AgentMessage msg) throws InterruptedException { + events.put(msg); + } +} |