FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.communication.mailer.tests.testCentralMailer Class Reference

Test suite for the CentralMailer. More...

Inheritance diagram for frodo2.communication.mailer.tests.testCentralMailer:

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< MessageTypegetMsgTypes ()
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.

Detailed Description

Test suite for the CentralMailer.

Author
Brammert Ottens, Thomas Leaute

Constructor & Destructor Documentation

◆ testCentralMailer()

frodo2.communication.mailer.tests.testCentralMailer.testCentralMailer ( )

Constructor.

Referenced by suite().

Member Function Documentation

◆ getMsgTypes()

Collection< MessageType > frodo2.communication.mailer.tests.testCentralMailer.getMsgTypes ( )

◆ notifyIn()

◆ setQueue()

void frodo2.communication.mailer.tests.testCentralMailer.setQueue ( Queue queue)

◆ setUp()

void frodo2.communication.mailer.tests.testCentralMailer.setUp ( ) throws Exception
protected
See also
junit.framework.TestCase#setUp()

References mailman, and messagesReceived.

◆ suite()

TestSuite frodo2.communication.mailer.tests.testCentralMailer.suite ( )
static
Returns
the test suite

References testCentralMailer().

Referenced by frodo2.communication.AllTests.suite().

Here is the call graph for this function:

◆ tearDown()

void frodo2.communication.mailer.tests.testCentralMailer.tearDown ( ) throws Exception
protected
See also
junit.framework.TestCase#tearDown()

References mailman.

◆ testNext()

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.

Author
Brammert Ottens, 15 jun 2009

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().

Here is the call graph for this function:

Member Data Documentation

◆ last

MessageWrapper frodo2.communication.mailer.tests.testCentralMailer.last
private

The last message received.

Referenced by notifyIn().

◆ mailman

CentralMailer frodo2.communication.mailer.tests.testCentralMailer.mailman
private

The CentralMailer.

Referenced by setUp(), tearDown(), and testNext().

◆ messagesReceived

int frodo2.communication.mailer.tests.testCentralMailer.messagesReceived
private

Count the number of messages received.

Referenced by notifyIn(), and setUp().

◆ queue

Queue frodo2.communication.mailer.tests.testCentralMailer.queue
private

The listener's queue.

Referenced by notifyIn(), and setQueue().

◆ RANDOM_MSG_TYPE

final MessageType frodo2.communication.mailer.tests.testCentralMailer.RANDOM_MSG_TYPE = MessageType.SYSTEM.newChild("testCentralMailer", "Random message")
static

The type of a random message.

Referenced by getMsgTypes(), notifyIn(), and testNext().


The documentation for this class was generated from the following file: