fix: update tests

This commit is contained in:
punchready 2021-07-06 13:15:15 +02:00
parent 8f12084308
commit 8c8a4752e3
3 changed files with 5 additions and 5 deletions

View File

@ -64,7 +64,7 @@ class LobbyTest {
doNothing().when(lobby).updateTurnTimer();
Participant playerOne = new Participant(
new Client(playerConnection), "LobbyOne", ParticipantType.PlayerOne);
new Client(playerConnection), "LobbyOne", ParticipantType.PlayerOne, false);
lobby.receiveRequests(requests, playerOne);
}
@ -80,7 +80,7 @@ class LobbyTest {
@Disabled
void generateWinPlayer1Test(){
var webSoc = mock(WebSocket.class);
Participant winner = new Participant(new Client(webSoc), "someLobby", ParticipantType.PlayerOne);
Participant winner = new Participant(new Client(webSoc), "someLobby", ParticipantType.PlayerOne, false);
lobby.triggerWin(winner);
verify(connection).broadcastEvents(
new EventBuilder(EventType.WinEvent)
@ -95,7 +95,7 @@ class LobbyTest {
@Disabled
void generateWinPlayer2Test(){
var webSoc = mock(WebSocket.class);
Participant winner = new Participant(new Client(webSoc), "someLobby", ParticipantType.PlayerOne);
Participant winner = new Participant(new Client(webSoc), "someLobby", ParticipantType.PlayerOne, false);
lobby.triggerWin(winner);
verify(connection).broadcastEvents(
new EventBuilder(EventType.WinEvent)

View File

@ -24,7 +24,7 @@ class TurnTimeoutTimerTest {
@Test
void startTurnTimerTest(){
var connection = mock(WebSocket.class);
var participant = new Participant(new Client(connection), "lobby", ParticipantType.Spectator);
var participant = new Participant(new Client(connection), "lobby", ParticipantType.Spectator, false);
assertThatIllegalStateException().describedAs("Spectators don't have TurnTime").isThrownBy(() -> turnTimeoutTimer.startTurnTimer(participant));
}

View File

@ -48,7 +48,7 @@ class PacketTest {
new RequestBuilder(RequestType.Req).buildGameRequest(),
new RequestBuilder(RequestType.MoveRequest).buildGameRequest()
};
var participant = new Participant(new Client(null), "SomeLobby", ParticipantType.PlayerOne);
var participant = new Participant(new Client(null), "SomeLobby", ParticipantType.PlayerOne, false);
packet = new Packet(requests, participant);
assertThat(packet.getOrigin()).isEqualTo(participant);