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

A JUnit test class for the configuration manager. More...

Inheritance diagram for frodo2.controller.TestConfigurationManager:

Classes

class  SimpleDaemonListener
 A simple class that listens for messages sent to a daemon. More...

Public Member Functions

void setUp () throws Exception
void tearDown ()
void testParseConfigurationFile1 () throws Exception
 Tests the parsing of the configuration file with certain parameters omitted.
void testParseConfigurationFile2 () throws Exception
 Tests the parsing of a configuration file with all the options specified.
void testStartExperiment () throws Exception
 Tests starting an experiment.
void testStartExperimentNCCCs () throws Exception
 Tests starting an experiment with NCCCs.
void testStartExperiment (boolean countNCCCs) throws Exception
 Tests starting an experiment.

Static Public Attributes

static AgentAddress address = Controller.PipeFactoryInstance.getSelfAddress(4444)
 The address of the agent to be used.

Private Attributes

Controller control
 This controller is only used to be able to create a Configuration manager.
ConfigurationManager configManager
 A configuration manager, it handles the configuration file.
SimpleDaemonListener daemonListener
 A simple daemon.
WhitePages whitePage
 The white pages.
Queue queue
 Queue that handles all the messages.
QueueInputPipeInterface input
 An input pipe to test the sending of messages to the daemon.

Static Private Attributes

static String testDir = TestConfigurationManager.class.getResource("testFiles").getFile() + "/"
 Directory containing the test files.

Detailed Description

A JUnit test class for the configuration manager.

Author
Brammert Ottens
Thomas Leaute

Member Function Documentation

◆ setUp()

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

References address, configManager, control, input, frodo2.communication.PipeFactory.inputPipe(), frodo2.controller.Controller.PipeFactoryInstance, queue, testDir, and whitePage.

Here is the call graph for this function:

◆ tearDown()

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

References control, input, queue, and whitePage.

◆ testParseConfigurationFile1()

void frodo2.controller.TestConfigurationManager.testParseConfigurationFile1 ( ) throws Exception

Tests the parsing of the configuration file with certain parameters omitted.

These should be set to default values.

Exceptions
Exceptionif an error occurs

References configManager, daemonListener, queue, and testDir.

◆ testParseConfigurationFile2()

void frodo2.controller.TestConfigurationManager.testParseConfigurationFile2 ( ) throws Exception

Tests the parsing of a configuration file with all the options specified.

Exceptions
Exceptionif an error occurs

References configManager, daemonListener, queue, and testDir.

◆ testStartExperiment() [1/2]

void frodo2.controller.TestConfigurationManager.testStartExperiment ( ) throws Exception

Tests starting an experiment.

Exceptions
Exceptionif an error occurs

References testStartExperiment().

Referenced by testStartExperiment(), and testStartExperimentNCCCs().

Here is the call graph for this function:

◆ testStartExperiment() [2/2]

void frodo2.controller.TestConfigurationManager.testStartExperiment ( boolean countNCCCs) throws Exception

Tests starting an experiment.

Parameters
countNCCCswhether we should count NCCCs
Exceptions
Exceptionif an error occurs

References address, configManager, daemonListener, frodo2.controller.messages.MessageAgentReporting.DEAMON_REPORTING, queue, frodo2.controller.userIO.UserIO.START_MSG, and testDir.

◆ testStartExperimentNCCCs()

void frodo2.controller.TestConfigurationManager.testStartExperimentNCCCs ( ) throws Exception

Tests starting an experiment with NCCCs.

Exceptions
Exceptionif an error occurs

References testStartExperiment().

Here is the call graph for this function:

Member Data Documentation

◆ address

AgentAddress frodo2.controller.TestConfigurationManager.address = Controller.PipeFactoryInstance.getSelfAddress(4444)
static

◆ configManager

ConfigurationManager frodo2.controller.TestConfigurationManager.configManager
private

A configuration manager, it handles the configuration file.

Referenced by setUp(), testParseConfigurationFile1(), testParseConfigurationFile2(), and testStartExperiment().

◆ control

Controller frodo2.controller.TestConfigurationManager.control
private

This controller is only used to be able to create a Configuration manager.

Referenced by setUp(), and tearDown().

◆ daemonListener

SimpleDaemonListener frodo2.controller.TestConfigurationManager.daemonListener
private

◆ input

QueueInputPipeInterface frodo2.controller.TestConfigurationManager.input
private

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

Referenced by setUp(), and tearDown().

◆ queue

Queue frodo2.controller.TestConfigurationManager.queue
private

◆ testDir

String frodo2.controller.TestConfigurationManager.testDir = TestConfigurationManager.class.getResource("testFiles").getFile() + "/"
staticprivate

Directory containing the test files.

Must end with a slash.

Referenced by setUp(), testParseConfigurationFile1(), testParseConfigurationFile2(), and testStartExperiment().

◆ whitePage

WhitePages frodo2.controller.TestConfigurationManager.whitePage
private

The white pages.

Referenced by setUp(), and tearDown().


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