Пример #1
0
        public void DropGroupOnGroupToMakeItNestedTest()
        {
            TreeViewDragDrop dragdrop = this.CreateGroupDragDrop(this.targetGroup);

            dragdrop.Drop(null);
            Assert.IsTrue(this.sourceGroup.Parent.StoreIdEquals(this.targetGroup));
        }
Пример #2
0
        public void DropGroupToMoveToRootTest()
        {
            this.sourceGroup.Parent = this.targetGroup;
            this.Persistence.Groups.Update(this.sourceGroup);
            TreeViewDragDrop dragdrop = this.CreateGroupDragDrop(null);

            dragdrop.Drop(null);
            Assert.IsNull(this.sourceGroup.Parent);
        }
Пример #3
0
        public void DropFavoriteOnGroupToCopyTest()
        {
            TreeViewDragDrop      dragdrop   = this.CreateValidFavoriteDrop(DragDropEffects.Copy);
            Func <InputBoxResult> copyPrompt = () => new InputBoxResult()
            {
                Text = "Copy", ReturnCode = DialogResult.OK
            };

            dragdrop.CopyCommnad = new CopyFavoriteCommand(this.Persistence, copyPrompt);
            dragdrop.Drop(null);
            this.AssertTargetGroupAfterFavoriteDrop(true);
        }
Пример #4
0
        public void DropFavoriteToMoveToRootTest()
        {
            this.Persistence.Favorites.UpdateFavorite(this.sourceFavorite, new List <IGroup>()
            {
                this.sourceGroup
            });
            var args = CreateDragArguments(this.sourceFavoriteNode);

            args.Effect = DragDropEffects.Move;
            var dragdrop = new TreeViewDragDrop(this.Persistence, TestConnectionManager.Instance, args, new TestKeyModifiers(), null, null);

            dragdrop.Drop(null);
            Assert.IsFalse(this.sourceFavorite.Groups.Any(), "Favorite cant be listed in any group");
        }