Esempio n. 1
0
        public XCheckList GetData()
        {
            var result = new XCheckList();

            result.Header = Header.GetData();
            result.Root   = Root.GetData();

            return(result);
        }
Esempio n. 2
0
        public void XCheckList_SerializationTest()
        {
            var actual = new XCheckList();

            actual.Header.WorkItem = "111";
            actual.Root.Name       = "task";
            actual.Root.Item.Add(new XCheckItem()
            {
                Name = "subtask"
            });

            XCheckList expected;

            using (var ms = new MemoryStream())
            {
                actual.Serialize(ms);
                ms.Position = 0L;
                expected    = XCheckList.Deserialize(ms);
            }

            Assert.AreEqual(expected.Header.WorkItem, "111");
            Assert.AreEqual(expected.Root.Name, "task");
            Assert.AreEqual(expected.Root.Item[0].Name, "subtask");
        }