/** * Pretend we are disconnected to the server. */ public TestConfig disconnectFromServer() { serverConnectionMock.setOpen(false); return this; }
/** * Pretend we are disconnected to the server. */ public TestConfig disconnectFromServer() { serverConnectionMock.setOpen(false); return this; }
/** * Pretend we are reconnecting to the server. * @throws OperationException * @throws TransformException */ public TestConfig reconnectToServer() throws Exception { serverConnectionMock.setOpen(true); serverConnectionMock.reconnect(clientMock.getReconnectionVersions()); return this; }
/** * Pretend we are reconnecting to the server. * @throws OperationException * @throws TransformException */ public TestConfig reconnectToServer() throws Exception { serverConnectionMock.setOpen(true); serverConnectionMock.reconnect(clientMock.getReconnectionVersions()); return this; }
/** * Disconnect a single client from server. */ public void killClient(int clientNumber) { ClientMock client = clientMocks.get(clientNumber); ServerConnectionMock connection = client.getConnection(); serverMock.removeClientConnection(connection); connection.setOpen(false); connection.getReceivedDeltas().clear(); connection.getSentDeltas().clear(); connection.setServerMock(null); }
/** * Disconnect a single client from server. */ public void killClient(int clientNumber) { ClientMock client = clientMocks.get(clientNumber); ServerConnectionMock connection = client.getConnection(); serverMock.removeClientConnection(connection); connection.setOpen(false); connection.getReceivedDeltas().clear(); connection.getSentDeltas().clear(); connection.setServerMock(null); }
/** * Reconnect a single client from server * @throws OperationException * @throws TransformException */ public void reconnectClient(int clientNumber) throws ChannelException, TransformException, OperationException { ClientMock client = clientMocks.get(clientNumber); ServerConnectionMock connection = client.getConnection(); serverMock.addClientConnection(connection); connection.setServerMock(serverMock); connection.setOpen(true); connection.reconnect(client.getReconnectionVersions()); }
/** * Reconnect a single client from server * @throws OperationException * @throws TransformException */ public void reconnectClient(int clientNumber) throws ChannelException, TransformException, OperationException { ClientMock client = clientMocks.get(clientNumber); ServerConnectionMock connection = client.getConnection(); serverMock.addClientConnection(connection); connection.setServerMock(serverMock); connection.setOpen(true); connection.reconnect(client.getReconnectionVersions()); }