1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 21:27:24 +08:00

Fix LegacyScoreDecoderTest incorrectly comparing unset beatmap IDs

This has been wrong from the outside, but hidden by the fact that the
default values are equal. I've changed to MD5Hash which actually asserts
that the correct beatmap has likely arrived.

Found this in my realm changes, where it fails due to the beatmap ID
being a differing Guid in each case.
This commit is contained in:
Dean Herbert 2022-01-08 15:28:11 +09:00
parent f440aadcbc
commit f6f24220c2

View File

@ -95,7 +95,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
Assert.That(decodedAfterEncode, Is.Not.Null);
Assert.That(decodedAfterEncode.ScoreInfo.User.Username, Is.EqualTo(scoreInfo.User.Username));
Assert.That(decodedAfterEncode.ScoreInfo.BeatmapInfoID, Is.EqualTo(scoreInfo.BeatmapInfoID));
Assert.That(decodedAfterEncode.ScoreInfo.BeatmapInfo.MD5Hash, Is.EqualTo(scoreInfo.BeatmapInfo.MD5Hash));
Assert.That(decodedAfterEncode.ScoreInfo.Ruleset, Is.EqualTo(scoreInfo.Ruleset));
Assert.That(decodedAfterEncode.ScoreInfo.TotalScore, Is.EqualTo(scoreInfo.TotalScore));
Assert.That(decodedAfterEncode.ScoreInfo.MaxCombo, Is.EqualTo(scoreInfo.MaxCombo));