public void Setup() => Schedule(() => { realm.Run(r => { // Due to soft deletions, we can re-use deleted scores between test runs scoreManager.Undelete(r.All <ScoreInfo>().Where(s => s.DeletePending).ToList()); }); leaderboard.BeatmapInfo = beatmapInfo; leaderboard.RefetchScores(); // Required in the case that the beatmap hasn't changed });
public void SetupSteps() { AddUntilStep("ensure scores imported", () => importedScores.Count == 50); AddStep("undelete scores", () => { Realm.Run(r => { // Due to soft deletions, we can re-use deleted scores between test runs scoreManager.Undelete(r.All <ScoreInfo>().Where(s => s.DeletePending).ToList()); }); }); AddStep("set up leaderboard", () => { leaderboard.BeatmapInfo = beatmapInfo; leaderboard.RefetchScores(); // Required in the case that the beatmap hasn't changed }); // Ensure the leaderboard items have finished showing up AddStep("finish transforms", () => leaderboard.FinishTransforms(true)); AddUntilStep("wait for drawables", () => leaderboard.ChildrenOfType <LeaderboardScore>().Any()); }