mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 02:32:55 +08:00
Add test coverage of mass multiplayer event firing
This commit is contained in:
parent
2b06dacd0e
commit
97f27897b1
@ -2,6 +2,7 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
@ -125,6 +126,20 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
|
|
||||||
return client.Room?.Users.All(u => u.State == MultiplayerUserState.Ready) == true;
|
return client.Room?.Users.All(u => u.State == MultiplayerUserState.Ready) == true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
AddStep("unready all players at once", () =>
|
||||||
|
{
|
||||||
|
Debug.Assert(client.Room != null);
|
||||||
|
|
||||||
|
foreach (var u in client.Room.Users) client.ChangeUserState(u.UserID, MultiplayerUserState.Idle);
|
||||||
|
});
|
||||||
|
|
||||||
|
AddStep("ready all players at once", () =>
|
||||||
|
{
|
||||||
|
Debug.Assert(client.Room != null);
|
||||||
|
|
||||||
|
foreach (var u in client.Room.Users) client.ChangeUserState(u.UserID, MultiplayerUserState.Ready);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addRandomPlayer()
|
private void addRandomPlayer()
|
||||||
|
Loading…
Reference in New Issue
Block a user