private void GetChords_DetectionSettings_EventsCollection(
            ContainerType containerType,
            ChordDetectionSettings settings,
            ICollection <MidiEvent> midiEvents,
            ICollection <Chord> expectedChords)
        {
            switch (containerType)
            {
            case ContainerType.EventsCollection:
            {
                var eventsCollection = new EventsCollection();
                eventsCollection.AddRange(midiEvents);

                var chords = eventsCollection.GetChords(settings);
                MidiAsserts.AreEqual(expectedChords, chords, "Chords are invalid.");

                var timedObjets = eventsCollection.GetObjects(ObjectType.Chord, new ObjectDetectionSettings {
                        ChordDetectionSettings = settings
                    });
                MidiAsserts.AreEqual(expectedChords, timedObjets, "Chords are invalid from GetObjects.");
            }
            break;

            case ContainerType.TrackChunk:
            {
                var trackChunk = new TrackChunk(midiEvents);

                var chords = trackChunk.GetChords(settings);
                MidiAsserts.AreEqual(expectedChords, chords, "Chords are invalid.");

                var timedObjets = trackChunk.GetObjects(ObjectType.Chord, new ObjectDetectionSettings {
                        ChordDetectionSettings = settings
                    });
                MidiAsserts.AreEqual(expectedChords, timedObjets, "Chords are invalid from GetObjects.");
            }
            break;

            case ContainerType.TrackChunks:
            case ContainerType.File:
            {
                GetChords_DetectionSettings_TrackChunks(
                    containerType == ContainerType.File,
                    settings,
                    new[] { midiEvents },
                    expectedChords);
            }
            break;
            }
        }