|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.amis.tests.BaseTest
cz.cuni.amis.pogamut.emohawk.test.EmohawkTest
public class EmohawkTest
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
.
Don't forget to specify pogamut.unreal.home and pogamut.unreal.serverexec
variables.
UCCWrapper.getBotPort()
Field Summary | |
---|---|
protected String |
emohawkHome
If this is NOT null, it will be used. |
protected LogCategory |
log
|
static String[] |
MAPS
|
protected IAgentId |
testId
|
protected UCCWrapper |
ucc
|
protected boolean |
useInternalUcc
TRUE == use ucc executed through uccwrapper FALSE == use externaly executed instance |
Fields inherited from class cz.cuni.amis.tests.BaseTest |
---|
NEW_LINE |
Constructor Summary | |
---|---|
EmohawkTest()
|
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(UCCWrapperConfEmohawk 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 cz.cuni.amis.tests.BaseTest |
---|
assertFail, assertFalse, assertTrue, baseTestBeforeClass, getLogLevel, is32Bit, is64Bit, isLinux, isWindows, log, process, process, testFailed, testFailed, testOk |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static String[] MAPS
protected IAgentId testId
protected LogCategory log
protected UCCWrapper ucc
protected boolean useInternalUcc
protected String emohawkHome
Constructor Detail |
---|
public EmohawkTest()
Method Detail |
---|
public void startUCC(UCCWrapperConfEmohawk uccConf) throws UCCStartException
cz.cuni.amis.pogamut.ut2004.server.exceptions.UCCStartException
UCCStartException
public void endUcc()
public void beforeTest() throws UCCStartException
beforeTest
in class cz.cuni.amis.tests.BaseTest
UCCStartException
public void afterTest()
afterTest
in class cz.cuni.amis.tests.BaseTest
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 |