mirror of
https://github.com/ppy/osu.git
synced 2025-01-29 01:22:54 +08:00
Clear previous score items on SetUp
This commit is contained in:
parent
32498d5d50
commit
77aa3a9fe5
@ -40,6 +40,9 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
AddSliderStep("set player score", 50, 5000000, 1222333, v => playerScore.Value = v);
|
||||
}
|
||||
|
||||
[SetUp]
|
||||
public void SetUp() => leaderboard.ClearScores();
|
||||
|
||||
[Test]
|
||||
public void TestPlayerScore()
|
||||
{
|
||||
@ -66,6 +69,8 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
|
||||
private class TestInGameLeaderboard : InGameLeaderboard
|
||||
{
|
||||
public void ClearScores() => ScoresContainer.RemoveAll(s => s.User.Username != PlayerUser.Username);
|
||||
|
||||
public bool CheckPositionByUsername(string username, int? estimatedPosition)
|
||||
{
|
||||
var scoreItem = ScoresContainer.Where(i => i.User.Username == username).FirstOrDefault();
|
||||
|
Loading…
Reference in New Issue
Block a user