Exemplo n.º 1
0
        public void SendMessage_MultipleMessagesAreSentSuccessfully_ReceivedMessagesAreCorrect()
        {
            var port            = 15001;
            var messageListener = new MessageListener(port);

            messageListener.Listen();

            var server = new StreamingServer(port);

            server.SendMessage("Hello");
            server.SendMessage("World");
            Thread.Sleep(2000);

            var receivedMessages = messageListener.ReceivedMessages;

            receivedMessages.Should().BeEquivalentTo("Hello", "World");
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            var server = new StreamingServer(15000);

            server.SendMessage("Test");
        }