コード例 #1
0
ファイル: DatAggregate.cs プロジェクト: xewn/Npoi.Core
        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));
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
        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);
            }
        }