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