Beispiel #1
0
        public void Split_MultiplePoints()
        {
            Scope root = new Scope("012345");

            root.DefineInnerScope(3, 1);          //012|3|45

            splitter.AutoSplit(root, 2, 3, true); //01|(2|3|4)|5
            Assert.AreEqual("2", root.InnerLeftScope.InnerRightScope.Text);
            Assert.AreEqual("3", root.InnerMiddleScope.Text);
            Assert.AreEqual("4", root.InnerRightScope.InnerLeftScope.Text);
        }
Beispiel #2
0
        public void DefineInnerScope_WithleftMiddleandRightScopesasInner()
        {
            Scope root = new Scope("012345");

            root.DefineInnerScope(3, 1);//012|3|45
            ScopeSplitter splitter = new ScopeSplitter();

            splitter.AutoSplit(root, 2, 3, true);//01|(2|3|4)|5

            Scope encapsulator = root.DefineInnerScope(2, 3);

            Assert.AreEqual("2", encapsulator.InnerLeftScope.Text);
            Assert.AreEqual("3", encapsulator.InnerMiddleScope.Text);
            Assert.AreEqual("4", encapsulator.InnerRightScope.Text);
        }