示例#1
0
        public async void SendMessage_SingleMessageIsSentSuccessfully_ReceivedMessageIsCorrect()
        {
            var port   = 15000;
            var client = new SimpleClient(port);
            var server = new SimpleServer(port);

            server.Listen();
            client.Listen();
            client.SendCommand(new GetMessagesCommand("First message"));
            await server.AcceptCommand();

            var receivedCommands = server.ReceivedCommands;

            receivedCommands.Should().BeEquivalentTo("First message");
        }