1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-24 22:32:55 +08:00
osu-lazer/osu.Game.Tests/Visual/Multiplayer/TestSceneOverlinedParticipants.cs

59 lines
1.6 KiB
C#
Raw Normal View History

2020-02-14 19:42:14 +08:00
// 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.
using System;
using System.Collections.Generic;
using NUnit.Framework;
2020-02-14 19:42:14 +08:00
using osu.Framework.Graphics;
using osu.Game.Screens.Multi.Components;
2020-02-14 19:42:14 +08:00
using osuTK;
namespace osu.Game.Tests.Visual.Multiplayer
{
public class TestSceneOverlinedParticipants : MultiplayerTestScene
{
public override IReadOnlyList<Type> RequiredTypes => new[]
{
typeof(OverlinedParticipants),
typeof(OverlinedDisplay),
typeof(ParticipantsList)
};
2020-02-14 19:42:14 +08:00
protected override bool UseOnlineAPI => true;
public TestSceneOverlinedParticipants()
{
Room.RoomID.Value = 7;
}
2020-02-14 19:42:14 +08:00
[Test]
public void TestHorizontalLayout()
{
AddStep("create component", () =>
{
Child = new OverlinedParticipants(Direction.Horizontal)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Width = 500,
AutoSizeAxes = Axes.Y,
};
});
}
[Test]
public void TestVerticalLayout()
{
AddStep("create component", () =>
2020-02-14 19:42:14 +08:00
{
Child = new OverlinedParticipants(Direction.Vertical)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Size = new Vector2(500)
};
2020-02-14 19:42:14 +08:00
});
}
}
}