1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-21 20:52:56 +08:00
osu-lazer/osu.Game.Tests/Visual/Multiplayer/TestSceneMatchParticipants.cs

53 lines
2.0 KiB
C#
Raw Normal View History

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
2018-05-29 14:53:30 +08:00
using NUnit.Framework;
using osu.Framework.Graphics;
2018-12-10 18:20:41 +08:00
using osu.Game.Screens.Multi.Match.Components;
2018-05-29 14:53:30 +08:00
using osu.Game.Users;
2019-03-25 00:02:36 +08:00
namespace osu.Game.Tests.Visual.Multiplayer
2018-05-29 14:53:30 +08:00
{
[TestFixture]
public class TestSceneMatchParticipants : MultiplayerTestScene
2018-05-29 14:53:30 +08:00
{
public TestSceneMatchParticipants()
2018-05-29 14:53:30 +08:00
{
2019-02-05 18:00:01 +08:00
Add(new Participants { RelativeSizeAxes = Axes.Both });
2018-12-22 13:01:06 +08:00
2019-02-05 18:00:01 +08:00
AddStep(@"set max to null", () => Room.MaxParticipants.Value = null);
AddStep(@"set users", () => Room.Participants.Value = new[]
2018-05-29 14:53:30 +08:00
{
new User
{
Username = @"Feppla",
Id = 4271601,
Country = new Country { FlagName = @"SE" },
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c2.jpg",
IsSupporter = true,
},
new User
{
Username = @"Xilver",
Id = 3099689,
Country = new Country { FlagName = @"IL" },
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c2.jpg",
IsSupporter = true,
},
new User
{
Username = @"Wucki",
Id = 5287410,
Country = new Country { FlagName = @"FI" },
CoverUrl = @"https://assets.ppy.sh/user-profile-covers/5287410/5cfeaa9dd41cbce038ecdc9d781396ed4b0108089170bf7f50492ef8eadeb368.jpeg",
IsSupporter = true,
},
});
2019-02-05 18:00:01 +08:00
AddStep(@"set max", () => Room.MaxParticipants.Value = 10);
2019-11-28 21:41:29 +08:00
AddStep(@"clear users", () => Room.Participants.Value = System.Array.Empty<User>());
2019-02-05 18:00:01 +08:00
AddStep(@"set max to null", () => Room.MaxParticipants.Value = null);
2018-05-29 14:53:30 +08:00
}
}
}