Updating protocol files for tests.
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
|
||||
package pokerth_protocol;
|
||||
//
|
||||
// This file was generated by the BinaryNotes compiler.
|
||||
// See http://bnotes.sourceforge.net
|
||||
// Any modifications to this file will be lost upon recompilation of the source ASN.1.
|
||||
//
|
||||
|
||||
import org.bn.*;
|
||||
import org.bn.annotations.*;
|
||||
import org.bn.annotations.constraints.*;
|
||||
import org.bn.coders.*;
|
||||
import org.bn.types.*;
|
||||
|
||||
|
||||
|
||||
|
||||
@ASN1PreparedElement
|
||||
@ASN1BoxedType ( name = "AmountOfMoney" )
|
||||
public class AmountOfMoney implements IASN1PreparedElement {
|
||||
|
||||
@ASN1Integer( name = "AmountOfMoney" )
|
||||
@ASN1ValueRangeConstraint (
|
||||
|
||||
min = 0L,
|
||||
|
||||
max = 10000000L
|
||||
|
||||
)
|
||||
|
||||
private Integer value;
|
||||
|
||||
public AmountOfMoney() {
|
||||
}
|
||||
|
||||
public AmountOfMoney(Integer value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public void setValue(Integer value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public void initWithDefaults() {
|
||||
}
|
||||
|
||||
private static IASN1PreparedElementData preparedData = CoderFactory.getInstance().newPreparedElementData(AmountOfMoney.class);
|
||||
public IASN1PreparedElementData getPreparedData() {
|
||||
return preparedData;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -23,31 +23,15 @@ import org.bn.types.*;
|
||||
|
||||
private NonZeroId playerId = null;
|
||||
|
||||
@ASN1Integer( name = "" )
|
||||
@ASN1ValueRangeConstraint (
|
||||
|
||||
min = 0L,
|
||||
|
||||
max = 10000000L
|
||||
|
||||
)
|
||||
|
||||
|
||||
@ASN1Element ( name = "moneyWon", isOptional = false , hasTag = false , hasDefaultValue = false )
|
||||
|
||||
private Integer moneyWon = null;
|
||||
private AmountOfMoney moneyWon = null;
|
||||
|
||||
@ASN1Integer( name = "" )
|
||||
@ASN1ValueRangeConstraint (
|
||||
|
||||
min = 0L,
|
||||
|
||||
max = 10000000L
|
||||
|
||||
)
|
||||
|
||||
|
||||
@ASN1Element ( name = "playerMoney", isOptional = false , hasTag = false , hasDefaultValue = false )
|
||||
|
||||
private Integer playerMoney = null;
|
||||
private AmountOfMoney playerMoney = null;
|
||||
|
||||
|
||||
|
||||
@@ -63,25 +47,25 @@ import org.bn.types.*;
|
||||
|
||||
|
||||
|
||||
public Integer getMoneyWon () {
|
||||
public AmountOfMoney getMoneyWon () {
|
||||
return this.moneyWon;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setMoneyWon (Integer value) {
|
||||
public void setMoneyWon (AmountOfMoney value) {
|
||||
this.moneyWon = value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Integer getPlayerMoney () {
|
||||
public AmountOfMoney getPlayerMoney () {
|
||||
return this.playerMoney;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setPlayerMoney (Integer value) {
|
||||
public void setPlayerMoney (AmountOfMoney value) {
|
||||
this.playerMoney = value;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
|
||||
package pokerth_protocol;
|
||||
//
|
||||
// This file was generated by the BinaryNotes compiler.
|
||||
// See http://bnotes.sourceforge.net
|
||||
// Any modifications to this file will be lost upon recompilation of the source ASN.1.
|
||||
//
|
||||
|
||||
import org.bn.*;
|
||||
import org.bn.annotations.*;
|
||||
import org.bn.annotations.constraints.*;
|
||||
import org.bn.coders.*;
|
||||
import org.bn.types.*;
|
||||
|
||||
|
||||
|
||||
|
||||
@ASN1PreparedElement
|
||||
@ASN1BoxedType ( name = "InitialAmountOfMoney" )
|
||||
public class InitialAmountOfMoney implements IASN1PreparedElement {
|
||||
|
||||
@ASN1Integer( name = "InitialAmountOfMoney" )
|
||||
@ASN1ValueRangeConstraint (
|
||||
|
||||
min = 0L,
|
||||
|
||||
max = 1000000L
|
||||
|
||||
)
|
||||
|
||||
private Integer value;
|
||||
|
||||
public InitialAmountOfMoney() {
|
||||
}
|
||||
|
||||
public InitialAmountOfMoney(Integer value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public void setValue(Integer value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public void initWithDefaults() {
|
||||
}
|
||||
|
||||
private static IASN1PreparedElementData preparedData = CoderFactory.getInstance().newPreparedElementData(InitialAmountOfMoney.class);
|
||||
public IASN1PreparedElementData getPreparedData() {
|
||||
return preparedData;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
|
||||
package pokerth_protocol;
|
||||
//
|
||||
// This file was generated by the BinaryNotes compiler.
|
||||
// See http://bnotes.sourceforge.net
|
||||
// Any modifications to this file will be lost upon recompilation of the source ASN.1.
|
||||
//
|
||||
|
||||
import org.bn.*;
|
||||
import org.bn.annotations.*;
|
||||
import org.bn.annotations.constraints.*;
|
||||
import org.bn.coders.*;
|
||||
import org.bn.types.*;
|
||||
|
||||
|
||||
|
||||
|
||||
@ASN1PreparedElement
|
||||
@ASN1BoxedType ( name = "InitialNonZeroAmountOfMoney" )
|
||||
public class InitialNonZeroAmountOfMoney implements IASN1PreparedElement {
|
||||
|
||||
@ASN1Integer( name = "InitialNonZeroAmountOfMoney" )
|
||||
@ASN1ValueRangeConstraint (
|
||||
|
||||
min = 1L,
|
||||
|
||||
max = 1000000L
|
||||
|
||||
)
|
||||
|
||||
private Integer value;
|
||||
|
||||
public InitialNonZeroAmountOfMoney() {
|
||||
}
|
||||
|
||||
public InitialNonZeroAmountOfMoney(Integer value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public void setValue(Integer value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public void initWithDefaults() {
|
||||
}
|
||||
|
||||
private static IASN1PreparedElementData preparedData = CoderFactory.getInstance().newPreparedElementData(InitialNonZeroAmountOfMoney.class);
|
||||
public IASN1PreparedElementData getPreparedData() {
|
||||
return preparedData;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -44,18 +44,10 @@ import org.bn.types.*;
|
||||
|
||||
private NetPlayerAction myAction = null;
|
||||
|
||||
@ASN1Integer( name = "" )
|
||||
@ASN1ValueRangeConstraint (
|
||||
|
||||
min = 0L,
|
||||
|
||||
max = 10000000L
|
||||
|
||||
)
|
||||
|
||||
|
||||
@ASN1Element ( name = "myRelativeBet", isOptional = false , hasTag = false , hasDefaultValue = false )
|
||||
|
||||
private Integer myRelativeBet = null;
|
||||
private AmountOfMoney myRelativeBet = null;
|
||||
|
||||
|
||||
|
||||
@@ -107,13 +99,13 @@ import org.bn.types.*;
|
||||
|
||||
|
||||
|
||||
public Integer getMyRelativeBet () {
|
||||
public AmountOfMoney getMyRelativeBet () {
|
||||
return this.myRelativeBet;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setMyRelativeBet (Integer value) {
|
||||
public void setMyRelativeBet (AmountOfMoney value) {
|
||||
this.myRelativeBet = value;
|
||||
}
|
||||
|
||||
|
||||
@@ -295,34 +295,17 @@ import org.bn.types.*;
|
||||
|
||||
private Integer firstSmallBlind = null;
|
||||
|
||||
@ASN1Integer( name = "" )
|
||||
@ASN1ValueRangeConstraint (
|
||||
|
||||
min = 0L,
|
||||
|
||||
max = 1000000L
|
||||
|
||||
)
|
||||
|
||||
|
||||
@ASN1Element ( name = "endRaiseSmallBlindValue", isOptional = false , hasTag = false , hasDefaultValue = false )
|
||||
|
||||
private Integer endRaiseSmallBlindValue = null;
|
||||
private InitialAmountOfMoney endRaiseSmallBlindValue = null;
|
||||
|
||||
@ASN1Integer( name = "" )
|
||||
@ASN1ValueRangeConstraint (
|
||||
|
||||
min = 1L,
|
||||
|
||||
max = 1000000L
|
||||
|
||||
)
|
||||
|
||||
|
||||
@ASN1Element ( name = "startMoney", isOptional = false , hasTag = false , hasDefaultValue = false )
|
||||
|
||||
private Integer startMoney = null;
|
||||
private InitialNonZeroAmountOfMoney startMoney = null;
|
||||
|
||||
@ASN1Integer( name = "" )
|
||||
|
||||
|
||||
@ASN1SequenceOf( name = "manualBlinds", isSetOf = false )
|
||||
|
||||
@ASN1ValueRangeConstraint (
|
||||
@@ -335,7 +318,7 @@ import org.bn.types.*;
|
||||
|
||||
@ASN1Element ( name = "manualBlinds", isOptional = false , hasTag = false , hasDefaultValue = false )
|
||||
|
||||
private java.util.Collection<Integer> manualBlinds = null;
|
||||
private java.util.Collection<InitialNonZeroAmountOfMoney> manualBlinds = null;
|
||||
|
||||
|
||||
|
||||
@@ -447,37 +430,37 @@ import org.bn.types.*;
|
||||
|
||||
|
||||
|
||||
public Integer getEndRaiseSmallBlindValue () {
|
||||
public InitialAmountOfMoney getEndRaiseSmallBlindValue () {
|
||||
return this.endRaiseSmallBlindValue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setEndRaiseSmallBlindValue (Integer value) {
|
||||
public void setEndRaiseSmallBlindValue (InitialAmountOfMoney value) {
|
||||
this.endRaiseSmallBlindValue = value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Integer getStartMoney () {
|
||||
public InitialNonZeroAmountOfMoney getStartMoney () {
|
||||
return this.startMoney;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setStartMoney (Integer value) {
|
||||
public void setStartMoney (InitialNonZeroAmountOfMoney value) {
|
||||
this.startMoney = value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public java.util.Collection<Integer> getManualBlinds () {
|
||||
public java.util.Collection<InitialNonZeroAmountOfMoney> getManualBlinds () {
|
||||
return this.manualBlinds;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setManualBlinds (java.util.Collection<Integer> value) {
|
||||
public void setManualBlinds (java.util.Collection<InitialNonZeroAmountOfMoney> value) {
|
||||
this.manualBlinds = value;
|
||||
}
|
||||
|
||||
|
||||
@@ -50,31 +50,15 @@ import org.bn.types.*;
|
||||
|
||||
private Long cardsValue = null;
|
||||
|
||||
@ASN1Integer( name = "" )
|
||||
@ASN1ValueRangeConstraint (
|
||||
|
||||
min = 0L,
|
||||
|
||||
max = 10000000L
|
||||
|
||||
)
|
||||
|
||||
|
||||
@ASN1Element ( name = "moneyWon", isOptional = false , hasTag = false , hasDefaultValue = false )
|
||||
|
||||
private Integer moneyWon = null;
|
||||
private AmountOfMoney moneyWon = null;
|
||||
|
||||
@ASN1Integer( name = "" )
|
||||
@ASN1ValueRangeConstraint (
|
||||
|
||||
min = 0L,
|
||||
|
||||
max = 10000000L
|
||||
|
||||
)
|
||||
|
||||
|
||||
@ASN1Element ( name = "playerMoney", isOptional = false , hasTag = false , hasDefaultValue = false )
|
||||
|
||||
private Integer playerMoney = null;
|
||||
private AmountOfMoney playerMoney = null;
|
||||
|
||||
|
||||
|
||||
@@ -138,25 +122,25 @@ import org.bn.types.*;
|
||||
|
||||
|
||||
|
||||
public Integer getMoneyWon () {
|
||||
public AmountOfMoney getMoneyWon () {
|
||||
return this.moneyWon;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setMoneyWon (Integer value) {
|
||||
public void setMoneyWon (AmountOfMoney value) {
|
||||
this.moneyWon = value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Integer getPlayerMoney () {
|
||||
public AmountOfMoney getPlayerMoney () {
|
||||
return this.playerMoney;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setPlayerMoney (Integer value) {
|
||||
public void setPlayerMoney (AmountOfMoney value) {
|
||||
this.playerMoney = value;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,57 +44,25 @@ import org.bn.types.*;
|
||||
|
||||
private NetPlayerAction playerAction = null;
|
||||
|
||||
@ASN1Integer( name = "" )
|
||||
@ASN1ValueRangeConstraint (
|
||||
|
||||
min = 0L,
|
||||
|
||||
max = 10000000L
|
||||
|
||||
)
|
||||
|
||||
|
||||
@ASN1Element ( name = "totalPlayerBet", isOptional = false , hasTag = false , hasDefaultValue = false )
|
||||
|
||||
private Integer totalPlayerBet = null;
|
||||
private AmountOfMoney totalPlayerBet = null;
|
||||
|
||||
@ASN1Integer( name = "" )
|
||||
@ASN1ValueRangeConstraint (
|
||||
|
||||
min = 0L,
|
||||
|
||||
max = 10000000L
|
||||
|
||||
)
|
||||
|
||||
|
||||
@ASN1Element ( name = "playerMoney", isOptional = false , hasTag = false , hasDefaultValue = false )
|
||||
|
||||
private Integer playerMoney = null;
|
||||
private AmountOfMoney playerMoney = null;
|
||||
|
||||
@ASN1Integer( name = "" )
|
||||
@ASN1ValueRangeConstraint (
|
||||
|
||||
min = 0L,
|
||||
|
||||
max = 10000000L
|
||||
|
||||
)
|
||||
|
||||
|
||||
@ASN1Element ( name = "highestSet", isOptional = false , hasTag = false , hasDefaultValue = false )
|
||||
|
||||
private Integer highestSet = null;
|
||||
private AmountOfMoney highestSet = null;
|
||||
|
||||
@ASN1Integer( name = "" )
|
||||
@ASN1ValueRangeConstraint (
|
||||
|
||||
min = 0L,
|
||||
|
||||
max = 10000000L
|
||||
|
||||
)
|
||||
|
||||
|
||||
@ASN1Element ( name = "minimumRaise", isOptional = false , hasTag = false , hasDefaultValue = false )
|
||||
|
||||
private Integer minimumRaise = null;
|
||||
private AmountOfMoney minimumRaise = null;
|
||||
|
||||
|
||||
|
||||
@@ -146,49 +114,49 @@ import org.bn.types.*;
|
||||
|
||||
|
||||
|
||||
public Integer getTotalPlayerBet () {
|
||||
public AmountOfMoney getTotalPlayerBet () {
|
||||
return this.totalPlayerBet;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setTotalPlayerBet (Integer value) {
|
||||
public void setTotalPlayerBet (AmountOfMoney value) {
|
||||
this.totalPlayerBet = value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Integer getPlayerMoney () {
|
||||
public AmountOfMoney getPlayerMoney () {
|
||||
return this.playerMoney;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setPlayerMoney (Integer value) {
|
||||
public void setPlayerMoney (AmountOfMoney value) {
|
||||
this.playerMoney = value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Integer getHighestSet () {
|
||||
public AmountOfMoney getHighestSet () {
|
||||
return this.highestSet;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setHighestSet (Integer value) {
|
||||
public void setHighestSet (AmountOfMoney value) {
|
||||
this.highestSet = value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Integer getMinimumRaise () {
|
||||
public AmountOfMoney getMinimumRaise () {
|
||||
return this.minimumRaise;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setMinimumRaise (Integer value) {
|
||||
public void setMinimumRaise (AmountOfMoney value) {
|
||||
this.minimumRaise = value;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,18 +23,10 @@ import org.bn.types.*;
|
||||
|
||||
private NonZeroId playerId = null;
|
||||
|
||||
@ASN1Integer( name = "" )
|
||||
@ASN1ValueRangeConstraint (
|
||||
|
||||
min = 0L,
|
||||
|
||||
max = 10000000L
|
||||
|
||||
)
|
||||
|
||||
|
||||
@ASN1Element ( name = "playerMoney", isOptional = false , hasTag = false , hasDefaultValue = false )
|
||||
|
||||
private Integer playerMoney = null;
|
||||
private AmountOfMoney playerMoney = null;
|
||||
|
||||
|
||||
|
||||
@@ -50,13 +42,13 @@ import org.bn.types.*;
|
||||
|
||||
|
||||
|
||||
public Integer getPlayerMoney () {
|
||||
public AmountOfMoney getPlayerMoney () {
|
||||
return this.playerMoney;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setPlayerMoney (Integer value) {
|
||||
public void setPlayerMoney (AmountOfMoney value) {
|
||||
this.playerMoney = value;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,18 +39,10 @@ import org.bn.types.*;
|
||||
|
||||
private NetPlayerAction yourAction = null;
|
||||
|
||||
@ASN1Integer( name = "" )
|
||||
@ASN1ValueRangeConstraint (
|
||||
|
||||
min = 0L,
|
||||
|
||||
max = 10000000L
|
||||
|
||||
)
|
||||
|
||||
|
||||
@ASN1Element ( name = "yourRelativeBet", isOptional = false , hasTag = false , hasDefaultValue = false )
|
||||
|
||||
private Integer yourRelativeBet = null;
|
||||
private AmountOfMoney yourRelativeBet = null;
|
||||
|
||||
|
||||
|
||||
@@ -140,13 +132,13 @@ import org.bn.types.*;
|
||||
|
||||
|
||||
|
||||
public Integer getYourRelativeBet () {
|
||||
public AmountOfMoney getYourRelativeBet () {
|
||||
return this.yourRelativeBet;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setYourRelativeBet (Integer value) {
|
||||
public void setYourRelativeBet (AmountOfMoney value) {
|
||||
this.yourRelativeBet = value;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ import pokerth_protocol.ChatRequestMessage.ChatRequestMessageSequenceType;
|
||||
import pokerth_protocol.ChatRequestMessage.ChatRequestMessageSequenceType.ChatRequestTypeChoiceType;
|
||||
import pokerth_protocol.NetGameInfo.EndRaiseModeEnumType;
|
||||
import pokerth_protocol.NetGameInfo.NetGameTypeEnumType;
|
||||
import pokerth_protocol.InitialNonZeroAmountOfMoney;
|
||||
|
||||
|
||||
public class ChatTest extends TestBase {
|
||||
@@ -162,7 +163,7 @@ public class ChatTest extends TestBase {
|
||||
assertEquals(playerId[0], msg.getChatMessage().getValue().getChatType().getChatTypePrivate().getPlayerId().getValue().longValue());
|
||||
|
||||
// Game messages can be sent by registered users within a game.
|
||||
Collection<Integer> l = new ArrayList<Integer>();
|
||||
Collection<InitialNonZeroAmountOfMoney> l = new ArrayList<InitialNonZeroAmountOfMoney>();
|
||||
NetGameInfo gameInfo = createGameInfo(5, EndRaiseModeEnumType.EnumType.doubleBlinds, 0, 100, GuestUser + " game list normal game", l, 10, 0, 2, 2000);
|
||||
sendMessage(createGameRequestMsg(
|
||||
gameInfo,
|
||||
|
||||
@@ -34,10 +34,10 @@ public class CreateGameTest extends TestBase {
|
||||
public void testJoinGameRequestMessage() throws Exception {
|
||||
guestInit();
|
||||
|
||||
Collection<Integer> l = new ArrayList<Integer>();
|
||||
l.add(250);
|
||||
l.add(600);
|
||||
l.add(1000);
|
||||
Collection<InitialNonZeroAmountOfMoney> l = new ArrayList<InitialNonZeroAmountOfMoney>();
|
||||
l.add(new InitialNonZeroAmountOfMoney(250));
|
||||
l.add(new InitialNonZeroAmountOfMoney(600));
|
||||
l.add(new InitialNonZeroAmountOfMoney(1000));
|
||||
NetGameInfo gameInfo = createGameInfo(8, EndRaiseModeEnumType.EnumType.raiseByEndValue, 1000, 100, GuestUser + " create test game", l, 10, 0, 7, 2000);
|
||||
sendMessage(createGameRequestMsg(
|
||||
gameInfo,
|
||||
|
||||
@@ -35,7 +35,7 @@ public class CreateRankingGameTest extends TestBase {
|
||||
|
||||
private void createRankingGame(String password) throws Exception {
|
||||
counter++;
|
||||
Collection<Integer> l = new ArrayList<Integer>();
|
||||
Collection<InitialNonZeroAmountOfMoney> l = new ArrayList<InitialNonZeroAmountOfMoney>();
|
||||
NetGameInfo gameInfo = createGameInfo(8, EndRaiseModeEnumType.EnumType.doubleBlinds, 0, 50, GuestUser + " create ranking game " + counter, l, 10, 0, 11, 10000);
|
||||
sendMessage(createGameRequestMsg(
|
||||
gameInfo,
|
||||
|
||||
@@ -33,6 +33,7 @@ import pokerth_protocol.NetGameMode;
|
||||
import pokerth_protocol.PokerTHMessage;
|
||||
import pokerth_protocol.NetGameInfo.EndRaiseModeEnumType;
|
||||
import pokerth_protocol.NetGameInfo.NetGameTypeEnumType;
|
||||
import pokerth_protocol.InitialNonZeroAmountOfMoney;
|
||||
|
||||
|
||||
public class GameListTest extends TestBase {
|
||||
@@ -67,7 +68,7 @@ public class GameListTest extends TestBase {
|
||||
assertTrue(msg.isPlayerListMessageSelected());
|
||||
|
||||
// Create a new game.
|
||||
Collection<Integer> l = new ArrayList<Integer>();
|
||||
Collection<InitialNonZeroAmountOfMoney> l = new ArrayList<InitialNonZeroAmountOfMoney>();
|
||||
NetGameInfo gameInfo = createGameInfo(5, EndRaiseModeEnumType.EnumType.doubleBlinds, 0, 100, GuestUser + " game list normal game", l, 10, 0, 2, 2000);
|
||||
sendMessage(createGameRequestMsg(
|
||||
gameInfo,
|
||||
|
||||
@@ -64,7 +64,7 @@ public class LoadTest extends TestBase {
|
||||
fail("Invalid message.");
|
||||
}
|
||||
|
||||
Collection<Integer> l = new ArrayList<Integer>();
|
||||
Collection<InitialNonZeroAmountOfMoney> l = new ArrayList<InitialNonZeroAmountOfMoney>();
|
||||
String gameName = AuthUser + " load game " + i;
|
||||
NetGameInfo gameInfo = createGameInfo(5, EndRaiseModeEnumType.EnumType.doubleBlinds, 0, 200, gameName, l, 10, 0, 1, 10000);
|
||||
sendMessage(createGameRequestMsg(
|
||||
@@ -142,7 +142,7 @@ public class LoadTest extends TestBase {
|
||||
myRequest.setGameState(msg.getPlayersTurnMessage().getValue().getGameState());
|
||||
myRequest.setHandNum(new NonZeroId(handNum));
|
||||
myRequest.setMyAction(action);
|
||||
myRequest.setMyRelativeBet(0);
|
||||
myRequest.setMyRelativeBet(new AmountOfMoney(0));
|
||||
MyActionRequestMessage myAction = new MyActionRequestMessage();
|
||||
myAction.setValue(myRequest);
|
||||
PokerTHMessage outMsg = new PokerTHMessage();
|
||||
|
||||
@@ -33,6 +33,7 @@ import pokerth_protocol.NetGameInfo.EndRaiseModeEnumType;
|
||||
import pokerth_protocol.NetGameInfo.NetGameTypeEnumType;
|
||||
import pokerth_protocol.SubscriptionRequestMessage.SubscriptionRequestMessageSequenceType;
|
||||
import pokerth_protocol.SubscriptionRequestMessage.SubscriptionRequestMessageSequenceType.SubscriptionActionEnumType;
|
||||
import pokerth_protocol.InitialNonZeroAmountOfMoney;
|
||||
|
||||
|
||||
public class LobbySubscriptionTest extends TestBase {
|
||||
@@ -59,7 +60,7 @@ public class LobbySubscriptionTest extends TestBase {
|
||||
sendMessage(msg);
|
||||
|
||||
// Create a new game.
|
||||
Collection<Integer> l = new ArrayList<Integer>();
|
||||
Collection<InitialNonZeroAmountOfMoney> l = new ArrayList<InitialNonZeroAmountOfMoney>();
|
||||
NetGameInfo gameInfo = createGameInfo(5, EndRaiseModeEnumType.EnumType.doubleBlinds, 0, 100, GuestUser + " game list normal game", l, 10, 0, 2, 2000);
|
||||
sendMessage(createGameRequestMsg(
|
||||
gameInfo,
|
||||
|
||||
@@ -37,6 +37,7 @@ import pokerth_protocol.NetGameInfo.EndRaiseModeEnumType;
|
||||
import pokerth_protocol.NetGameInfo.NetGameTypeEnumType;
|
||||
import pokerth_protocol.StartEventAckMessage.StartEventAckMessageSequenceType;
|
||||
import pokerth_protocol.StartEventMessage.StartEventMessageSequenceType;
|
||||
import pokerth_protocol.InitialNonZeroAmountOfMoney;
|
||||
|
||||
|
||||
public class RunNormalGameTest extends TestBase {
|
||||
@@ -45,7 +46,7 @@ public class RunNormalGameTest extends TestBase {
|
||||
public void testRunNormalGameAsGuest() throws Exception {
|
||||
guestInit();
|
||||
|
||||
Collection<Integer> l = new ArrayList<Integer>();
|
||||
Collection<InitialNonZeroAmountOfMoney> l = new ArrayList<InitialNonZeroAmountOfMoney>();
|
||||
NetGameInfo gameInfo = createGameInfo(5, EndRaiseModeEnumType.EnumType.doubleBlinds, 0, 100, GuestUser + " run normal game", l, 10, 0, 2, 2000);
|
||||
sendMessage(createGameRequestMsg(
|
||||
gameInfo,
|
||||
@@ -147,14 +148,14 @@ public class RunNormalGameTest extends TestBase {
|
||||
msg = receiveMessage();
|
||||
if (msg.isEndOfHandMessageSelected()) {
|
||||
if (msg.getEndOfHandMessage().getValue().getEndOfHandType().isEndOfHandHideCardsSelected()) {
|
||||
lastPlayerMoney = msg.getEndOfHandMessage().getValue().getEndOfHandType().getEndOfHandHideCards().getPlayerMoney();
|
||||
lastPlayerMoney = msg.getEndOfHandMessage().getValue().getEndOfHandType().getEndOfHandHideCards().getPlayerMoney().getValue();
|
||||
} else if (msg.getEndOfHandMessage().getValue().getEndOfHandType().isEndOfHandShowCardsSelected()) {
|
||||
Collection<PlayerResult> result = msg.getEndOfHandMessage().getValue().getEndOfHandType().getEndOfHandShowCards().getPlayerResults();
|
||||
assertFalse(result.isEmpty());
|
||||
long maxPlayerMoney = 0;
|
||||
for (Iterator<PlayerResult> it = result.iterator(); it.hasNext(); ) {
|
||||
PlayerResult r = it.next();
|
||||
long curMoney = r.getPlayerMoney();
|
||||
long curMoney = r.getPlayerMoney().getValue();
|
||||
if (curMoney > maxPlayerMoney) {
|
||||
maxPlayerMoney = curMoney;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ import static org.junit.Assert.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -58,7 +57,7 @@ public class RunRankingGameTest extends TestBase {
|
||||
fail("Invalid message.");
|
||||
}
|
||||
|
||||
Collection<Integer> l = new ArrayList<Integer>();
|
||||
Collection<InitialNonZeroAmountOfMoney> l = new ArrayList<InitialNonZeroAmountOfMoney>();
|
||||
String gameName = AuthUser + " run ranking game";
|
||||
NetGameInfo gameInfo = createGameInfo(5, EndRaiseModeEnumType.EnumType.doubleBlinds, 0, 50, gameName, l, 10, 0, 11, 10000);
|
||||
sendMessage(createGameRequestMsg(
|
||||
@@ -216,7 +215,7 @@ public class RunRankingGameTest extends TestBase {
|
||||
myRequest.setGameState(msg.getPlayersTurnMessage().getValue().getGameState());
|
||||
myRequest.setHandNum(new NonZeroId(handNum));
|
||||
myRequest.setMyAction(action);
|
||||
myRequest.setMyRelativeBet(0);
|
||||
myRequest.setMyRelativeBet(new AmountOfMoney(0));
|
||||
MyActionRequestMessage myAction = new MyActionRequestMessage();
|
||||
myAction.setValue(myRequest);
|
||||
PokerTHMessage outMsg = new PokerTHMessage();
|
||||
@@ -237,7 +236,7 @@ public class RunRankingGameTest extends TestBase {
|
||||
myRequest.setGameState(inMsg.getPlayersTurnMessage().getValue().getGameState());
|
||||
myRequest.setHandNum(new NonZeroId(handNum));
|
||||
myRequest.setMyAction(action);
|
||||
myRequest.setMyRelativeBet(0);
|
||||
myRequest.setMyRelativeBet(new AmountOfMoney(0));
|
||||
MyActionRequestMessage myAction = new MyActionRequestMessage();
|
||||
myAction.setValue(myRequest);
|
||||
PokerTHMessage outMsg = new PokerTHMessage();
|
||||
@@ -247,14 +246,14 @@ public class RunRankingGameTest extends TestBase {
|
||||
}
|
||||
else if (inMsg.isEndOfHandMessageSelected()) {
|
||||
if (inMsg.getEndOfHandMessage().getValue().getEndOfHandType().isEndOfHandHideCardsSelected()) {
|
||||
lastPlayerMoney = inMsg.getEndOfHandMessage().getValue().getEndOfHandType().getEndOfHandHideCards().getPlayerMoney();
|
||||
lastPlayerMoney = inMsg.getEndOfHandMessage().getValue().getEndOfHandType().getEndOfHandHideCards().getPlayerMoney().getValue();
|
||||
} else if (inMsg.getEndOfHandMessage().getValue().getEndOfHandType().isEndOfHandShowCardsSelected()) {
|
||||
Collection<PlayerResult> result = inMsg.getEndOfHandMessage().getValue().getEndOfHandType().getEndOfHandShowCards().getPlayerResults();
|
||||
assertFalse(result.isEmpty());
|
||||
long maxPlayerMoney = 0;
|
||||
for (Iterator<PlayerResult> it = result.iterator(); it.hasNext(); ) {
|
||||
PlayerResult r = it.next();
|
||||
long curMoney = r.getPlayerMoney();
|
||||
long curMoney = r.getPlayerMoney().getValue();
|
||||
if (curMoney > maxPlayerMoney) {
|
||||
maxPlayerMoney = curMoney;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public class StartNormalGameTest extends TestBase {
|
||||
public void testGameStartMessage() throws Exception {
|
||||
guestInit();
|
||||
|
||||
Collection<Integer> l = new ArrayList<Integer>();
|
||||
Collection<InitialNonZeroAmountOfMoney> l = new ArrayList<InitialNonZeroAmountOfMoney>();
|
||||
NetGameInfo gameInfo = createGameInfo(10, EndRaiseModeEnumType.EnumType.doubleBlinds, 0, 100, GuestUser + " start normal game", l, 10, 0, 11, 20000);
|
||||
sendMessage(createGameRequestMsg(
|
||||
gameInfo,
|
||||
|
||||
@@ -288,13 +288,13 @@ public abstract class TestBase {
|
||||
}
|
||||
|
||||
public NetGameInfo createGameInfo(int delayBetweenHands, EndRaiseModeEnumType.EnumType endMode, int endRaiseValue, int sb, String gameName,
|
||||
Collection<Integer> manualBlinds, int maxNumPlayers, int raiseEveryMinutes, int raiseEveryHands, int startMoney) {
|
||||
Collection<InitialNonZeroAmountOfMoney> manualBlinds, int maxNumPlayers, int raiseEveryMinutes, int raiseEveryHands, int startMoney) {
|
||||
NetGameInfo gameInfo = new NetGameInfo();
|
||||
EndRaiseModeEnumType endRaise = new EndRaiseModeEnumType();
|
||||
endRaise.setValue(endMode);
|
||||
gameInfo.setDelayBetweenHands(delayBetweenHands);
|
||||
gameInfo.setEndRaiseMode(endRaise);
|
||||
gameInfo.setEndRaiseSmallBlindValue(endRaiseValue);
|
||||
gameInfo.setEndRaiseSmallBlindValue(new InitialAmountOfMoney(endRaiseValue));
|
||||
gameInfo.setFirstSmallBlind(sb);
|
||||
gameInfo.setGameName(gameName);
|
||||
gameInfo.setManualBlinds(manualBlinds);
|
||||
@@ -307,7 +307,7 @@ public abstract class TestBase {
|
||||
raiseInterval.selectRaiseEveryHands(raiseEveryHands);
|
||||
}
|
||||
gameInfo.setRaiseIntervalMode(raiseInterval);
|
||||
gameInfo.setStartMoney(startMoney);
|
||||
gameInfo.setStartMoney(new InitialNonZeroAmountOfMoney(startMoney));
|
||||
|
||||
return gameInfo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user