Exemplo n.º 1
0
        public void TestDouble()
        {
            AMFDataParser target = new AMFDataParser(); // TODO: Initialize to an appropriate value

            //farm-tr-fb.socialgamenet.com-22-request
            /* T:\mat\Research\Technology\AMF\Samples\Game-576-response.bin (2/22/2012 1:57:14 PM)
            StartOffset: 00000087, EndOffset: 0000008E, Length: 00000008 */

            byte[] original_bytes = {
                0x41, 0xD3, 0xD1, 0x55, 0x91, 0x80, 0x00, 0x00
            };

            double original = 1329944134.00;
            target.DataBytes = original_bytes;
            double ret = target.ReadDouble();

            Assert.IsTrue(ret == original);

            byte[] pmNullData = {
            };

            target.DataBytes = pmNullData;
            target.WriteDouble(original);
            AssertBytes(target.DataBytes, original_bytes);
        }