/// <summary>
        /// Pastes the test cases to suite.
        /// </summary>
        /// <param name="testManagementTeamProject">The test management team project.</param>
        /// <param name="testPlan">The test plan.</param>
        /// <param name="suiteToAddInId">The suite automatic add information unique identifier.</param>
        /// <param name="clipBoardTestCase">The clip board test case.</param>
        /// <exception cref="System.ArgumentException">New test cases cannot be added to requirement based suites!</exception>
        public static void PasteTestCasesToSuite(ITestManagementTeamProject testManagementTeamProject, ITestPlan testPlan, int suiteToAddInId, ClipBoardTestCase clipBoardTestCase)
        {
            ITestSuiteBase suiteToAddIn = testManagementTeamProject.TestSuites.Find(suiteToAddInId);
            if (suiteToAddIn is IRequirementTestSuite)
            {
                throw new ArgumentException("New test cases cannot be added to requirement based suites!");
            }
            IStaticTestSuite suiteToAddInStatic = suiteToAddIn as IStaticTestSuite;
            ITestSuiteBase oldSuite;
            List<TestCase> allTestCasesInPlan = null;
            if (clipBoardTestCase.TestCases[0].TestSuiteId != null)
            {
                oldSuite = testManagementTeamProject.TestSuites.Find((int)clipBoardTestCase.TestCases[0].TestSuiteId);
            }
            else
            {
                oldSuite = null;
            }

            foreach (TestCase currentTestCase in clipBoardTestCase.TestCases)
            {
                ITestCase testCaseCore = null;
                if (oldSuite is IRequirementTestSuite)
                {
                    IRequirementTestSuite suite = oldSuite as IRequirementTestSuite;
                    testCaseCore = suite.TestCases.Where(x => x.TestCase != null && x.TestCase.Id.Equals(currentTestCase.TestCaseId)).FirstOrDefault().TestCase;
                }
                else if (oldSuite is IStaticTestSuite)
                {
                    IStaticTestSuite suite = oldSuite as IStaticTestSuite;
                    testCaseCore = suite.Entries.Where(x => x.TestCase != null && x.TestCase.Id.Equals(currentTestCase.TestCaseId)).FirstOrDefault().TestCase;
                }
                else if (oldSuite == null)
                {
                    if (allTestCasesInPlan == null)
                    {
                        allTestCasesInPlan = TestCaseManager.GetAllTestCasesInTestPlan(testManagementTeamProject, testPlan);                        
                    }
                    testCaseCore = allTestCasesInPlan.Where(t => t.TestCaseId.Equals(currentTestCase.TestCaseId)).FirstOrDefault().ITestCase;
                }
                if (!suiteToAddInStatic.Entries.Contains(testCaseCore))
                {
                    suiteToAddInStatic.Entries.Add(testCaseCore);
                }
                if (clipBoardTestCase.ClipBoardCommand.Equals(ClipBoardCommand.Cut))
                {
                    if (oldSuite is IStaticTestSuite)
                    {
                        IStaticTestSuite suite = oldSuite as IStaticTestSuite;
                        suite.Entries.Remove(testCaseCore);
                    }
                }
            }

            testPlan.Save();
        }
 /// <summary>
 /// Copies the automatic clipboard.
 /// </summary>
 /// <param name="isCopy">if set to <c>true</c> [copy].</param>
 /// <param name="testCases">The test cases.</param>
 public static void CopyToClipboardTestCases(bool isCopy, List<TestCase> testCases)
 {
     ClipBoardCommand clipBoardCommand = isCopy ? ClipBoardCommand.Copy : ClipBoardCommand.Cut;
     ClipBoardTestCase clipBoardTestCase = new ClipBoardTestCase(testCases, clipBoardCommand);
     ClipBoardManager<ClipBoardTestCase>.CopyToClipboard(clipBoardTestCase);
     SerializationManager.IsSerializable(clipBoardTestCase);
 }
        /// <summary>
        /// Pastes the test cases automatic suite internal.
        /// </summary>
        /// <param name="suiteToPasteIn">The suite to paste in.</param>
        /// <param name="clipBoardTestCase">The clip board test case.</param>
        private void PasteTestCasesToSuiteInternal(Suite suiteToPasteIn, ClipBoardTestCase clipBoardTestCase)
        {
            this.ShowTestCasesProgressbar();
            Task t = Task.Factory.StartNew(() =>
            {
                if (clipBoardTestCase.ClipBoardCommand.Equals(ClipBoardCommand.Copy))
                {
					TestSuiteManager.PasteTestCasesToSuite(ExecutionContext.TestManagementTeamProject, ExecutionContext.Preferences.TestPlan, suiteToPasteIn.Id, clipBoardTestCase);
                }
                else
                {
					TestSuiteManager.PasteTestCasesToSuite(ExecutionContext.TestManagementTeamProject, ExecutionContext.Preferences.TestPlan, suiteToPasteIn.Id, clipBoardTestCase);
                }
            });
            t.ContinueWith(antecedent =>
            {
                if (clipBoardTestCase.ClipBoardCommand.Equals(ClipBoardCommand.Cut))
                {
                    System.Windows.Forms.Clipboard.Clear();
                }
                this.TestCasesInitialViewModel.AddTestCasesToObservableCollection(suiteToPasteIn, clipBoardTestCase.TestCases[0].TestSuiteId);
                this.HideTestCasesProgressbar();
            }, TaskScheduler.FromCurrentSynchronizationContext());
        }