private void RunTest(CopyPaste.PatchDuplication patchNameSetting, string ignoreFragments,
                             int sourceIndex, int destinationCompareIndex,
                             bool patchNamesEqual, int destinationIndex, bool pasted)
        {
            SetUp();
            Settings.Default.CopyPaste_OverwriteFilledPrograms             = true;
            Settings.Default.CopyPaste_PatchDuplicationName                = (int)patchNameSetting;
            Settings.Default.CopyPaste_IgnoreCharactersForPatchDuplication = ignoreFragments;

            var program2  = ((ProgramBank)_pcgOs2.ProgramBanks["I-A"])[sourceIndex]; // I-A000 Kronos grand.
            var commands2 = new CopyPasteCommands();
            var patches   = new ObservableCollectionEx <IPatch> {
                program2
            };

            var clipBoard = new PcgClipBoard();

            program2.IsSelected = true;
            commands2.CopyPasteCopy(clipBoard, _pcgOs2, PcgViewModel.ScopeSet.Patches, true,
                                    false, false, false, false, false, false,
                                    null, patches, false);

            var icBank = (ProgramBank)_pcgOs3.ProgramBanks["I-C"];

            if (patchNamesEqual)
            {
                Assert.AreEqual(program2.Name, icBank[destinationCompareIndex].Name);
            }

            var program3 = icBank[destinationIndex];
            var patches3 = new ObservableCollectionEx <IPatch> {
                program3
            };

            program3.Clear();
            program3.IsSelected = true;
            Assert.AreNotEqual(program2.Name, program3.Name);

            commands2.CopyPastePaste(clipBoard, _pcgOs3, PcgViewModel.ScopeSet.Patches, true,
                                     false, false, false, false, false, false,
                                     null, patches3);

            if (pasted)
            {
                Assert.AreEqual(program2.Name, program3.Name);
            }
            else
            {
                Assert.AreNotEqual(program2.Name, program3.Name);
            }
        }
        public void CopyProgramDefault()
        {
            SetUp();

            var program2  = ((ProgramBank)_pcgOs2.ProgramBanks[0])[0];
            var commands2 = new CopyPasteCommands();
            var banks     = new ObservableCollectionEx <IBank>();
            var patches   = new ObservableCollectionEx <IPatch> {
                program2
            };

            var clipBoard = new PcgClipBoard();

            program2.IsSelected = true;
            commands2.CopyPasteCopy(clipBoard, _pcgOs2, PcgViewModel.ScopeSet.Patches, true,
                                    false, false, false, false, false, false,
                                    null, patches, false);

            var commands3 = new CopyPasteCommands();
            var program3  = _pcgOs3.ProgramBanks[0][0];
            var patches3  = new ObservableCollectionEx <IPatch>()
            {
                program3
            };

            banks.Add(program3.Parent as IBank);

            program3.Clear();
            program3.IsSelected = true;
            Assert.AreNotEqual(program2.Name, program3.Name);

            commands3.CopyPastePaste(clipBoard, _pcgOs3, PcgViewModel.ScopeSet.Patches, true,
                                     false, false, false, false, false, false,
                                     banks, patches3);
            Assert.AreEqual(program2.Name, program3.Name);
        }