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;
|
2020-02-19 16:47:59 +08:00
|
|
|
using osu.Game.Screens.Multi.Lounge.Components;
|
|
|
|
using osu.Game.Users;
|
|
|
|
|
|
|
|
namespace osu.Game.Tests.Visual.Multiplayer
|
|
|
|
{
|
|
|
|
public class TestSceneLoungeRoomInfo : MultiplayerTestScene
|
|
|
|
{
|
|
|
|
[SetUp]
|
2020-12-18 13:58:58 +08:00
|
|
|
public new void Setup() => Schedule(() =>
|
2020-02-19 16:47:59 +08:00
|
|
|
{
|
|
|
|
Child = new RoomInfo
|
|
|
|
{
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
Width = 500
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
public override void SetUpSteps()
|
|
|
|
{
|
|
|
|
// Todo: Temp
|
|
|
|
}
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
public void TestNonSelectedRoom()
|
|
|
|
{
|
|
|
|
AddStep("set null room", () => Room.RoomID.Value = null);
|
|
|
|
}
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
public void TestOpenRoom()
|
|
|
|
{
|
|
|
|
AddStep("set open room", () =>
|
|
|
|
{
|
|
|
|
Room.RoomID.Value = 0;
|
|
|
|
Room.Name.Value = "Room 0";
|
|
|
|
Room.Host.Value = new User { Username = "peppy", Id = 2 };
|
|
|
|
Room.EndDate.Value = DateTimeOffset.Now.AddMonths(1);
|
|
|
|
Room.Status.Value = new RoomStatusOpen();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|