public void TestElementOrdering() { ArrayPtg ptg = Create(ENCODED_PTG_DATA, ENCODED_CONSTANT_DATA); Assert.AreEqual(3, ptg.ColumnCount); Assert.AreEqual(2, ptg.RowCount); Assert.AreEqual(0, ptg.GetValueIndex(0, 0)); Assert.AreEqual(1, ptg.GetValueIndex(1, 0)); Assert.AreEqual(2, ptg.GetValueIndex(2, 0)); Assert.AreEqual(3, ptg.GetValueIndex(0, 1)); Assert.AreEqual(4, ptg.GetValueIndex(1, 1)); Assert.AreEqual(5, ptg.GetValueIndex(2, 1)); }
public void TestElementOrdering() { ArrayPtg ptg = new ArrayPtg(TestcaseRecordInputStream.CreateWithFakeSid(ENCODED_PTG_DATA)); ptg.ReadTokenValues(TestcaseRecordInputStream.CreateWithFakeSid(ENCODED_CONSTANT_DATA)); Assert.AreEqual(3, ptg.ColumnCount); Assert.AreEqual(2, ptg.RowCount); Assert.AreEqual(0, ptg.GetValueIndex(0, 0)); Assert.AreEqual(2, ptg.GetValueIndex(1, 0)); Assert.AreEqual(4, ptg.GetValueIndex(2, 0)); Assert.AreEqual(1, ptg.GetValueIndex(0, 1)); Assert.AreEqual(3, ptg.GetValueIndex(1, 1)); Assert.AreEqual(5, ptg.GetValueIndex(2, 1)); }