Update all usages of CreateContext to use either Run or Write

This commit is contained in:
Dean Herbert
2022-01-21 17:08:20 +09:00
parent da0a803e6c
commit 114c9e8c1f
22 changed files with 230 additions and 250 deletions

View File

@ -122,11 +122,11 @@ namespace osu.Game.Tests.Visual.UserInterface
[SetUp]
public void Setup() => Schedule(() =>
{
using (var realm = realmFactory.CreateContext())
realmFactory.Run(realm =>
{
// Due to soft deletions, we can re-use deleted scores between test runs
scoreManager.Undelete(realm.All<ScoreInfo>().Where(s => s.DeletePending).ToList());
}
});
leaderboard.Scores = null;
leaderboard.FinishTransforms(true); // After setting scores, we may be waiting for transforms to expire drawables