public void Setup()
        {
            int connectionPort = TcpHelper.AvailableTcpPort();

            loggerMock = MockRepository.GenerateMock<ILogger>();

            // Server
            incomingMessageQueueMock = MockRepository.GenerateMock<IIncomingMessageQueue>();

            clientMessagePuller = new ClientMessagePuller(loggerMock, new ProtobufSerializer(), incomingMessageQueueMock);
            clientMessagePuller.Start(connectionPort);

            Thread.Sleep(500);

            // Client
            clientMessageConnection = new MessageConnection(loggerMock, new ProtobufSerializer());
            clientMessageConnection.Start("localhost", connectionPort);
        }
        public void Setup()
        {
            int connectionPort = TcpHelper.AvailableTcpPort();

            loggerMock = MockRepository.GenerateMock <ILogger>();

            // Server
            incomingMessageQueueMock = MockRepository.GenerateMock <IIncomingMessageQueue>();


            clientMessagePuller = new ClientMessagePuller(loggerMock, new ProtobufSerializer(), incomingMessageQueueMock);
            clientMessagePuller.Start(connectionPort);

            Thread.Sleep(500);

            // Client
            clientMessageConnection = new MessageConnection(loggerMock, new ProtobufSerializer());
            clientMessageConnection.Start("localhost", connectionPort);
        }