Exemplo n.º 1
0
        public void TestLoad()
        {
            SeriesLabelsRecord record = new SeriesLabelsRecord(TestcaseRecordInputStream.Create(0x100c, data));

            Assert.AreEqual(3, record.FormatFlags);
            Assert.AreEqual(true, record.IsShowActual);
            Assert.AreEqual(true, record.IsShowPercent);
            Assert.AreEqual(false, record.IsLabelAsPercentage);
            Assert.AreEqual(false, record.IsSmoothedLine);
            Assert.AreEqual(false, record.IsShowLabel);
            Assert.AreEqual(false, record.IsShowBubbleSizes);


            Assert.AreEqual(2 + 4, record.RecordSize);
        }
Exemplo n.º 2
0
        public void TestLoad()
        {
            SeriesLabelsRecord record = new SeriesLabelsRecord(TestcaseRecordInputStream.Create(0x100c, data));
            Assert.AreEqual(3, record.FormatFlags);
            Assert.AreEqual(true, record.IsShowActual);
            Assert.AreEqual(true, record.IsShowPercent);
            Assert.AreEqual(false, record.IsLabelAsPercentage);
            Assert.AreEqual(false, record.IsSmoothedLine);
            Assert.AreEqual(false, record.IsShowLabel);
            Assert.AreEqual(false, record.IsShowBubbleSizes);


            Assert.AreEqual(2 + 4, record.RecordSize);

        }
Exemplo n.º 3
0
        public void TestStore()
        {
            SeriesLabelsRecord record = new SeriesLabelsRecord();
            record.IsShowActual=(true);
            record.IsShowPercent=(true);
            record.IsLabelAsPercentage = (false);
            record.IsSmoothedLine = (false);
            record.IsShowLabel = (false);
            record.IsShowBubbleSizes = (false);


            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);
        }
Exemplo n.º 4
0
        public void TestStore()
        {
            SeriesLabelsRecord record = new SeriesLabelsRecord();

            record.IsShowActual        = (true);
            record.IsShowPercent       = (true);
            record.IsLabelAsPercentage = (false);
            record.IsSmoothedLine      = (false);
            record.IsShowLabel         = (false);
            record.IsShowBubbleSizes   = (false);


            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);
            }
        }