Пример #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;
 }