FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.controller.TestWhitePages Class Reference
Inheritance diagram for frodo2.controller.TestWhitePages:

Classes

class  WhitePagesExtention
 Extention of the white pages that enables one to get the list of daemons, the list of agents and the local address of the white pages. More...

Public Member Functions

 TestWhitePages ()
 a simple constructor
 TestWhitePages (String name)
void setUp () throws Exception
void tearDown ()
void testDaemonReporting () throws Exception
 Test that a daemon that reports is handeled correctly.
void testAgentReporting () throws InterruptedException
 Test that an agent that reports is handeled correctly.
void testKillAllAgents () throws InterruptedException
 Test that when all agents should be killed they are removed from the list of agents.

Package Attributes

WhitePagesExtention whitePage
 The white pages.
Queue queue
 Queue that handles all the messages.
QueueInputPipeInterface input
 An input pipe to test the sending of message to the daemon.

Detailed Description

Author
Brammert Ottens
Thomas Leaute

A JUnit test class for the white pages

Constructor & Destructor Documentation

◆ TestWhitePages() [1/2]

frodo2.controller.TestWhitePages.TestWhitePages ( )

a simple constructor

Todo
Auto-generated constructor stub

◆ TestWhitePages() [2/2]

frodo2.controller.TestWhitePages.TestWhitePages ( String name)
Parameters
namethe name of the test method
Todo
Auto-generated constructor stub

Member Function Documentation

◆ setUp()

void frodo2.controller.TestWhitePages.setUp ( ) throws Exception
See also
junit.framework.TestCase#setUp()

References frodo2.communication.PipeFactory.getSelfAddress(), input, frodo2.communication.PipeFactory.inputPipe(), frodo2.controller.Controller.PipeFactoryInstance, queue, and whitePage.

Here is the call graph for this function:

◆ tearDown()

void frodo2.controller.TestWhitePages.tearDown ( )
See also
junit.framework.TestCase#tearDown()

References input, queue, and whitePage.

◆ testAgentReporting()

void frodo2.controller.TestWhitePages.testAgentReporting ( ) throws InterruptedException

Test that an agent that reports is handeled correctly.

Exceptions
InterruptedExceptionif the thread is interrupted while sleeping

References frodo2.controller.messages.MessageAgentReporting.AGENT_REPORTING, frodo2.communication.PipeFactory.getSelfAddress(), frodo2.controller.Controller.PipeFactoryInstance, queue, and whitePage.

Here is the call graph for this function:

◆ testDaemonReporting()

void frodo2.controller.TestWhitePages.testDaemonReporting ( ) throws Exception

Test that a daemon that reports is handeled correctly.

Exceptions
Exceptionif an error occurs

References frodo2.controller.messages.MessageAgentReporting.DEAMON_REPORTING, frodo2.communication.PipeFactory.getSelfAddress(), frodo2.communication.PipeFactory.inputPipe(), frodo2.controller.Controller.PipeFactoryInstance, queue, testDaemonReporting(), and whitePage.

Referenced by testDaemonReporting().

Here is the call graph for this function:

◆ testKillAllAgents()

void frodo2.controller.TestWhitePages.testKillAllAgents ( ) throws InterruptedException

Test that when all agents should be killed they are removed from the list of agents.

Exceptions
InterruptedExceptionif the thread is interrupted while sleeping

References frodo2.controller.messages.MessageAgentReporting.AGENT_REPORTING, frodo2.controller.messages.MessageAgentReporting.DEAMON_REPORTING, frodo2.communication.PipeFactory.getSelfAddress(), frodo2.controller.ConfigurationManager.KILL_ALL_AGENTS, frodo2.controller.Controller.PipeFactoryInstance, queue, and whitePage.

Here is the call graph for this function:

Member Data Documentation

◆ input

QueueInputPipeInterface frodo2.controller.TestWhitePages.input
package

An input pipe to test the sending of message to the daemon.

Referenced by setUp(), and tearDown().

◆ queue

Queue frodo2.controller.TestWhitePages.queue
package

Queue that handles all the messages.

Referenced by setUp(), tearDown(), testAgentReporting(), testDaemonReporting(), and testKillAllAgents().

◆ whitePage

WhitePagesExtention frodo2.controller.TestWhitePages.whitePage
package

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