1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 12:35:34 +08:00

Actualize tests

This commit is contained in:
Roman Kapustin 2021-03-11 21:02:40 +03:00
parent 47b80d2474
commit c6c616f244
4 changed files with 7 additions and 9 deletions

View File

@ -56,6 +56,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
beatmaps.Add(new BeatmapInfo
{
Ruleset = rulesets.GetRuleset(i % 4),
RulesetID = i % 4,
OnlineBeatmapID = beatmapId,
Length = length,
BPM = bpm,

View File

@ -186,6 +186,7 @@ namespace osu.Game.Tests.Visual.SongSelect
Metadata = metadata,
BaseDifficulty = new BeatmapDifficulty(),
Ruleset = ruleset,
RulesetID = ruleset.ID.GetValueOrDefault(),
StarDifficulty = difficultyIndex + 1,
Version = $"SR{difficultyIndex + 1}"
}).ToList()

View File

@ -911,9 +911,11 @@ namespace osu.Game.Tests.Visual.SongSelect
int length = RNG.Next(30000, 200000);
double bpm = RNG.NextSingle(80, 200);
var ruleset = getRuleset();
beatmaps.Add(new BeatmapInfo
{
Ruleset = getRuleset(),
Ruleset = ruleset,
RulesetID = ruleset.ID.GetValueOrDefault(),
OnlineBeatmapID = beatmapId,
Version = $"{beatmapId} (length {TimeSpan.FromMilliseconds(length):m\\:ss}, bpm {bpm:0.#})",
Length = length,

View File

@ -73,7 +73,7 @@ namespace osu.Game.Scoring
}
set
{
modsJson = null;
modsJson = JsonConvert.SerializeObject(value.Select(m => new DeserializedMod { Acronym = m.Acronym }));
mods = value;
}
}
@ -88,13 +88,7 @@ namespace osu.Game.Scoring
{
get
{
if (modsJson != null)
return modsJson;
if (mods == null)
return null;
return modsJson = JsonConvert.SerializeObject(mods.Select(m => new DeserializedMod { Acronym = m.Acronym }));
return modsJson;
}
set
{