public void can_send_command()
        {
            var handler = new WoftamCommandHandler(_longProp);

            _subscriptions.Add(_localBus.Subscribe(handler));

            // First send the command to server so it knows where to send the response.
            _tcpBusClientSide.Handle(MessageBuilder.New(() => new WoftamCommand(ShortProp)));

            // expect to receive it on the client side
            var gotMessage = _tcs.Task.Wait(TimeSpan.FromMilliseconds(1000));

            Assert.True(gotMessage);
            Assert.IsType <Success>(_tcs.Task.Result);
        }
        public void can_handle_split_frames() // Also tests custom deserializer
        {
            var handler = new WoftamCommandHandler(_longProp)
            {
                ReturnCustomResponse = true
            };

            _subscriptions.Add(_localBus.Subscribe(handler));

            // First send the command to server so it knows where to send the response.
            // We don't need this properties to be large since we're only testing message
            // splitting from server to client.
            _tcpBusClientSide.Handle(MessageBuilder.New(() => new WoftamCommand(ShortProp)));

            // expect to receive it on the client side
            var gotMessage = _tcs.Task.Wait(TimeSpan.FromMilliseconds(1000));

            Assert.True(gotMessage);
            var response = Assert.IsType <WoftamCommandResponse>(_tcs.Task.Result);

            Assert.Equal(_longProp, response.PropertyA);
        }