1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-23 14:47:23 +08:00
osu-lazer/osu.Game.Tests/Visual/Multiplayer/TestSceneLoungeRoomInfo.cs

51 lines
1.5 KiB
C#
Raw Normal View History

2020-02-19 16:47:59 +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 NUnit.Framework;
using osu.Framework.Graphics;
2020-12-25 12:38:11 +08:00
using osu.Game.Online.Rooms.RoomStatuses;
using osu.Game.Screens.OnlinePlay.Lounge.Components;
2020-02-19 16:47:59 +08:00
using osu.Game.Users;
namespace osu.Game.Tests.Visual.Multiplayer
{
public class TestSceneLoungeRoomInfo : OsuTestScene
2020-02-19 16:47:59 +08:00
{
private TestRoomContainer roomContainer;
2020-02-19 16:47:59 +08:00
[SetUp]
public void Setup() => Schedule(() =>
2020-02-19 16:47:59 +08:00
{
Child = roomContainer = new TestRoomContainer
2020-02-19 16:47:59 +08:00
{
Child = new RoomInfo
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Width = 500
}
2020-02-19 16:47:59 +08:00
};
});
[Test]
public void TestNonSelectedRoom()
{
AddStep("set null room", () => roomContainer.Room.RoomID.Value = null);
2020-02-19 16:47:59 +08:00
}
[Test]
public void TestOpenRoom()
{
AddStep("set open room", () =>
{
roomContainer.Room.RoomID.Value = 0;
roomContainer.Room.Name.Value = "Room 0";
roomContainer.Room.Host.Value = new User { Username = "peppy", Id = 2 };
roomContainer.Room.EndDate.Value = DateTimeOffset.Now.AddMonths(1);
roomContainer.Room.Status.Value = new RoomStatusOpen();
2020-02-19 16:47:59 +08:00
});
}
}
}