public void RejectedRenameDoesntChangeAnything()
        {
            var  service       = new TestRenameService(this.Persistence.Favorites, newName => false);
            var  customCommand = new FavoriteRenameCommand(this.Persistence, service);
            bool performAction = customCommand.ValidateNewName(this.copy, ORIGINAL_NAME);

            Assert.IsFalse(performAction, "Favorite cant be changed, if user refused the rename.");
        }
        public void InitializeFavorites()
        {
            this.AddFavorite(ORIGINAL_NAME);
            this.copy = this.AddFavorite(COPY_NAME);
            // command is set to rename by default
            var service = new TestRenameService(this.Persistence.Favorites, newName => true);

            this.command = new FavoriteRenameCommand(this.Persistence, service);
        }
        public void NoDuplicitDoesntAskUser()
        {
            bool asked   = false;
            var  service = new TestRenameService(this.Persistence.Favorites, newName =>
            {
                asked = true;
                return(true);
            });
            var customCommand = new FavoriteRenameCommand(this.Persistence, service);

            customCommand.ApplyRename(this.copy, RENAMED_NAME);
            Assert.IsFalse(asked, "If there is no duplicit, user shouldnt be prompter.");
        }