public DatAggregate(RecordStream rs, ChartRecordAggregate container) : base(RuleName_DAT, container) { dat = (DatRecord)rs.GetNext(); rs.GetNext(); ld = new LDAggregate(rs, this); Record r = rs.GetNext();//EndRecord Debug.Assert(r.GetType() == typeof(EndRecord)); }
public void TestLoad() { DatRecord record = new DatRecord(TestcaseRecordInputStream.Create((short)0x1063, data)); Assert.AreEqual(0xD, record.Options); Assert.AreEqual(true, record.IsHorizontalBorder()); Assert.AreEqual(false, record.IsVerticalBorder()); Assert.AreEqual(true, record.IsBorder()); Assert.AreEqual(true, record.IsShowSeriesKey()); Assert.AreEqual(6, record.RecordSize); }
public void TestStore() { DatRecord record = new DatRecord(); record.SetHorizontalBorder(true); record.SetVerticalBorder(false); record.SetBorder(true); record.SetShowSeriesKey(true); byte[] recordBytes = record.Serialize(); Assert.AreEqual(recordBytes.Length - 4, data.Length); for (int i = 0; i < data.Length; i++) Assert.AreEqual(data[i], recordBytes[i + 4], "At offset " + i); }
public void TestStore() { DatRecord record = new DatRecord(); record.SetHorizontalBorder(true); record.SetVerticalBorder(false); record.SetBorder(true); record.SetShowSeriesKey(true); byte[] recordBytes = record.Serialize(); Assert.AreEqual(recordBytes.Length - 4, data.Length); for (int i = 0; i < data.Length; i++) { Assert.AreEqual(data[i], recordBytes[i + 4], "At offset " + i); } }