mirror of
https://github.com/ppy/osu.git
synced 2024-11-14 16:37:26 +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);
|
AddAssert("Score not marked as failed", () => Realm.Run(r => r.Find<ScoreInfo>(scoreInfo.ID)!.BackgroundReprocessingFailed), () => Is.False);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[TestCase(30000002)]
|
||||||
public void TestScoreUpgradeFailed()
|
[TestCase(30000013)]
|
||||||
|
public void TestScoreUpgradeFailed(int scoreVersion)
|
||||||
{
|
{
|
||||||
ScoreInfo scoreInfo = null!;
|
ScoreInfo scoreInfo = null!;
|
||||||
|
|
||||||
@ -172,7 +173,7 @@ namespace osu.Game.Tests.Database
|
|||||||
Ruleset = r.All<RulesetInfo>().First(),
|
Ruleset = r.All<RulesetInfo>().First(),
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
TotalScoreVersion = 30000013,
|
TotalScoreVersion = scoreVersion,
|
||||||
IsLegacyScore = true,
|
IsLegacyScore = true,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -181,7 +182,7 @@ namespace osu.Game.Tests.Database
|
|||||||
AddStep("Run background processor", () => Add(new TestBackgroundDataStoreProcessor()));
|
AddStep("Run background processor", () => Add(new TestBackgroundDataStoreProcessor()));
|
||||||
|
|
||||||
AddUntilStep("Score marked as failed", () => Realm.Run(r => r.Find<ScoreInfo>(scoreInfo.ID)!.BackgroundReprocessingFailed), () => Is.True);
|
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]
|
[Test]
|
||||||
|
Loading…
Reference in New Issue
Block a user