Take IWorkingBeatmap instead of WorkingBeatmap

This makes testing much easier, and allows for checking of any class deriving from that interface, including `WorkingBeatmap`.
This commit is contained in:
Naxess
2021-04-18 01:21:20 +02:00
parent abf512532e
commit 56bf49c85c
4 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Checks
new IssueTemplateOffscreenSlider(this) new IssueTemplateOffscreenSlider(this)
}; };
public IEnumerable<Issue> Run(WorkingBeatmap workingBeatmap) public IEnumerable<Issue> Run(IWorkingBeatmap workingBeatmap)
{ {
foreach (var hitobject in workingBeatmap.Beatmap.HitObjects) foreach (var hitobject in workingBeatmap.Beatmap.HitObjects)
{ {

View File

@ -17,7 +17,7 @@ namespace osu.Game.Rulesets.Edit.Checks
new IssueTemplateDoesNotExist(this) new IssueTemplateDoesNotExist(this)
}; };
public IEnumerable<Issue> Run(WorkingBeatmap workingBeatmap) public IEnumerable<Issue> Run(IWorkingBeatmap workingBeatmap)
{ {
string backgroundFile = workingBeatmap.Beatmap.Metadata?.BackgroundFile; string backgroundFile = workingBeatmap.Beatmap.Metadata?.BackgroundFile;

View File

@ -30,7 +30,7 @@ namespace osu.Game.Rulesets.Edit.Checks
new IssueTemplateTooUncompressed(this) new IssueTemplateTooUncompressed(this)
}; };
public IEnumerable<Issue> Run(WorkingBeatmap workingBeatmap) public IEnumerable<Issue> Run(IWorkingBeatmap workingBeatmap)
{ {
var backgroundFile = workingBeatmap.Beatmap.Metadata?.BackgroundFile; var backgroundFile = workingBeatmap.Beatmap.Metadata?.BackgroundFile;
if (backgroundFile == null) if (backgroundFile == null)

View File

@ -25,6 +25,6 @@ namespace osu.Game.Rulesets.Edit.Checks.Components
/// Runs this check and returns any issues detected for the provided beatmap. /// Runs this check and returns any issues detected for the provided beatmap.
/// </summary> /// </summary>
/// <param name="workingBeatmap">The beatmap to run the check on.</param> /// <param name="workingBeatmap">The beatmap to run the check on.</param>
public IEnumerable<Issue> Run(WorkingBeatmap workingBeatmap); public IEnumerable<Issue> Run(IWorkingBeatmap workingBeatmap);
} }
} }