mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 21:32:57 +08:00
Refactor beatmap set overlay test scene
This commit is contained in:
parent
f54f6e552b
commit
72f729cf3b
@ -41,6 +41,9 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
typeof(SuccessRate),
|
typeof(SuccessRate),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private RulesetInfo maniaRuleset;
|
||||||
|
private RulesetInfo taikoRuleset;
|
||||||
|
|
||||||
public TestSceneBeatmapSetOverlay()
|
public TestSceneBeatmapSetOverlay()
|
||||||
{
|
{
|
||||||
Add(overlay = new BeatmapSetOverlay());
|
Add(overlay = new BeatmapSetOverlay());
|
||||||
@ -49,13 +52,25 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(RulesetStore rulesets)
|
private void load(RulesetStore rulesets)
|
||||||
{
|
{
|
||||||
var mania = rulesets.GetRuleset(3);
|
maniaRuleset = rulesets.GetRuleset(3);
|
||||||
var taiko = rulesets.GetRuleset(1);
|
taikoRuleset = rulesets.GetRuleset(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestLoading()
|
||||||
|
{
|
||||||
AddStep(@"show loading", () => overlay.ShowBeatmapSet(null));
|
AddStep(@"show loading", () => overlay.ShowBeatmapSet(null));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestOnline()
|
||||||
|
{
|
||||||
AddStep(@"show online", () => overlay.FetchAndShowBeatmapSet(55));
|
AddStep(@"show online", () => overlay.FetchAndShowBeatmapSet(55));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestLocalBeatmaps()
|
||||||
|
{
|
||||||
AddStep(@"show first", () =>
|
AddStep(@"show first", () =>
|
||||||
{
|
{
|
||||||
overlay.ShowBeatmapSet(new BeatmapSetInfo
|
overlay.ShowBeatmapSet(new BeatmapSetInfo
|
||||||
@ -94,7 +109,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
{
|
{
|
||||||
StarDifficulty = 1.36,
|
StarDifficulty = 1.36,
|
||||||
Version = @"BASIC",
|
Version = @"BASIC",
|
||||||
Ruleset = mania,
|
Ruleset = maniaRuleset,
|
||||||
BaseDifficulty = new BeatmapDifficulty
|
BaseDifficulty = new BeatmapDifficulty
|
||||||
{
|
{
|
||||||
CircleSize = 4,
|
CircleSize = 4,
|
||||||
@ -120,7 +135,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
{
|
{
|
||||||
StarDifficulty = 2.22,
|
StarDifficulty = 2.22,
|
||||||
Version = @"NOVICE",
|
Version = @"NOVICE",
|
||||||
Ruleset = mania,
|
Ruleset = maniaRuleset,
|
||||||
BaseDifficulty = new BeatmapDifficulty
|
BaseDifficulty = new BeatmapDifficulty
|
||||||
{
|
{
|
||||||
CircleSize = 4,
|
CircleSize = 4,
|
||||||
@ -146,7 +161,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
{
|
{
|
||||||
StarDifficulty = 3.49,
|
StarDifficulty = 3.49,
|
||||||
Version = @"ADVANCED",
|
Version = @"ADVANCED",
|
||||||
Ruleset = mania,
|
Ruleset = maniaRuleset,
|
||||||
BaseDifficulty = new BeatmapDifficulty
|
BaseDifficulty = new BeatmapDifficulty
|
||||||
{
|
{
|
||||||
CircleSize = 4,
|
CircleSize = 4,
|
||||||
@ -172,7 +187,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
{
|
{
|
||||||
StarDifficulty = 4.24,
|
StarDifficulty = 4.24,
|
||||||
Version = @"EXHAUST",
|
Version = @"EXHAUST",
|
||||||
Ruleset = mania,
|
Ruleset = maniaRuleset,
|
||||||
BaseDifficulty = new BeatmapDifficulty
|
BaseDifficulty = new BeatmapDifficulty
|
||||||
{
|
{
|
||||||
CircleSize = 4,
|
CircleSize = 4,
|
||||||
@ -198,7 +213,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
{
|
{
|
||||||
StarDifficulty = 5.26,
|
StarDifficulty = 5.26,
|
||||||
Version = @"GRAVITY",
|
Version = @"GRAVITY",
|
||||||
Ruleset = mania,
|
Ruleset = maniaRuleset,
|
||||||
BaseDifficulty = new BeatmapDifficulty
|
BaseDifficulty = new BeatmapDifficulty
|
||||||
{
|
{
|
||||||
CircleSize = 4,
|
CircleSize = 4,
|
||||||
@ -261,7 +276,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
{
|
{
|
||||||
StarDifficulty = 1.40,
|
StarDifficulty = 1.40,
|
||||||
Version = @"yzrin's Kantan",
|
Version = @"yzrin's Kantan",
|
||||||
Ruleset = taiko,
|
Ruleset = taikoRuleset,
|
||||||
BaseDifficulty = new BeatmapDifficulty
|
BaseDifficulty = new BeatmapDifficulty
|
||||||
{
|
{
|
||||||
CircleSize = 2,
|
CircleSize = 2,
|
||||||
@ -287,7 +302,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
{
|
{
|
||||||
StarDifficulty = 2.23,
|
StarDifficulty = 2.23,
|
||||||
Version = @"Futsuu",
|
Version = @"Futsuu",
|
||||||
Ruleset = taiko,
|
Ruleset = taikoRuleset,
|
||||||
BaseDifficulty = new BeatmapDifficulty
|
BaseDifficulty = new BeatmapDifficulty
|
||||||
{
|
{
|
||||||
CircleSize = 2,
|
CircleSize = 2,
|
||||||
@ -313,7 +328,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
{
|
{
|
||||||
StarDifficulty = 3.19,
|
StarDifficulty = 3.19,
|
||||||
Version = @"Muzukashii",
|
Version = @"Muzukashii",
|
||||||
Ruleset = taiko,
|
Ruleset = taikoRuleset,
|
||||||
BaseDifficulty = new BeatmapDifficulty
|
BaseDifficulty = new BeatmapDifficulty
|
||||||
{
|
{
|
||||||
CircleSize = 2,
|
CircleSize = 2,
|
||||||
@ -339,7 +354,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
{
|
{
|
||||||
StarDifficulty = 3.97,
|
StarDifficulty = 3.97,
|
||||||
Version = @"Charlotte's Oni",
|
Version = @"Charlotte's Oni",
|
||||||
Ruleset = taiko,
|
Ruleset = taikoRuleset,
|
||||||
BaseDifficulty = new BeatmapDifficulty
|
BaseDifficulty = new BeatmapDifficulty
|
||||||
{
|
{
|
||||||
CircleSize = 5,
|
CircleSize = 5,
|
||||||
@ -365,7 +380,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
{
|
{
|
||||||
StarDifficulty = 5.08,
|
StarDifficulty = 5.08,
|
||||||
Version = @"Labyrinth Oni",
|
Version = @"Labyrinth Oni",
|
||||||
Ruleset = taiko,
|
Ruleset = taikoRuleset,
|
||||||
BaseDifficulty = new BeatmapDifficulty
|
BaseDifficulty = new BeatmapDifficulty
|
||||||
{
|
{
|
||||||
CircleSize = 5,
|
CircleSize = 5,
|
||||||
@ -390,8 +405,17 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestHide()
|
||||||
|
{
|
||||||
AddStep(@"hide", overlay.Hide);
|
AddStep(@"hide", overlay.Hide);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestShowWithNoReload()
|
||||||
|
{
|
||||||
AddStep(@"show without reload", overlay.Show);
|
AddStep(@"show without reload", overlay.Show);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user