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

            writer.Put("hello world");

            PacketScanner scanner = new PacketScanner(writer.Packet);

            Assert.AreEqual("hello world", scanner.NextString());
            scanner.NextString();
        }
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());
        }