public void RegisterMessage2() { MessagePacker.RegisterMessage <SomeRandomMessage2121143>(); Assert.Throws <ArgumentException>(() => { MessagePacker.RegisterMessage <SomeRandomMessage2133122>(); }); }
public void RegisterMessage() { MessagePacker.RegisterMessage <SomeRandomMessage>(); int id = MessagePacker.GetId <SomeRandomMessage>(); Type type = MessagePacker.GetMessageType(id); Assert.That(type, Is.EqualTo(typeof(SomeRandomMessage))); }
public void RegisterMessage() { MessagePacker.RegisterMessage <SomeRandomMessage>(); var id = MessagePacker.GetId <SomeRandomMessage>(); var type = MessagePacker.MessageTypes[id]; Assert.That(type, Is.EqualTo(typeof(SomeRandomMessage))); }