public SubscriptionManagerTest() { peer = new Core.InMemoryPeer(); manager = new SubscriptionManager(); manager.Subscribe(peer, "foo"); peer.MessageReceived += ((x, y) => { if (x == "foo") { messageReceived = true; } }); }
public void WildCard_NeedsFullTextAheadOfWildCard() { peer = new Core.InMemoryPeer(); manager = new SubscriptionManager(); bool messageReceived = false; manager.Subscribe(peer, "foo/*"); peer.MessageReceived += ((x, y) => { if (x == "fo/fno") { messageReceived = true; } }); manager.DispatchMessage("fo/fno", new byte[] { 0x01 }, Core.QoS.BestEffort); Assert.False(messageReceived); }