예제 #1
0
 public void AddKNodeRecursiveParentChild_ThrowsException()
 {
     KNode parentNode = new KNode();
     KNode childNode = new KNode();
     childNode.Parent = parentNode;
     parentNode.Parent = childNode;
 }
예제 #2
0
 public IKNode CreateInitializedKNode()
 {
     IKNode layoutNode = new KNode();
     KShapeLayout shapeLayout = new KShapeLayout();
     shapeLayout.Insets = new KInsets();
     layoutNode.KShapeLayout = shapeLayout;
     return layoutNode;
 }
예제 #3
0
        public void AddParentsOfAKNode_ChildListisUpdated()
        {
            KNode parentNode = new KNode();
            KNode childNode = new KNode();
            childNode.Parent = parentNode;

            Assert.AreEqual(parentNode.Children.Count, 1);
            Assert.AreEqual(childNode, parentNode.Children[0]);
        }
예제 #4
0
        public void UpdatingParentNodeOnLabelUpdatesLabelList()
        {
            KNode parentNode = new KNode();
            KLabel label = new KLabel();

            label.Parent = parentNode;

            Assert.AreEqual(label, parentNode.LabelList[0]);
        }
예제 #5
0
        public void SetTheKNodeParentToNull()
        {
            KNode parentNode = new KNode();
            KNode childNode = new KNode();
            childNode.Parent = parentNode;

            childNode.Parent = null;

            Assert.AreEqual(null, childNode.Parent);
        }
예제 #6
0
        public void SetKLabelParentToNull()
        {
            KNode parentNode = new KNode();
            KLabel label = new KLabel();

            label.Parent = parentNode;

            label.Parent = null;

            Assert.AreEqual(null, label.Parent);
            Assert.AreEqual(0, parentNode.LabelList.Count);
        }
예제 #7
0
        public void ChangeParentsOfKNode_ChildListIsChanged()
        {
            KNode oldParent = new KNode();
            KNode childNode = new KNode();
            childNode.Parent = oldParent;

            KNode newParent = new KNode();
            childNode.Parent = newParent;

            Assert.AreEqual(newParent.Children.Count, 1);
            Assert.AreEqual(oldParent.Children.Count, 0);
            Assert.AreEqual(childNode, newParent.Children[0]);
        }
예제 #8
0
        public void ChangeParentForAKLabelParentsAreUpdated()
        {
            KNode oldParent = new KNode();
            KNode newParent = new KNode();
            KLabel label = new KLabel();

            label.Parent = oldParent;
            label.Parent = newParent;

            Assert.AreEqual(0, oldParent.LabelList.Count);
            Assert.AreEqual(1, newParent.LabelList.Count);
            Assert.AreEqual(label, newParent.LabelList[0]);
        }
 public void PrepareGraphForLayout(KNode lgraph)
 {
 }
예제 #10
0
 public void DoLayout(KNode lgraph)
 {
 }
예제 #11
0
 public void SetGraphProperties(KNode kgraph)
 {
     //always graph goes to right.
     kgraph.KShapeLayout.LayoutDirection = KLay.Kiml.Enums.LayoutDirectionEnum.RIGHT;
 }