Esempio n. 1
0
        public void TestListDeserialize()
        {
            string     str  = "3:os_Name|15-44:Literal|45:os_Nav";
            OffsetList list = new OffsetList();

            Assert.IsTrue(0 == list.Count);
            list.DeserializeString(str);
            Assert.IsTrue(3 == list.Count, "Loaded count wrong");
            Assert.AreEqual(new OsmlName().OffsetKey, list[0].OffsetKey, "First item of wrong type");
            Assert.AreEqual(new OsmlNav().OffsetKey, list[list.Count - 1].OffsetKey, "Last item of wrong type");
        }
Esempio n. 2
0
        public void TestListDeserialize()
        {
            string     str  = "3:SampleHeading|15-44:Literal|45:mytest_SampleContainer";
            OffsetList list = new OffsetList();

            Assert.IsTrue(0 == list.Count);
            list.DeserializeString(str);
            Assert.IsTrue(3 == list.Count, "Loaded count wrong");
            Assert.AreEqual(new SampleHeading().OffsetKey, list[0].OffsetKey, "First item of wrong type");
            Assert.AreEqual(new SampleContainerControl().OffsetKey, list[list.Count - 1].OffsetKey, "Last item of wrong type");
        }