1.0 KiB
1.0 KiB
Test audio fixture guidance
The current unit tests avoid committing real audio binaries and instead use byte[] plus a mocked AudioTagExtractor.
Recommended real-file fixtures if you later want integration tests:
-
valid-square-cover.flac- Tags:
title,artist,album_artist,album,track=01/12 - Embedded PNG cover
320x320 - UTF-8 encoded text
- Tags:
-
missing-cover.mp3- Same core tags as above
- No embedded artwork
- Expected validator result:
COVER_MISSING
-
bad-track.m4a- Track stored as
1instead of01/12 - Expected validator result:
INVALID_FORMAT
- Track stored as
-
garbled-title.ogg- Title intentionally stored with broken encoding bytes so it decodes to
Bad <20> Title - Expected reader encoding result:
UNKNOWN
- Title intentionally stored with broken encoding bytes so it decodes to
To generate those fixtures quickly, ffmpeg plus a tagging tool is enough:
ffmpeg -f lavfi -i sine=frequency=440:duration=1 -c:a flac valid.flac
Then embed tags and artwork with a dedicated tag editor, or continue mocking AudioTagExtractor in unit tests for faster coverage.