Пример #1
0
        public void TestAddCount()
        {
            OffsetList list = new OffsetList();

            Assert.IsTrue(0 == list.Count);
            list.AddOffset(0, new OsmlNav().OffsetKey);
            Assert.IsTrue(1 == list.Count);
            list.AddOffset(3, 55, ControlFactory.RESERVEDKEY_LITERAL);
            Assert.IsTrue(2 == list.Count);
        }
Пример #2
0
        public void TestListSerialize()
        {
            OffsetList list = new OffsetList();

            list.AddOffset(3, new OsmlName().OffsetKey);
            list.AddOffset(15, 44, ControlFactory.RESERVEDKEY_LITERAL);
            list.AddOffset(45, new OsmlNav().OffsetKey);

            string expected = "3:os_Name|15-44:Literal|45:os_Nav";

            string val = list.ToString();

            Assert.AreEqual(expected, val, "List serialized incorrectly");
        }
Пример #3
0
 static GadgetTestData()
 {
     ExpectedOffsetList = new OffsetList();
     ExpectedOffsetList.AddOffset(94, 397, "ContentBlock");
     ExpectedOffsetList[0].ChildOffsets.AddOffset(0, ControlFactory.RESERVEDKEY_LITERAL);
     ExpectedOffsetList[0].ChildOffsets.AddOffset(212, "os_Name");
     ExpectedOffsetList[0].ChildOffsets.AddOffset(242, ControlFactory.RESERVEDKEY_LITERAL);
 }