mirror of
https://github.com/ppy/osu
synced 2025-02-13 08:37:48 +00:00
Adjust existing test coverage
This commit is contained in:
parent
5c049feca1
commit
b30a6d5224
@ -37,15 +37,9 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
[SetUp]
|
[SetUp]
|
||||||
public void Setup() => Schedule(() => Child = advancedStats = new TestAdvancedStats
|
public void Setup() => Schedule(() => Child = advancedStats = new TestAdvancedStats
|
||||||
{
|
{
|
||||||
Width = 500
|
Width = 500,
|
||||||
});
|
});
|
||||||
|
|
||||||
[SetUpSteps]
|
|
||||||
public void SetUpSteps()
|
|
||||||
{
|
|
||||||
AddStep("reset game ruleset", () => Ruleset.Value = new OsuRuleset().RulesetInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
private BeatmapInfo exampleBeatmapInfo => new BeatmapInfo
|
private BeatmapInfo exampleBeatmapInfo => new BeatmapInfo
|
||||||
{
|
{
|
||||||
Ruleset = rulesets.AvailableRulesets.First(),
|
Ruleset = rulesets.AvailableRulesets.First(),
|
||||||
@ -74,45 +68,12 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestManiaFirstBarTextManiaBeatmap()
|
public void TestFirstBarText()
|
||||||
{
|
{
|
||||||
AddStep("set game ruleset to mania", () => Ruleset.Value = new ManiaRuleset().RulesetInfo);
|
AddStep("set ruleset to mania", () => advancedStats.Ruleset.Value = new ManiaRuleset().RulesetInfo);
|
||||||
|
|
||||||
AddStep("set beatmap", () => advancedStats.BeatmapInfo = new BeatmapInfo
|
|
||||||
{
|
|
||||||
Ruleset = rulesets.GetRuleset(3) ?? throw new InvalidOperationException("osu!mania ruleset not found"),
|
|
||||||
Difficulty = new BeatmapDifficulty
|
|
||||||
{
|
|
||||||
CircleSize = 5,
|
|
||||||
DrainRate = 4.3f,
|
|
||||||
OverallDifficulty = 4.5f,
|
|
||||||
ApproachRate = 3.1f
|
|
||||||
},
|
|
||||||
StarRating = 8
|
|
||||||
});
|
|
||||||
|
|
||||||
AddAssert("first bar text is correct", () => advancedStats.ChildrenOfType<SpriteText>().First().Text == BeatmapsetsStrings.ShowStatsCsMania);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void TestManiaFirstBarTextConvert()
|
|
||||||
{
|
|
||||||
AddStep("set game ruleset to mania", () => Ruleset.Value = new ManiaRuleset().RulesetInfo);
|
|
||||||
|
|
||||||
AddStep("set beatmap", () => advancedStats.BeatmapInfo = new BeatmapInfo
|
|
||||||
{
|
|
||||||
Ruleset = new OsuRuleset().RulesetInfo,
|
|
||||||
Difficulty = new BeatmapDifficulty
|
|
||||||
{
|
|
||||||
CircleSize = 5,
|
|
||||||
DrainRate = 4.3f,
|
|
||||||
OverallDifficulty = 4.5f,
|
|
||||||
ApproachRate = 3.1f
|
|
||||||
},
|
|
||||||
StarRating = 8
|
|
||||||
});
|
|
||||||
|
|
||||||
AddAssert("first bar text is correct", () => advancedStats.ChildrenOfType<SpriteText>().First().Text == BeatmapsetsStrings.ShowStatsCsMania);
|
AddAssert("first bar text is correct", () => advancedStats.ChildrenOfType<SpriteText>().First().Text == BeatmapsetsStrings.ShowStatsCsMania);
|
||||||
|
AddStep("set ruleset to osu", () => advancedStats.Ruleset.Value = new OsuRuleset().RulesetInfo);
|
||||||
|
AddAssert("first bar text is correct", () => advancedStats.ChildrenOfType<SpriteText>().First().Text == BeatmapsetsStrings.ShowStatsCs);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
Loading…
Reference in New Issue
Block a user