public void ChordNameProcessor_HandlesOFChords(int number)
        {
            var testChordTemp = new ChordTemplate
            {
                Name        = $"OF{number}",
                DisplayName = $"OF{number}"
            };

            testChordTemp.SetFingering(1, -1, -1, -1, -1, -1);
            testChordTemp.SetFrets(8, -1, -1, -1, -1, -1);
            testArrangement.ChordTemplates.Add(testChordTemp);

            new ChordNameProcessor(new List <ImproverMessage>()).Apply(testArrangement, nullLog);

            testChordTemp.Name.Should().Be("");
            testChordTemp.DisplayName.Should().Be("");
            testChordTemp.Frets[0].Should().Be((sbyte)number);
        }
        public void SlideOutEvent_CreatesHandshape()
        {
            const int chordTime   = 20222;
            const int sustainTime = 3000;

            var phrase = new Phrase("test", (byte)(testArrangement.Levels.Count - 1), PhraseMask.None);

            testArrangement.Phrases.Add(phrase);

            var phraseIter = new PhraseIteration(chordTime, testArrangement.Phrases.Count - 1);

            testArrangement.PhraseIterations.Add(phraseIter);

            var template = new ChordTemplate();

            template.SetFingering(1, 3, 3, -1, -1, -1);
            template.SetFrets(1, 3, 4, -1, -1, -1);

            testArrangement.ChordTemplates.Add(template);
            short chordId = (short)(testArrangement.ChordTemplates.Count - 1);

            var chord = new Chord
            {
                ChordId    = chordId,
                Time       = chordTime,
                ChordNotes = new List <Note>
                {
                    new Note
                    {
                        String         = 0,
                        Fret           = 1,
                        SlideUnpitchTo = 5,
                        Sustain        = sustainTime
                    },
                    new Note
                    {
                        String         = 1,
                        Fret           = 3,
                        SlideUnpitchTo = 7,
                        Sustain        = sustainTime
                    },
                    new Note
                    {
                        String         = 2,
                        Fret           = 3,
                        SlideUnpitchTo = 7,
                        Sustain        = sustainTime
                    }
                }
            };

            var hardestLevel = testArrangement.Levels.Last();

            var handshape = new HandShape(chordId, chordTime, chordTime + sustainTime);

            hardestLevel.Chords.Add(chord);
            hardestLevel.HandShapes.Add(handshape);
            testArrangement.Events.Add(new Event("so", chordTime));

            int handShapeCount     = hardestLevel.HandShapes.Count;
            int chordTemplateCount = testArrangement.ChordTemplates.Count;

            new CustomEventPostProcessor(new List <ImproverMessage>()).Apply(testArrangement, nullLog);

            testArrangement.Events.Should().NotContain(ev => ev.Code == "so");
            hardestLevel.HandShapes.Should().HaveCount(handShapeCount + 1);
            testArrangement.ChordTemplates.Should().HaveCount(chordTemplateCount + 1);
            handshape.EndTime.Should().BeLessThan(chordTime + sustainTime);
        }