Ejemplo n.º 1
0
        public void TestMethod1()
        {
            FMTreeNode        node    = new FMTreeNode();
            List <ObjectType> objects = node.ToObjectList();

            Assert.AreEqual(0, objects.Count);
        }
Ejemplo n.º 2
0
        public void TestMethod2()
        {
            FMTreeNode node = new FMTreeNode();

            node.baseModelObject = new ObjectType();
            List <ObjectType> objects = node.ToObjectList();

            Assert.AreEqual(1, objects.Count);
        }
Ejemplo n.º 3
0
        public void TestMethod4Parent()
        {
            FMTreeNode node1 = new FMTreeNode();

            FMTreeNode node2 = new FMTreeNode();

            node2.baseModelObject = new ObjectType();
            node2.parent          = node1;

            List <ObjectType> objects = node1.ToObjectList();

            Assert.AreEqual(0, objects.Count);
        }
Ejemplo n.º 4
0
        public void TestMethod4Children()
        {
            FMTreeNode node1 = new FMTreeNode();

            FMTreeNode node2 = new FMTreeNode();

            node2.baseModelObject = new ObjectType();
            node1.children.Add(node2);

            List <ObjectType> objects = node1.ToObjectList();

            Assert.AreEqual(1, objects.Count);
        }
Ejemplo n.º 5
0
        public void TestMultipleParent()
        {
            FMTreeNode node1 = new FMTreeNode();

            node1.baseModelObject = new ObjectType();

            FMTreeNode node2 = new FMTreeNode();

            node2.baseModelObject = new ObjectType();
            node1.children.Add(node2);
            node2.parent = node1;
            node2.parent = node1;
            node2.parent = node1;
            node2.parent = node1;

            List <ObjectType> objects = node1.ToObjectList();

            Assert.AreEqual(2, objects.Count);
        }
Ejemplo n.º 6
0
        public void TestMoveNodeUsingParent()
        {
            FMTreeNode node1 = new FMTreeNode();

            node1.baseModelObject = new ObjectType();

            FMTreeNode node2 = new FMTreeNode();

            node2.baseModelObject = new ObjectType();

            FMTreeNode node3 = new FMTreeNode();

            node3.baseModelObject = new ObjectType();
            node3.parent          = node1;
            node3.parent          = node2;

            List <ObjectType> objects1 = node1.ToObjectList();

            Assert.AreEqual(1, objects1.Count);
            List <ObjectType> objects2 = node2.ToObjectList();

            Assert.AreEqual(1, objects2.Count);
        }