ctf.evaluation.simulator.play
Class PlayTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by ctf.evaluation.TestCase
              extended by ctf.evaluation.simulator.play.PlayTestCase
All Implemented Interfaces:
junit.framework.Test

public class PlayTestCase
extends TestCase


Field Summary
protected  Connection blue
          Controller connections
protected  Connection red
          Controller connections
protected static int SLEEP_TIME
          How long to wait between "getState" requests (in ms)
 
Constructor Summary
PlayTestCase()
           
 
Method Summary
protected  void assertInvisible(HasVisibility object)
          An object should be invisible - and located at (0,0)
protected  void assertVisible(HasVisibility object)
          An object should be visible - and located at 'location'
protected  void assertVisible(HasVisibility object, Point location)
          An object should be visible - and located at 'location'
 void setUp()
          Initialize the field with tree, flag and player locations.
 void tearDown()
           
protected  void turnTo(Connection connection, Side side, int player, double turnTo)
          Turn a player to a heading
 
Methods inherited from class ctf.evaluation.TestCase
assertClose, assertClose, assertClose, assertClose, assertClose, assertClose, assertClose, assertCloseAbsolute, sleep
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

red

protected Connection red
Controller connections


blue

protected Connection blue
Controller connections


SLEEP_TIME

protected static final int SLEEP_TIME
How long to wait between "getState" requests (in ms)

See Also:
Constant Field Values
Constructor Detail

PlayTestCase

public PlayTestCase()
Method Detail

setUp

public void setUp()
           throws java.io.IOException,
                  NetworkException,
                  ProtocolError
Initialize the field with tree, flag and player locations.

Overrides:
setUp in class TestCase
Throws:
java.io.IOException
NetworkException
ProtocolError

tearDown

public void tearDown()
              throws java.io.IOException,
                     NetworkException
Overrides:
tearDown in class TestCase
Throws:
java.io.IOException
NetworkException

assertInvisible

protected void assertInvisible(HasVisibility object)
An object should be invisible - and located at (0,0)


assertVisible

protected void assertVisible(HasVisibility object)
An object should be visible - and located at 'location'


assertVisible

protected void assertVisible(HasVisibility object,
                             Point location)
An object should be visible - and located at 'location'


turnTo

protected void turnTo(Connection connection,
                      Side side,
                      int player,
                      double turnTo)
               throws java.io.IOException,
                      NetworkException,
                      ProtocolError,
                      RoundOverException,
                      GameOverException
Turn a player to a heading

Throws:
java.io.IOException
NetworkException
ProtocolError
RoundOverException
GameOverException