From e472656b3750705abcf7fdb2415cfbd726d245ef Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 2 Nov 2021 17:11:34 +0900 Subject: [PATCH] Add test coverage of room participants updating on room join --- osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayer.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayer.cs b/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayer.cs index 11caf9f498..38cf9d662f 100644 --- a/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayer.cs +++ b/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayer.cs @@ -231,6 +231,9 @@ namespace osu.Game.Tests.Visual.Multiplayer } } }); + + AddAssert("Check participant count correct", () => client.APIRoom?.ParticipantCount.Value == 1); + AddAssert("Check participant list contains user", () => client.APIRoom?.RecentParticipants.Count(u => u.Id == API.LocalUser.Value.Id) == 1); } [Test] @@ -290,6 +293,9 @@ namespace osu.Game.Tests.Visual.Multiplayer AddUntilStep("wait for room open", () => this.ChildrenOfType().FirstOrDefault()?.IsLoaded == true); AddUntilStep("wait for join", () => client.Room != null); + + AddAssert("Check participant count correct", () => client.APIRoom?.ParticipantCount.Value == 1); + AddAssert("Check participant list contains user", () => client.APIRoom?.RecentParticipants.Count(u => u.Id == API.LocalUser.Value.Id) == 1); } [Test]