示例#1
0
        public void TestMethod6()
        {
            var doc = new CustomDOM.Document();
            var page = new CustomDOM.Page();
            var group0 = new CustomDOM.Group();
            var group2 = new CustomDOM.Group();
            var rect0 = new CustomDOM.Rectangle();
            var rect1 = new CustomDOM.Rectangle();
            var rect2 = new CustomDOM.Rectangle();
            doc.Add(page);
            page.Add(group0);
            page.Add(group2);
            page.Add(rect0);
            group2.Add(rect1);
            group2.Add(rect2);

            Assert.AreEqual(2,group2.NodeCount);

            var groups = page.Nodes<CustomDOM.Group>().ToList();
            Assert.AreEqual(2,groups.Count);
            var rects = page.Nodes<CustomDOM.Rectangle>().ToList();
            Assert.AreEqual(1, rects.Count);

            var w_groups = page.Walk<CustomDOM.Group>().ToList();
            Assert.AreEqual(2, w_groups.Count);

            var w_rects = page.Walk<CustomDOM.Rectangle>().ToList();
            Assert.AreEqual(3, w_rects.Count);

            Assert.AreEqual(rect0, w_rects[0]);
            Assert.AreEqual(rect1, w_rects[1]);
            Assert.AreEqual(rect2, w_rects[2]);
        } 
示例#2
0
 public void TestMethod4()
 {
     var doc = new CustomDOM.Document();
     var page = new CustomDOM.Page();
     var group = new CustomDOM.Group();
     doc.Add(page);
     page.Add(group);
 }
示例#3
0
        public void TestMethod4()
        {
            var doc   = new CustomDOM.Document();
            var page  = new CustomDOM.Page();
            var group = new CustomDOM.Group();

            doc.Add(page);
            page.Add(group);
        }
示例#4
0
        public void TestMethod6()
        {
            var doc    = new CustomDOM.Document();
            var page   = new CustomDOM.Page();
            var group0 = new CustomDOM.Group();
            var group2 = new CustomDOM.Group();
            var rect0  = new CustomDOM.Rectangle();
            var rect1  = new CustomDOM.Rectangle();
            var rect2  = new CustomDOM.Rectangle();

            doc.Add(page);
            page.Add(group0);
            page.Add(group2);
            page.Add(rect0);
            group2.Add(rect1);
            group2.Add(rect2);

            Assert.AreEqual(2, group2.NodeCount);

            var groups = page.Nodes <CustomDOM.Group>().ToList();

            Assert.AreEqual(2, groups.Count);
            var rects = page.Nodes <CustomDOM.Rectangle>().ToList();

            Assert.AreEqual(1, rects.Count);

            var w_groups = page.Walk <CustomDOM.Group>().ToList();

            Assert.AreEqual(2, w_groups.Count);

            var w_rects = page.Walk <CustomDOM.Rectangle>().ToList();

            Assert.AreEqual(3, w_rects.Count);

            Assert.AreEqual(rect0, w_rects[0]);
            Assert.AreEqual(rect1, w_rects[1]);
            Assert.AreEqual(rect2, w_rects[2]);
        }
示例#5
0
        public void TestMethod3()
        {
            var group = new CustomDOM.Group();

            group.Add(group);
        }
示例#6
0
        public void TestMethod2()
        {
            var group = new CustomDOM.Group();

            group.Add((CustomDOM.Group)null);
        }
示例#7
0
 public void TestMethod3()
 {
     var group = new CustomDOM.Group();
     group.Add(group);
 }
示例#8
0
 public void TestMethod2()
 {
     var group = new CustomDOM.Group();
     group.Add((CustomDOM.Group)null);
 }