|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.ut2004.test.UT2004Test
public class UT2004Test
Base class for tests that need a running UCC instance. If you inherit from
this class then before the first @Test method will be called the UCC server
will be executed. The ports where it is listening can be obtained by
ucc.getGbPort()
and ucc.getControlPort()
calls.
Don't forget to specify pogamut.unreal.home and pogamut.unreal.serverexec
variables.
Field Summary | |
---|---|
static String[] |
CTF_MAPS
|
static String[] |
DM_MAPS
|
protected LogCategory |
log
|
protected IAgentId |
testId
|
protected UCCWrapper |
ucc
|
protected String |
unrealHome
If not null will be used. |
protected boolean |
useInternalUcc
TRUE == use ucc executed through uccwrapper FALSE == use externaly executed instance |
Constructor Summary | |
---|---|
UT2004Test()
|
Method Summary | ||
---|---|---|
void |
afterTest()
Kills the UCC server and closes PogamutPlatform. |
|
protected boolean |
awaitAgentDown(AbstractAgent agent)
Waits till 'agent' changes its state to IAgentStateDown . |
|
protected boolean |
awaitAgentUp(AbstractAgent agent)
Waits till 'agent' changes its state to IAgentStateUp . |
|
void |
beforeTest()
Initialize UCC server. |
|
void |
endUcc()
|
|
protected
|
startAllUTBots(Class<T> controller,
UT2004BotParameters... params)
|
|
void |
startUCC(UCCWrapperConf uccConf)
Starts UCC server. |
|
protected
|
startUTBot(Class<T> controller)
Starts new bot in the environment. |
|
protected
|
startUTBot(Class<T> controller,
UT2004AgentParameters params)
Starts new bot in the environment with specified 'params'. |
|
protected IUT2004Observer |
startUTObserver(IAgentFactory<IUT2004Observer,IRemoteAgentParameters> factory)
Starts new UTServer. |
|
protected IUT2004Server |
startUTServer(IAgentFactory<IUT2004Server,IRemoteAgentParameters> factory)
Starts new UTServer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String[] CTF_MAPS
public static String[] DM_MAPS
protected IAgentId testId
protected LogCategory log
protected UCCWrapper ucc
protected boolean useInternalUcc
protected String unrealHome
Constructor Detail |
---|
public UT2004Test()
Method Detail |
---|
public void startUCC(UCCWrapperConf uccConf) throws UCCStartException
cz.cuni.amis.pogamut.ut2004.server.exceptions.UCCStartException
UCCStartException
public void endUcc()
public void beforeTest() throws UCCStartException
UCCStartException
public void afterTest()
protected boolean awaitAgentUp(AbstractAgent agent)
IAgentStateUp
.
60s timeout.
agent
-
protected boolean awaitAgentDown(AbstractAgent agent)
IAgentStateDown
.
60s timeout.
agent
-
protected <T extends IUT2004BotController> UT2004Bot startUTBot(Class<T> controller)
T
- controller
- controller that will be used for newly created bot
protected <T extends IUT2004BotController> UT2004Bot startUTBot(Class<T> controller, UT2004AgentParameters params)
T
- controller
- controller that will be used for newly created bot
protected <T extends IUT2004BotController> List<UT2004Bot> startAllUTBots(Class<T> controller, UT2004BotParameters... params)
protected IUT2004Server startUTServer(IAgentFactory<IUT2004Server,IRemoteAgentParameters> factory)
T
-
protected IUT2004Observer startUTObserver(IAgentFactory<IUT2004Observer,IRemoteAgentParameters> factory)
T
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |