|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object TestCase com.bolinfest.prisonerbot.ManagerTest
public class ManagerTest
ManagerTest
is a JUnit test of the Manager
interface.
Nested Class Summary | |
---|---|
protected static class |
ManagerTest.NullProxy
NullProxy is a MessageProxy that
simulates sending messages online. |
Field Summary | |
---|---|
protected Buddy |
b1
|
protected static String |
B1
|
protected Buddy |
b2
|
protected static String |
B2
|
protected Manager |
mgr
|
protected static String[] |
NAMES
|
protected static String |
NO
|
protected static String |
YES
|
Constructor Summary | |
---|---|
ManagerTest()
|
Method Summary | |
---|---|
protected static Buddy |
createBuddy(String name,
Manager mgr,
ManagerTest.NullProxy proxy)
|
protected static boolean |
msgContains(String longMessage,
String subMessage)
|
protected static void |
sendChoices(Buddy b1,
Buddy b2,
Choice c1,
Choice c2)
|
protected void |
setUp()
Create a Manager to test and some Players |
protected void |
tearDown()
|
void |
testFourRoundGame()
|
void |
testOnePlayerNoGame()
Makes sure one player can: chat with the manager get help refuse a game |
void |
testOnePlayerWaitGame()
Tests that two players can introduce themselves to the bot and start to negotiate the number of rounds. |
void |
testPlayerNegotiatingRounds()
Players should be able to negotiate rounds and the Manager should be able to handle erroneous input |
void |
testStripHtml()
|
void |
testZeroPlayers()
Make sure manager is initialized correctly. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Manager mgr
protected Buddy b1
protected Buddy b2
protected static final String B1
protected static final String B2
protected static String[] NAMES
protected static final String YES
protected static final String NO
Constructor Detail |
---|
public ManagerTest()
Method Detail |
---|
protected void setUp() throws Exception
Exception
protected void tearDown() throws Exception
Exception
protected static Buddy createBuddy(String name, Manager mgr, ManagerTest.NullProxy proxy)
public void testStripHtml()
public void testZeroPlayers()
public void testOnePlayerNoGame()
public void testOnePlayerWaitGame()
public void testPlayerNegotiatingRounds()
public void testFourRoundGame()
protected static void sendChoices(Buddy b1, Buddy b2, Choice c1, Choice c2)
protected static boolean msgContains(String longMessage, String subMessage)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |