Search in sources :

Example 6 with SocketServer

use of com.github.dreamhead.moco.SocketServer in project moco by dreamhead.

the class ActualSocketServerTest method should_merge_socket_servers_with_second_port.

@Test
public void should_merge_socket_servers_with_second_port() throws Exception {
    SocketServer server = socketServer();
    SocketServer secondServer = socketServer(12307);
    final SocketServer newServer = ((ActualSocketServer) server).mergeServer((ActualSocketServer) secondServer);
    running(newServer, new Runnable() {

        @Override
        public void run() throws Exception {
            assertThat(newServer.port(), is(12307));
        }
    });
}
Also used : SocketServer(com.github.dreamhead.moco.SocketServer) Runnable(com.github.dreamhead.moco.Runnable) Test(org.junit.Test)

Aggregations

SocketServer (com.github.dreamhead.moco.SocketServer)6 Test (org.junit.Test)4 Runnable (com.github.dreamhead.moco.Runnable)3 ActualSocketServer (com.github.dreamhead.moco.internal.ActualSocketServer)2 SessionSetting (com.github.dreamhead.moco.parser.model.SessionSetting)1 RunnerSetting.aRunnerSetting (com.github.dreamhead.moco.runner.RunnerSetting.aRunnerSetting)1