1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-13 18:47:27 +08:00

Restore test coverage of original fail case

This commit is contained in:
Bartłomiej Dach 2024-07-16 14:03:33 +02:00
parent ae5b0aa54b
commit 6db135279f
No known key found for this signature in database

View File

@ -157,8 +157,9 @@ namespace osu.Game.Tests.Database
AddAssert("Score not marked as failed", () => Realm.Run(r => r.Find<ScoreInfo>(scoreInfo.ID)!.BackgroundReprocessingFailed), () => Is.False);
}
[Test]
public void TestScoreUpgradeFailed()
[TestCase(30000002)]
[TestCase(30000013)]
public void TestScoreUpgradeFailed(int scoreVersion)
{
ScoreInfo scoreInfo = null!;
@ -172,7 +173,7 @@ namespace osu.Game.Tests.Database
Ruleset = r.All<RulesetInfo>().First(),
})
{
TotalScoreVersion = 30000013,
TotalScoreVersion = scoreVersion,
IsLegacyScore = true,
});
});
@ -181,7 +182,7 @@ namespace osu.Game.Tests.Database
AddStep("Run background processor", () => Add(new TestBackgroundDataStoreProcessor()));
AddUntilStep("Score marked as failed", () => Realm.Run(r => r.Find<ScoreInfo>(scoreInfo.ID)!.BackgroundReprocessingFailed), () => Is.True);
AddAssert("Score version not upgraded", () => Realm.Run(r => r.Find<ScoreInfo>(scoreInfo.ID)!.TotalScoreVersion), () => Is.EqualTo(30000013));
AddAssert("Score version not upgraded", () => Realm.Run(r => r.Find<ScoreInfo>(scoreInfo.ID)!.TotalScoreVersion), () => Is.EqualTo(scoreVersion));
}
[Test]