added NetworkDialogClientTests
testEnterIP -> passes testEnterPort -> can't be tested in model testConnectToServer -> passes testCantConnectToServer -> passes testCancelJoining -> passes
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
import pp.mdga.notification.Notification;
|
||||
import pp.mdga.notification.StartDialogNotification;
|
||||
|
||||
import java.lang.System.Logger;
|
||||
import java.lang.System.Logger.Level;
|
||||
import java.util.ArrayList;
|
||||
import java.util.UUID;
|
||||
|
||||
@@ -19,7 +21,7 @@
|
||||
* It is responsible for handling the game logic on the client side.
|
||||
*/
|
||||
public class ClientGameLogic implements ServerInterpreter {
|
||||
static final System.Logger LOGGER = System.getLogger(ClientGameLogic.class.getName());
|
||||
static final Logger LOGGER = System.getLogger(ClientGameLogic.class.getName());
|
||||
|
||||
private Game game;
|
||||
private final ClientSender clientSender;
|
||||
@@ -53,7 +55,7 @@ public ClientGameLogic(ClientSender clientSender) {
|
||||
* @param msg the message to be sent
|
||||
*/
|
||||
public void send(ClientMessage msg) {
|
||||
LOGGER.log(System.Logger.Level.INFO, "send {0}", msg);
|
||||
LOGGER.log(Level.INFO, "send {0}", msg);
|
||||
clientSender.send(msg);
|
||||
}
|
||||
|
||||
@@ -581,7 +583,7 @@ public void selectLeave() {
|
||||
/**
|
||||
* This method calls the selectJoin method of the state
|
||||
*
|
||||
* @param ip the ip to cennect to
|
||||
* @param ip the ip to connect to
|
||||
*/
|
||||
public void selectJoin(String ip) {
|
||||
state.selectJoin(ip);
|
||||
|
||||
Reference in New Issue
Block a user