|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
Test suite for the CentralMailer. More...

Public Member Functions | |
| testCentralMailer () | |
| Constructor. | |
| void | testNext () |
| Tests whether a set of messages received in random order are released in the correct order, using the Next message. | |
| Collection< MessageType > | getMsgTypes () |
| void | notifyIn (Message msg) |
| void | setQueue (Queue queue) |
| Public Member Functions inherited from frodo2.communication.IncomingMsgPolicyInterface< T > | |
| default void | notifyIn (Message msg, Object toAgent) |
| Notifies the listener of an incoming message. | |
Static Public Member Functions | |
| static TestSuite | suite () |
Static Public Attributes | |
| static final MessageType | RANDOM_MSG_TYPE = MessageType.SYSTEM.newChild("testCentralMailer", "Random message") |
| The type of a random message. | |
Protected Member Functions | |
| void | setUp () throws Exception |
| void | tearDown () throws Exception |
Private Attributes | |
| MessageWrapper | last |
| The last message received. | |
| int | messagesReceived |
| Count the number of messages received. | |
| Queue | queue |
| The listener's queue. | |
| CentralMailer | mailman |
| The CentralMailer. | |
Test suite for the CentralMailer.
| frodo2.communication.mailer.tests.testCentralMailer.testCentralMailer | ( | ) |
Constructor.
Referenced by suite().
| Collection< MessageType > frodo2.communication.mailer.tests.testCentralMailer.getMsgTypes | ( | ) |
Implements frodo2.communication.MessageListener< T >.
References RANDOM_MSG_TYPE.
| void frodo2.communication.mailer.tests.testCentralMailer.notifyIn | ( | Message | msg | ) |
Implements frodo2.communication.IncomingMsgPolicyInterface< T >.
References frodo2.communication.MessageType.equals(), frodo2.communication.MessageWrapper.getTime(), frodo2.communication.Message.getType(), last, messagesReceived, queue, and RANDOM_MSG_TYPE.

| void frodo2.communication.mailer.tests.testCentralMailer.setQueue | ( | Queue | queue | ) |
Implements frodo2.communication.MessageListener< T >.
References queue.
|
protected |
References mailman, and messagesReceived.
|
static |
References testCentralMailer().
Referenced by frodo2.communication.AllTests.suite().

|
protected |
References mailman.
| void frodo2.communication.mailer.tests.testCentralMailer.testNext | ( | ) |
Tests whether a set of messages received in random order are released in the correct order, using the Next message.
References frodo2.communication.Queue.addIncomingMessagePolicy(), frodo2.communication.mailer.CentralMailer.execute(), mailman, frodo2.communication.sharedMemory.QueueIOPipe.pushMessage(), RANDOM_MSG_TYPE, frodo2.communication.MessageWrapper.setDestination(), and frodo2.communication.MessageWrapper.setTime().

|
private |
The last message received.
Referenced by notifyIn().
|
private |
The CentralMailer.
Referenced by setUp(), tearDown(), and testNext().
|
private |
Count the number of messages received.
Referenced by notifyIn(), and setUp().
|
private |
The listener's queue.
Referenced by notifyIn(), and setQueue().
|
static |
The type of a random message.
Referenced by getMsgTypes(), notifyIn(), and testNext().