Factor out general file presence checking

This allows us to use the same method of checking for other files that should exist, for example the audio file.

By using the same method, they all share test cases too.
This commit is contained in:
Naxess
2021-04-18 02:07:33 +02:00
parent 0502fbb429
commit 010720de74
4 changed files with 41 additions and 19 deletions

View File

@ -16,8 +16,11 @@ namespace osu.Game.Rulesets.Edit
{
private readonly List<ICheck> checks = new List<ICheck>
{
new CheckBackground(),
new CheckBackgroundQuality()
// Resources
new CheckBackgroundPresence(),
new CheckBackgroundQuality(),
// Audio
new CheckAudioPresence(),
};
public IEnumerable<Issue> Run(WorkingBeatmap workingBeatmap) => checks.SelectMany(check => check.Run(workingBeatmap));