24 package org.lightvoting.simulation.agent;
27 import junit.framework.Test;
28 import junit.framework.TestCase;
29 import junit.framework.TestSuite;
30 import org.lightjason.agentspeak.agent.IAgent;
34 import java.io.ByteArrayInputStream;
35 import java.io.InputStream;
37 import java.util.stream.Collectors;
72 final InputStream l_aslstream =
new ByteArrayInputStream(
73 "!main.\n+!main.".getBytes(
"UTF-8" )
79 final Set<CVotingAgent> l_agents =
new
81 CVotingAgent.CVotingAgentGenerator( l_sendaction, l_aslstream,
new CEnvironment( 23,
"foo.h5" ), 10,
"RANDOM",
"foo.h5" )
82 .generatemultiple( 23,
new CChairAgent.CChairAgentGenerator( l_aslstream,
new CEnvironment( 23,
"foo.h5" ),
"RANDOM",
"BASIC",
85 .collect( Collectors.toSet() );
87 assertEquals( 23, l_agents.size() );
89 l_agents.forEach( i ->
92 assertTrue( i instanceof IAgent );
95 catch (
final Exception l_exception )
97 l_exception.printStackTrace();
Created by sophie on 22.02.17.
CVotingAgentGeneratorTest(final String p_testName)
Create the test case.
Created by sophie on 21.02.17.
static Test suite()
Testsuite.
Action to send messages for communication.
void testCVotingAgent()
Testing CVotingAgent Class.
BDI agent with voting capabilities.
Unit test for CVotingAgentGenerator.