コード例 #1
0
        public void MoveRightTestT3()
        {
            _manager.RegisterInitialActions(_actions);

            //Arbre initial :
            //  G1 1
            //      T1 1.1
            //      T2 1.2
            //          T21 1.2.1
            //          T22 1.2.2
            //      T3 1.3
            //          T31 1.3.1
            //      T4 1.4

            _manager.MoveRight((ActionGridItem)_collection[5]);

            //Arbre attendu :
            //  G1 1
            //      T1 1.1
            //      T2 1.2
            //          T21 1.2.1
            //          T22 1.2.2
            //          T3 1.2.3
            //          T31 1.2.4
            //      T4 1.3

            InitItemsCollectionAssertions();
            AssertAction(_g1, 0, "1");
            AssertAction(_t1, 1, "1.1");
            AssertAction(_t2, 1, "1.2");
            AssertAction(_t21, 2, "1.2.1");
            AssertAction(_t22, 2, "1.2.2");
            AssertAction(_t3, 2, "1.2.3");
            AssertAction(_t31, 2, "1.2.4");
            AssertAction(_t4, 1, "1.3");
            EndItemsCollectionAssertions();
        }
コード例 #2
0
        public void TestMoveRight()
        {
            var g1 = new KAction()
            {
                Label = "G1", WBS = "1"
            };
            var t1 = new KAction()
            {
                Label = "T1", WBS = "1.1"
            };
            var t11 = new KAction()
            {
                Label = "T11", WBS = "1.1.1"
            };
            var t2 = new KAction()
            {
                Label = "T2", WBS = "1.2"
            };
            var t3 = new KAction()
            {
                Label = "T3", WBS = "1.3"
            };
            var t4 = new KAction()
            {
                Label = "T4", WBS = "1.4"
            };
            var xcvb = new KAction()
            {
                Label = "xcvb", WBS = "2"
            };
            var xbc = new KAction()
            {
                Label = "xbc", WBS = "3"
            };
            var vcxbv = new KAction()
            {
                Label = "vcxbv", WBS = "3.1"
            };

            var actions = new List <KAction>()
            {
                g1, t1, t11, t2, t3, t4, xcvb, xbc, vcxbv
            };

            var collection = new BulkObservableCollection <DataTreeGridItem>();

            var manager = new GridActionsManager(collection, null, null);

            manager.ChangeView(GanttGridView.WBS, null);

            manager.RegisterInitialActions(actions);

            manager.MoveRight((ActionGridItem)collection[3]);

            AssertWBS(g1, "1");
            AssertWBS(t1, "1.1");
            AssertWBS(t11, "1.1.1");

            AssertWBS(t2, "1.1.2");
            AssertWBS(t3, "1.2");
            AssertWBS(t4, "1.3");
            AssertWBS(xcvb, "2");
            AssertWBS(xbc, "3");
            AssertWBS(vcxbv, "3.1");
        }