public IVAxisAggregate(RecordStream rs, ChartRecordAggregate container, AxisRecord axis) : base(RuleName_IVAXIS, container) { this.axis = axis; if (rs.PeekNextChartSid() == CatSerRangeRecord.sid) { catSerRange = (CatSerRangeRecord)rs.GetNext(); } Debug.Assert(rs.PeekNextChartSid() == AxcExtRecord.sid); axcExt = (AxcExtRecord)rs.GetNext(); if (rs.PeekNextChartSid() == CatLabRecord.sid) { catLab = (CatLabRecord)rs.GetNext(); } axs = new AXSAggregate(rs, this); while (rs.PeekNextChartSid() == CrtMlFrtRecord.sid) { crtmlfrtList.Add(new CrtMlFrtAggregate(rs, this)); } Record r = rs.GetNext();//EndRecord Debug.Assert(r.GetType() == typeof(EndRecord)); }
public void TestStore() { AxcExtRecord record = new AxcExtRecord(); record.MinimumDate = ((short)0); record.MaximumDate = ((short)0); record.MajorInterval = ((short)1); record.MajorUnit = ((short)0); record.MinorInterval = ((short)1); record.MinorUnit = ((short)0); record.BaseUnit = ((short)0); record.CrossDate = ((short)0); record.Options = ((short)239); record.IsAutoMin = (true); record.IsAutoMax = (true); record.IsAutoMajor = (true); record.IsAutoMinor = (true); record.IsDateAxis = (false); record.IsAutoBase = (true); record.IsAutoCross = (true); record.IsAutoDate = (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 TestLoad() { AxcExtRecord record = new AxcExtRecord(TestcaseRecordInputStream.Create((short)0x1062, data)); Assert.AreEqual(0, record.MinimumDate); Assert.AreEqual(0, record.MaximumDate); Assert.AreEqual(1, record.MajorInterval); Assert.AreEqual(0, (short)record.MajorUnit); Assert.AreEqual(1, record.MinorInterval); Assert.AreEqual(0, (short)record.MinorUnit); Assert.AreEqual(0, (short)record.BaseUnit); Assert.AreEqual(0, record.CrossDate); Assert.AreEqual(239, record.Options); Assert.AreEqual(true, record.IsAutoMin); Assert.AreEqual(true, record.IsAutoMax); Assert.AreEqual(true, record.IsAutoMajor); Assert.AreEqual(true, record.IsAutoMinor); Assert.AreEqual(false, record.IsDateAxis); Assert.AreEqual(true, record.IsAutoBase); Assert.AreEqual(true, record.IsAutoCross); Assert.AreEqual(true, record.IsAutoDate); Assert.AreEqual(22, record.RecordSize); }
private static AxcExtRecord CreateAxcExtRecord() { AxcExtRecord r = new AxcExtRecord(); r.MinimumDate = 0; r.MaximumDate = 0; r.MajorInterval = 1; r.MajorUnit = DateUnit.Days; r.MinorInterval = 1; r.MinorUnit = DateUnit.Days; r.BaseUnit = DateUnit.Days; r.CrossDate = 0; r.IsAutoMin = (true); r.IsAutoMax = (true); r.IsAutoMajor = (true); r.IsAutoMinor = (true); r.IsDateAxis = (false); r.IsAutoBase = (true); r.IsAutoCross = (true); r.IsAutoDate = (true); return(r); }