LightVoting
 All Classes Namespaces Files Functions Variables Pages
org.lightvoting.simulation.agent.CVotingAgentTest Class Reference

Unit test for CVotingAgent. More...

Inherits TestCase.

+ Collaboration diagram for org.lightvoting.simulation.agent.CVotingAgentTest:

Public Member Functions

 CVotingAgentTest (final String p_testName)
 Create the test case. More...
 
void testCVotingAgent ()
 Testing CVotingAgent Class. More...
 

Static Public Member Functions

static Test suite ()
 Testsuite. More...
 

Detailed Description

Definition at line 37 of file CVotingAgentTest.java.

Constructor & Destructor Documentation

org.lightvoting.simulation.agent.CVotingAgentTest.CVotingAgentTest ( final String  p_testName)
Parameters
p_testNamename of the test case

Definition at line 44 of file CVotingAgentTest.java.

45  {
46  super( p_testName );
47  }

Member Function Documentation

static Test org.lightvoting.simulation.agent.CVotingAgentTest.suite ( )
static
Returns
the suite of tests being tested

Definition at line 54 of file CVotingAgentTest.java.

55  {
56  return new TestSuite( CVotingAgentTest.class );
57  }
CVotingAgentTest(final String p_testName)
Create the test case.
void org.lightvoting.simulation.agent.CVotingAgentTest.testCVotingAgent ( )

Definition at line 66 of file CVotingAgentTest.java.

67  {
68  try
69  {
70  final CChairAgent l_chairAgent = new CChairAgent( "chair", new CDefaultAgentConfiguration<>(), new CEnvironment( 23, "foo.h5" ),
71  "RANDOM",
72  "BASIC",
73  "foo.h5"
74  );
75  final CVotingAgent l_agent = new CVotingAgent( "agent", new CDefaultAgentConfiguration<>(), l_chairAgent, new CEnvironment( 23, "foo.h5" ), 10,
76  "RANDOM",
77  "foo.h5"
78  );
79  l_agent.call();
80  }
81  catch ( final Exception l_exception )
82  {
83  l_exception.printStackTrace();
84  }
85  }