public void TestMessageHandlerIsWrappedCorrectl() { WebSocketPath path = new WebSocketPath("ws", "localhost", 6601, "Test"); client = StompClient.Over(path, null); client.OnMessage += onMessage; Dictionary <string, string> headers = new Dictionary <string, string> (); headers.Add(StompHeaders.DESTINATION, "/test"); headers.Add(StompHeaders.ID, "id"); client.Open(); client.Send(new SendFrame("Hello world", headers)); while (!messageArrived) { // Wait for event to arrive, then quit. } Assert.AreEqual(StompCommands.MESSAGE, message.Command); StringAssert.AreEqualIgnoringCase("Hello world\0", message.Body); StringAssert.AreEqualIgnoringCase("/test", message.Headers [StompHeaders.DESTINATION]); StringAssert.AreEqualIgnoringCase("1", message.Headers [StompHeaders.MESSAGE_ID]); client.Close(); }