コード例 #1
0
        //[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");
        }
コード例 #2
0
        public async Task Should_be_able_to_connect()
        {
            var sut = new TcpMessagingClient();

            await sut.Open("localhost", _serverPort);
        }
コード例 #3
0
 public MessagingClient(MessagingClientConfiguration configuration)
 {
     _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));
     _fileQueue     = new FileQueue(_configuration.QueueDirectory, _configuration.EndpointName);
     _tcpClient     = new TcpMessagingClient();
 }