public void DeleteHashBinsAndSubfingerprintsOnTrackDelete()
        {
            TagInfo tagInfo        = GetTagInfo(1);
            var     track          = new TrackInfo(tagInfo.ISRC, tagInfo.Title, tagInfo.Artist);
            var     trackReference = trackDao.InsertTrack(track, tagInfo.Duration).TrackReference;
            var     hashData       = FingerprintCommandBuilder.Instance
                                     .BuildFingerprintCommand()
                                     .From(GetAudioSamples())
                                     .UsingServices(audioService)
                                     .Hash()
                                     .Result;

            subFingerprintDao.InsertHashDataForTrack(hashData.Audio, trackReference);
            var actualTrack = trackDao.ReadTrackById(tagInfo.ISRC);

            actualTrack.Should().NotBeNull();
            AssertTracksAreEqual(track, actualTrack);

            // Act
            int modifiedRows = trackDao.DeleteTrack(trackReference) + subFingerprintDao.DeleteSubFingerprintsByTrackReference(trackReference);

            trackDao.ReadTrackById(tagInfo.ISRC).Should().BeNull();
            subFingerprintDao.ReadHashedFingerprintsByTrackReference(actualTrack.TrackReference).Should().BeEmpty();
            modifiedRows.Should().Be(1 + hashData.Count + (25 * hashData.Count));
        }
 private void InsertHashedFingerprintsForTrack(IEnumerable <HashedFingerprint> hashedFingerprints, IModelReference trackReference)
 {
     subFingerprintDao.InsertHashDataForTrack(hashedFingerprints, trackReference);
 }