Adding test case for multiple rejoins.

This commit is contained in:
lotodore
2011-10-29 17:50:03 +00:00
parent 7798bd0f37
commit 63a6441908
4 changed files with 319 additions and 6 deletions
+13 -1
View File
@@ -1,5 +1,5 @@
/* PokerTH automated tests.
Copyright (C) 2010 Lothar May
Copyright (C) 2011 Lothar May
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@@ -270,6 +270,18 @@ public class RejoinGameTest extends TestBase {
assertEquals(firstPlayerIdAfterRejoin, msg.getPlayerIdChangedMessage().getValue().getNewPlayerId().getValue().longValue());
}
// Everyone should receive a "hand start message" now.
do {
msg = receiveMessage();
failOnErrorMessage(msg);
} while (!msg.isHandStartMessageSelected());
for (int i = 0; i < 9; i++) {
do {
msg = receiveMessage(s[i]);
failOnErrorMessage(msg);
} while (!msg.isHandStartMessageSelected());
}
for (int i = 0; i < 9; i++) {
s[i].close();
}