mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 09:32:55 +08:00
Restore test coverage of original fail case
This commit is contained in:
parent
ae5b0aa54b
commit
6db135279f
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user