|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
A JUnit class to test Queue. More...

Classes | |
| class | QueueInputPipeTrivial |
| This pipe has a list of messages ready to be pulled using pullMessage(). More... | |
| class | QueueOutputPipeTrivial |
| This pipe stores the messages passed to it using pushObject(). More... | |
| class | ConstantMsgPolicy |
| A message policy that always returns the same decision. More... | |
Public Member Functions | |
| QueueTest (String method) | |
| Generates a test using only the input test method. | |
| void | setUp () |
| void | tearDown () |
| void | testForward () |
| Tests the forwarding of a message. | |
| void | testDiscard () throws InterruptedException |
| Tests the discarding of a message. | |
| void | testForwardByType () throws InterruptedException |
| Tests the forwarding of a message of a specific type. | |
| void | testForwardSerialized () |
| Tests the forwarding of a serialized message. | |
| void | testMultipleForward () |
| Tests the forwarding of multiple messages. | |
| void | testMultipleInputPipes () |
| Tests a queue with two input pipes. | |
| void | testSendToSelf () |
| Tests the sending of a message to itself. | |
| void | testSendToMultiple () |
| Tests the sending of a message to all known recipients (except the queue itself). | |
| void | testSendMessageOrder () |
| Tests that sequential calls to sendMessage() result in the message being sent in the correct order. | |
| void | testSendMessageMultiple () |
| Tests that sequential calls to sendMessage() on the same Message object actually send the message multiple times, not just once. | |
| void | testOutgoingListener () throws InterruptedException |
| Tests that outgoing message listeners get notified. | |
Static Public Member Functions | |
| static TestSuite | suite () |
Protected Attributes | |
| QueueOutputPipeTrivial | output |
| The output pipe used for the tests. | |
| QueueInputPipeTrivial | input |
| The input pipe used for the tests. | |
| Queue | queue |
| The queue under test. | |
| ConstantMsgPolicy | decider |
| The incoming object policy used for the tests. | |
| frodo2.communication.QueueTest.QueueTest | ( | String | method | ) |
Generates a test using only the input test method.
| method | the test method |
Referenced by suite().
| void frodo2.communication.QueueTest.setUp | ( | ) |
|
static |
References QueueTest().
Referenced by frodo2.communication.AllTests.suite().

| void frodo2.communication.QueueTest.tearDown | ( | ) |
| void frodo2.communication.QueueTest.testDiscard | ( | ) | throws InterruptedException |
Tests the discarding of a message.
| InterruptedException | Necessary because it uses Thread.sleep() |
References input, output, and frodo2.communication.QueueTest.ConstantMsgPolicy.setForward().

| void frodo2.communication.QueueTest.testForward | ( | ) |
| void frodo2.communication.QueueTest.testForwardByType | ( | ) | throws InterruptedException |
Tests the forwarding of a message of a specific type.
| InterruptedException | Necessary because it uses Thread.sleep() |
References frodo2.communication.Message.getType(), input, output, queue, and frodo2.communication.QueueTest.ConstantMsgPolicy.setForward().

| void frodo2.communication.QueueTest.testForwardSerialized | ( | ) |
| void frodo2.communication.QueueTest.testMultipleForward | ( | ) |
| void frodo2.communication.QueueTest.testMultipleInputPipes | ( | ) |
Tests a queue with two input pipes.
References frodo2.communication.QueueTest.QueueInputPipeTrivial.addMessage(), decider, input, output, and queue.

| void frodo2.communication.QueueTest.testOutgoingListener | ( | ) | throws InterruptedException |
Tests that outgoing message listeners get notified.
| InterruptedException | Necessary because it uses Thread.sleep() |
References decider, frodo2.communication.OutgoingMsgPolicyInterface< T >.Decision.DISCARD, input, and output.
| void frodo2.communication.QueueTest.testSendMessageMultiple | ( | ) |
| void frodo2.communication.QueueTest.testSendMessageOrder | ( | ) |
| void frodo2.communication.QueueTest.testSendToMultiple | ( | ) |
Tests the sending of a message to all known recipients (except the queue itself).
References frodo2.communication.MessageWrapper.getMessage(), frodo2.communication.QueueTest.QueueOutputPipeTrivial.getNextMsgTimed(), output, and queue.

| void frodo2.communication.QueueTest.testSendToSelf | ( | ) |
|
protected |
The incoming object policy used for the tests.
Referenced by setUp(), tearDown(), testForwardSerialized(), testMultipleInputPipes(), testOutgoingListener(), and testSendToSelf().
|
protected |
The input pipe used for the tests.
Referenced by setUp(), tearDown(), testDiscard(), testForward(), testForwardByType(), testForwardSerialized(), testMultipleForward(), testMultipleInputPipes(), testOutgoingListener(), and testSendToSelf().
|
protected |
The output pipe used for the tests.
Referenced by setUp(), tearDown(), testDiscard(), testForward(), testForwardByType(), testForwardSerialized(), testMultipleForward(), testMultipleInputPipes(), testOutgoingListener(), testSendMessageMultiple(), testSendMessageOrder(), testSendToMultiple(), and testSendToSelf().
|
protected |
The queue under test.
Referenced by setUp(), tearDown(), testForwardByType(), testMultipleInputPipes(), testSendMessageMultiple(), testSendMessageOrder(), and testSendToMultiple().