Fix potential test failures due to Setup/SetUpSteps ordering

This commit is contained in:
Dan Balasescu
2022-07-29 15:27:39 +09:00
parent bc685918b6
commit aaa6f963bd
15 changed files with 258 additions and 221 deletions

View File

@ -15,21 +15,25 @@ namespace osu.Game.Tests.Visual.Playlists
{
public class TestScenePlaylistsParticipantsList : OnlinePlayTestScene
{
[SetUp]
public new void Setup() => Schedule(() =>
public override void SetUpSteps()
{
SelectedRoom.Value = new Room { RoomID = { Value = 7 } };
base.SetUpSteps();
for (int i = 0; i < 50; i++)
AddStep("create list", () =>
{
SelectedRoom.Value.RecentParticipants.Add(new APIUser
SelectedRoom.Value = new Room { RoomID = { Value = 7 } };
for (int i = 0; i < 50; i++)
{
Username = "peppy",
Statistics = new UserStatistics { GlobalRank = 1234 },
Id = 2
});
}
});
SelectedRoom.Value.RecentParticipants.Add(new APIUser
{
Username = "peppy",
Statistics = new UserStatistics { GlobalRank = 1234 },
Id = 2
});
}
});
}
[Test]
public void TestHorizontalLayout()