void Listener_OnMessagePublished(Fizz.Chat.FizzChannelMessage msg) { if (channelLoopup.ContainsKey(msg.To)) { channelLoopup[msg.To].AddMessage(msg); } if (OnChannelMessage != null) { OnChannelMessage.Invoke(msg.To, msg); } }
public void IntegrityTest() { var now = FizzUtils.Now(); var m = new FizzChannelMessage( 1, "from", "nick", "to", "body", "data", null, now ); Assert.AreEqual(m.Id, 1); Assert.AreEqual(m.From, "from"); Assert.AreEqual(m.Nick, "nick"); Assert.AreEqual(m.To, "to"); Assert.AreEqual(m.Body, "body"); Assert.AreEqual(m.Data, "data"); Assert.AreEqual(m.Created, now); }