//[Fact]
        public async Task Should_be_able_to_send_a_message()
        {
            var sut = new TcpMessagingClient();
            await sut.Open("localhost", _serverPort);

            await sut.SendAsync("Hello world");

            var message = await ReceiveMessageInServer();

            message.Body.Should().Be("Hello world");
        }
Example #2
0
        public async Task Start()
        {
            await _fileQueue.Open();

            await _tcpClient.Open(_configuration.RemoteEndPointHostName, 8335);

            _tcpClient.SetReceiver(ProcessReceivedMessage);
#pragma warning disable 4014
            DeliverQueuedMessages();
#pragma warning restore 4014
        }
        public async Task Should_be_able_to_connect()
        {
            var sut = new TcpMessagingClient();

            await sut.Open("localhost", _serverPort);
        }