|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
ctf.evaluation.TestCase
ctf.evaluation.simulator.setup.PlaceFlag
public class PlaceFlag
Tests the 'PlaceFlag' state
Constructor Summary | |
---|---|
PlaceFlag()
|
Method Summary | |
---|---|
protected void |
place(Connection connection,
double x,
double y)
Place a flag at an (x,y) location |
protected void |
place(Connection connection,
Point point)
Place a flag at a specific point |
void |
setUp()
Get into the PlaceFlag state |
void |
tearDown()
Tear down after a test |
void |
testBottomEdgeOfTheField()
Flags may not be placed within 1m of the edge of the field |
void |
testCentreLine()
Flags may not be placed within 1m of the centre line |
void |
testFlagOnEnemySide()
A team may not place a flag on the opposing side of the field |
void |
testFlagPlayerDistance()
Flags may not be placed within 25m of a player's starting position |
void |
testJail()
A flag may not be placed with 1m of a jail |
void |
testLeftEdgeOfTheField()
Flags may not be placed within 1m of the edge of the field |
void |
testNormalPlacement()
Flags are placed in default locations |
void |
testRightEdgeOfTheField()
Flags may not be placed within 1m of the edge of the field |
void |
testTopEdgeOfTheField()
Flags may not be placed within 1m of the edge of the field |
void |
testUnplacedFlag()
If a team's flag has not been placed, the other team should still be able to poll for the current game state; the game time will just be 0. |
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 |
Constructor Detail |
---|
public PlaceFlag()
Method Detail |
---|
public void setUp() throws java.io.IOException, NetworkException, ProtocolError
setUp
in class TestCase
java.io.IOException
NetworkException
ProtocolError
public void tearDown()
tearDown
in class TestCase
public void testNormalPlacement() throws java.io.IOException, NetworkException, ProtocolError, RoundOverException, GameOverException
java.io.IOException
NetworkException
ProtocolError
RoundOverException
GameOverException
public void testUnplacedFlag() throws java.io.IOException, NetworkException, ProtocolError, RoundOverException, GameOverException
java.io.IOException
NetworkException
ProtocolError
RoundOverException
GameOverException
public void testLeftEdgeOfTheField() throws java.io.IOException, NetworkException, ProtocolError
java.io.IOException
NetworkException
ProtocolError
public void testBottomEdgeOfTheField() throws java.io.IOException, NetworkException, ProtocolError
java.io.IOException
NetworkException
ProtocolError
public void testTopEdgeOfTheField() throws java.io.IOException, NetworkException, ProtocolError
java.io.IOException
NetworkException
ProtocolError
public void testRightEdgeOfTheField() throws java.io.IOException, NetworkException, ProtocolError
java.io.IOException
NetworkException
ProtocolError
public void testCentreLine() throws java.io.IOException, NetworkException, ProtocolError
java.io.IOException
NetworkException
ProtocolError
public void testFlagPlayerDistance() throws java.io.IOException, NetworkException, ProtocolError
java.io.IOException
NetworkException
ProtocolError
public void testFlagOnEnemySide() throws java.io.IOException, NetworkException, ProtocolError
java.io.IOException
NetworkException
ProtocolError
public void testJail() throws java.io.IOException, NetworkException, ProtocolError
java.io.IOException
NetworkException
ProtocolError
protected void place(Connection connection, Point point) throws java.io.IOException, NetworkException
java.io.IOException
NetworkException
protected void place(Connection connection, double x, double y) throws java.io.IOException, NetworkException
java.io.IOException
NetworkException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |