Add a catch specific player test

This commit is contained in:
Dean Herbert
2017-09-19 21:40:57 +09:00
parent 0aa152974a
commit f96875a470
3 changed files with 30 additions and 2 deletions

View File

@ -16,7 +16,7 @@ using OpenTK.Graphics;
namespace osu.Game.Tests.Visual
{
internal class TestCasePlayer : OsuTestCase
public class TestCasePlayer : OsuTestCase
{
protected Player Player;
private RulesetStore rulesets;
@ -45,7 +45,7 @@ namespace osu.Game.Tests.Visual
loadPlayerFor(rulesets.Query<RulesetInfo>().First());
}
private void loadPlayerFor(RulesetInfo r)
protected virtual Beatmap CreateBeatmap()
{
Beatmap beatmap;
@ -53,6 +53,13 @@ namespace osu.Game.Tests.Visual
using (var reader = new StreamReader(stream))
beatmap = BeatmapDecoder.GetDecoder(reader).Decode(reader);
return beatmap;
}
private void loadPlayerFor(RulesetInfo r)
{
var beatmap = CreateBeatmap();
beatmap.BeatmapInfo.Ruleset = r;
var instance = r.CreateInstance();