public void DropGroupOnGroupToMakeItNestedTest()
        {
            TreeViewDragDrop dragdrop = this.CreateGroupDragDrop(this.targetGroup);

            dragdrop.Drop(null);
            Assert.IsTrue(this.sourceGroup.Parent.StoreIdEquals(this.targetGroup));
        }
        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);
        }
        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);
        }
        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");
        }