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"); }
static void Main(string[] args) { var server = new StreamingServer(15000); server.SendMessage("Test"); }