Add test coverage

This commit is contained in:
Dean Herbert
2020-06-15 20:32:27 +09:00
parent 90d69c1216
commit 17a70bf6ee
3 changed files with 162 additions and 4 deletions

View File

@ -9,7 +9,7 @@ namespace osu.Game.Screens.Play
{
public class ReplayPlayerLoader : PlayerLoader
{
private readonly ScoreInfo scoreInfo;
public readonly ScoreInfo Score;
public ReplayPlayerLoader(Score score)
: base(() => new ReplayPlayer(score))
@ -17,14 +17,14 @@ namespace osu.Game.Screens.Play
if (score.Replay == null)
throw new ArgumentException($"{nameof(score)} must have a non-null {nameof(score.Replay)}.", nameof(score));
scoreInfo = score.ScoreInfo;
Score = score.ScoreInfo;
}
public override void OnEntering(IScreen last)
{
// these will be reverted thanks to PlayerLoader's lease.
Mods.Value = scoreInfo.Mods;
Ruleset.Value = scoreInfo.Ruleset;
Mods.Value = Score.Mods;
Ruleset.Value = Score.Ruleset;
base.OnEntering(last);
}