Exemple #1
0
        public void TestCreateFromOther()
        {
            HCData cdata = new HCData("Test");

            Assert.Equal("Test", cdata.Value);

            HCData ncdata = new HCData(cdata);

            Assert.Equal("Test", ncdata.Value);
        }
Exemple #2
0
        public void TestClone()
        {
            HCData cdata = new HCData("Test");

            HContainer parent = new HElement("test");

            parent.Add(cdata);
            Assert.Same(cdata, parent.FirstNode);
            Assert.Same(cdata, parent.LastNode);

            HContainer otherParent = new HElement("test");

            // Do clone
            otherParent.Add(cdata);

            Assert.IsType <HCData>(otherParent.FirstNode);
            Assert.NotSame(otherParent.FirstNode, parent.FirstNode);
        }
Exemple #3
0
        public void TestCreate()
        {
            HCData cdata = new HCData("Test");

            Assert.Equal("Test", cdata.Value);
        }