Polishing test cases.

This commit is contained in:
lotodore
2010-11-13 12:36:22 +00:00
parent c583d19002
commit 55f7bb7132
6 changed files with 151 additions and 31 deletions
+13
View File
@@ -54,6 +54,7 @@ public abstract class TestBase {
@Before
public void setUp() throws Exception {
Thread.sleep(2000);
InetAddress localaddr = InetAddress.getLocalHost();
sock = new Socket(localaddr, 7234);
encoder = CoderFactory.getInstance().newEncoder("BER");
@@ -118,6 +119,12 @@ public abstract class TestBase {
failOnErrorMessage(msg);
fail("Invalid message.");
}
// Waiting for player list update.
msg = receiveMessage();
if (!msg.isPlayerListMessageSelected()) {
failOnErrorMessage(msg);
fail("Invalid message.");
}
}
public void userInit() throws Exception {
@@ -180,6 +187,12 @@ public abstract class TestBase {
failOnErrorMessage(msg);
fail("Invalid message.");
}
// Waiting for player list update.
msg = receiveMessage();
if (!msg.isPlayerListMessageSelected()) {
failOnErrorMessage(msg);
fail("Invalid message.");
}
}
public PokerTHMessage createJoinGameRequestMsg(NetGameInfo gameInfo, NetGameTypeEnumType.EnumType type, int playerActionTimeout, int guiSpeed, String password) {