private static PageItemRecord ConfirmSerialize(String hexDump) { byte[] data = HexRead.ReadFromString(hexDump); RecordInputStream in1 = TestcaseRecordInputStream.Create(PageItemRecord.sid, data); PageItemRecord rec = new PageItemRecord(in1); Assert.AreEqual(0, in1.Remaining); Assert.AreEqual(4 + data.Length, rec.RecordSize); byte[] data2 = rec.Serialize(); TestcaseRecordInputStream.ConfirmRecordEncoding(PageItemRecord.sid, data, data2); return rec; }
public void TestMoreThanOneInfoItem_bug46917() { byte[] data = HexRead.ReadFromString("01 02 03 04 05 06 07 08 09 0A 0B 0C"); RecordInputStream in1 = TestcaseRecordInputStream.Create(PageItemRecord.sid, data); PageItemRecord rec = new PageItemRecord(in1); if (in1.Remaining == 6) { throw new AssertionException("Identified bug 46917"); } Assert.AreEqual(0, in1.Remaining); Assert.AreEqual(4 + data.Length, rec.RecordSize); }