示例#1
0
 public void RegisterMessage2()
 {
     MessagePacker.RegisterMessage <SomeRandomMessage2121143>();
     Assert.Throws <ArgumentException>(() =>
     {
         MessagePacker.RegisterMessage <SomeRandomMessage2133122>();
     });
 }
示例#2
0
        public void RegisterMessage()
        {
            MessagePacker.RegisterMessage <SomeRandomMessage>();

            int id = MessagePacker.GetId <SomeRandomMessage>();

            Type type = MessagePacker.GetMessageType(id);

            Assert.That(type, Is.EqualTo(typeof(SomeRandomMessage)));
        }
示例#3
0
        public void RegisterMessage()
        {
            MessagePacker.RegisterMessage <SomeRandomMessage>();

            var id = MessagePacker.GetId <SomeRandomMessage>();

            var type = MessagePacker.MessageTypes[id];

            Assert.That(type, Is.EqualTo(typeof(SomeRandomMessage)));
        }