public void TestHeader02() { AMFDataParser target = new AMFDataParser(); // TODO: Initialize to an appropriate value /* T:\mat\Research\Technology\AMF\Samples\farm-tr-fb.socialgamenet.com-20-request.bin (2/21/2012 1:35:38 PM) StartOffset: 00000028, EndOffset: 00000037, Length: 00000010 */ byte[] original_bytes = { 0x00,0x03,0x00,0x00 }; //MetaObject original; target.DataBytes = original_bytes; target.ReadAMFHeader(); object ChildNewData; string parsed_array_str = target.EnumerateNodes(target.ParsedArray, out ChildNewData); Debug.WriteLine(parsed_array_str); //TODO: Assert.IsTrue(parsed == original); byte[] pmNullData = { }; target.DataBytes = pmNullData; target.WriteAMFHeader(); Debug.WriteLine(String.Format("target.DataBytes.Length: 0x{0:X} vs Original Bytes Length: 0x{1:X}\r\n", target.DataBytes.Length, original_bytes.Length)); DumpHex(original_bytes); DumpHex(target.DataBytes); AssertBytes(target.DataBytes, original_bytes); Debug.WriteLine(target.GetDebugMessage()); }