minor changes
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
import pp.mdga.message.client.ClientMessage;
|
import pp.mdga.message.client.ClientMessage;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
@@ -145,9 +146,9 @@ public void send(ClientMessage msg) {
|
|||||||
endOfTurn = new EndOfTurnMessage();
|
endOfTurn = new EndOfTurnMessage();
|
||||||
lobbyAccept = new LobbyAcceptMessage();
|
lobbyAccept = new LobbyAcceptMessage();
|
||||||
lobbyDeny = new LobbyDenyMessage();
|
lobbyDeny = new LobbyDenyMessage();
|
||||||
lobbyPlayerJoin = new LobbyPlayerJoinedMessage(from,player);
|
lobbyPlayerJoin = new LobbyPlayerJoinedMessage(from, player);
|
||||||
lobbyPlayerLeave = new LobbyPlayerLeaveMessage(from);
|
lobbyPlayerLeave = new LobbyPlayerLeaveMessage(from);
|
||||||
moveMessage = new MoveMessage(,false, 20);//Todo
|
moveMessage = new MoveMessage(, false, 20);//Todo
|
||||||
noTurn = new NoTurnMessage();
|
noTurn = new NoTurnMessage();
|
||||||
interruptMessage = new PauseGameMessage();
|
interruptMessage = new PauseGameMessage();
|
||||||
playCardSwap = PlayCardMessage.swap();//Todo
|
playCardSwap = PlayCardMessage.swap();//Todo
|
||||||
@@ -155,7 +156,7 @@ public void send(ClientMessage msg) {
|
|||||||
playCardTurbo = PlayCardMessage.turbo(1);//Todo
|
playCardTurbo = PlayCardMessage.turbo(1);//Todo
|
||||||
possibleCard = new PossibleCardMessage();
|
possibleCard = new PossibleCardMessage();
|
||||||
possiblePieceShield = PossiblePieceMessage.shieldPossiblePieces(new ArrayList<>()); //TODO
|
possiblePieceShield = PossiblePieceMessage.shieldPossiblePieces(new ArrayList<>()); //TODO
|
||||||
possiblePieceSwap = PossiblePieceMessage.swapPossiblePieces(new ArrayList<>(),new ArrayList<>()); //TODO
|
possiblePieceSwap = PossiblePieceMessage.swapPossiblePieces(new ArrayList<>(), new ArrayList<>()); //TODO
|
||||||
possiblePiece = new PossiblePieceMessage();
|
possiblePiece = new PossiblePieceMessage();
|
||||||
rankingResponse = new RankingResponseMessage();
|
rankingResponse = new RankingResponseMessage();
|
||||||
rankingRollAgain = new RankingRollAgainMessage();
|
rankingRollAgain = new RankingRollAgainMessage();
|
||||||
@@ -349,7 +350,7 @@ public void testClientGameToCeremony() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UC-ClientState-05: Test the transition from ClientGame sub-states to Interrupt.
|
* UC-ClientState-05: Test the transition from ClientGame substates to Interrupt.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testClientGameSubStatesToInterrupt() {
|
public void testClientGameSubStatesToInterrupt() {
|
||||||
@@ -374,7 +375,7 @@ public void testGameToDialogs() {
|
|||||||
assertEquals(clientGameLogic.getState(), gameState);
|
assertEquals(clientGameLogic.getState(), gameState);
|
||||||
|
|
||||||
//receives a GameClosedMessage
|
//receives a GameClosedMessage
|
||||||
clientGameLogic.received();//TODO
|
//clientGameLogic.received();//TODO
|
||||||
|
|
||||||
assertEquals(clientGameLogic.getState(), dialogs);
|
assertEquals(clientGameLogic.getState(), dialogs);
|
||||||
assertEquals(dialogs.getState(), startDialog);
|
assertEquals(dialogs.getState(), startDialog);
|
||||||
@@ -452,7 +453,7 @@ public void testInterruptToDialogs() {
|
|||||||
assertEquals(clientGameLogic.getState(), interrupt);
|
assertEquals(clientGameLogic.getState(), interrupt);
|
||||||
|
|
||||||
//Todo send the server-closed
|
//Todo send the server-closed
|
||||||
clientGameLogic.received();
|
//clientGameLogic.received();
|
||||||
|
|
||||||
//tests if the client is in the startDialog
|
//tests if the client is in the startDialog
|
||||||
assertEquals(clientGameLogic.getState(), dialogs);
|
assertEquals(clientGameLogic.getState(), dialogs);
|
||||||
@@ -881,7 +882,7 @@ public void testWaitToGameEndState() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UC-ClientState-25: Test the transition from Turn sub-states to GameEndState.
|
* UC-ClientState-25: Test the transition from Turn substates to GameEndState.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testTurnSubStatesToGameEndState() {
|
public void testTurnSubStatesToGameEndState() {
|
||||||
@@ -944,7 +945,7 @@ public void testTurnSubStatesToGameEndState() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UC-ClientState-26: Test the transition from Turn sub-states to Wait.
|
* UC-ClientState-26: Test the transition from Turn substates to Wait.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testTurnSubStatesToWait() {
|
public void testTurnSubStatesToWait() {
|
||||||
@@ -1134,7 +1135,7 @@ public void testTurnSubStatesToWait() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UC-ClientState-27: Test the transition from Turn sub-states to Spectator.
|
* UC-ClientState-27: Test the transition from Turn substates to Spectator.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testTurnSubStatesToSpectator() {
|
public void testTurnSubStatesToSpectator() {
|
||||||
@@ -1255,7 +1256,7 @@ public void testSpectatorToGameEndState() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UC-ClientState-29: Test the transition from PowerCard sub-states to PlayPowerCard.
|
* UC-ClientState-29: Test the transition from PowerCard substates to PlayPowerCard.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testPowerCardSubStatesToPlayPowerCard() {
|
public void testPowerCardSubStatesToPlayPowerCard() {
|
||||||
@@ -1315,7 +1316,7 @@ public void testPowerCardSubStatesToPlayPowerCard() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UC-ClientState-30: Test the transition from PowerCard sub-states to RollDice.
|
* UC-ClientState-30: Test the transition from PowerCard substates to RollDice.
|
||||||
* <p>
|
* <p>
|
||||||
* tests the transition from ChoosePowerCard from PowerCard to RollDice
|
* tests the transition from ChoosePowerCard from PowerCard to RollDice
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ public void testMove() {
|
|||||||
// TODO:
|
// TODO:
|
||||||
//sends the server in selectPiece
|
//sends the server in selectPiece
|
||||||
serverGameLogic.setCurrentState(serverGameLogic.getGameState());
|
serverGameLogic.setCurrentState(serverGameLogic.getGameState());
|
||||||
GameState gameState =serverGameLogic.getGameState();
|
GameState gameState = serverGameLogic.getGameState();
|
||||||
|
|
||||||
//sets the active Player to host
|
//sets the active Player to host
|
||||||
game.setActiveColor(hostColor);
|
game.setActiveColor(hostColor);
|
||||||
@@ -149,6 +149,17 @@ public void testMove() {
|
|||||||
@Test
|
@Test
|
||||||
public void testCantMove() {
|
public void testCantMove() {
|
||||||
// TODO: Implement test logic for when a piece can't move
|
// TODO: Implement test logic for when a piece can't move
|
||||||
|
//send server in selectPiece-state
|
||||||
|
|
||||||
|
//set active player
|
||||||
|
|
||||||
|
//set die-class
|
||||||
|
|
||||||
|
//send request Die-message
|
||||||
|
|
||||||
|
//send ..........
|
||||||
|
|
||||||
|
//test
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user