Exemplo n.º 1
0
        public void TestInt()
        {
            PacketWriter writer = new PacketWriter(0x10, false);

            writer.Put(-230);
            writer.Put(1234567890);

            PacketScanner scanner = new PacketScanner(writer.Packet);

            Assert.AreEqual(-230, scanner.NextInt());
            Assert.AreEqual(1234567890, scanner.NextInt());
        }
Exemplo n.º 2
0
        public void TestIntAndString()
        {
            PacketWriter writer = new PacketWriter(0x10, false);

            writer.Put(123);
            writer.Put("hello world! TestString");

            PacketScanner scanner = new PacketScanner(writer.Packet);

            Assert.AreEqual(123, scanner.NextInt());
            Assert.AreEqual("hello world! TestString", scanner.NextString());
        }