2020-03-03 17:12:42 +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.
|
|
|
|
|
2022-06-17 15:37:17 +08:00
|
|
|
#nullable disable
|
|
|
|
|
2021-07-18 00:06:45 +08:00
|
|
|
using System.Linq;
|
|
|
|
using NUnit.Framework;
|
2020-03-03 17:12:42 +08:00
|
|
|
using osu.Framework.Allocation;
|
|
|
|
using osu.Framework.Graphics;
|
2021-07-18 00:06:45 +08:00
|
|
|
using osu.Framework.Testing;
|
2020-03-03 17:12:42 +08:00
|
|
|
using osu.Game.Tournament.Models;
|
2021-07-18 00:06:45 +08:00
|
|
|
using osu.Game.Tournament.Screens.Ladder.Components;
|
2020-03-03 17:12:42 +08:00
|
|
|
using osu.Game.Tournament.Screens.TeamIntro;
|
|
|
|
|
|
|
|
namespace osu.Game.Tournament.Tests.Screens
|
|
|
|
{
|
2020-06-24 15:57:17 +08:00
|
|
|
public class TestSceneSeedingScreen : TournamentTestScene
|
2020-03-03 17:12:42 +08:00
|
|
|
{
|
|
|
|
[Cached]
|
2021-07-18 00:06:45 +08:00
|
|
|
private readonly LadderInfo ladder = new LadderInfo
|
|
|
|
{
|
|
|
|
Teams =
|
|
|
|
{
|
|
|
|
new TournamentTeam
|
|
|
|
{
|
|
|
|
FullName = { Value = @"Japan" },
|
|
|
|
Acronym = { Value = "JPN" },
|
|
|
|
SeedingResults =
|
|
|
|
{
|
|
|
|
new SeedingResult
|
|
|
|
{
|
|
|
|
// Mod intentionally left blank.
|
|
|
|
Seed = { Value = 4 }
|
|
|
|
},
|
|
|
|
new SeedingResult
|
|
|
|
{
|
|
|
|
Mod = { Value = "DT" },
|
|
|
|
Seed = { Value = 8 }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
2020-03-03 17:12:42 +08:00
|
|
|
|
2021-07-18 00:06:45 +08:00
|
|
|
[Test]
|
|
|
|
public void TestBasic()
|
2020-03-03 17:12:42 +08:00
|
|
|
{
|
2021-07-18 00:06:45 +08:00
|
|
|
AddStep("create seeding screen", () => Add(new SeedingScreen
|
2020-03-03 17:12:42 +08:00
|
|
|
{
|
2020-03-04 12:26:25 +08:00
|
|
|
FillMode = FillMode.Fit,
|
|
|
|
FillAspectRatio = 16 / 9f
|
2021-07-18 00:06:45 +08:00
|
|
|
}));
|
|
|
|
|
|
|
|
AddStep("set team to Japan", () => this.ChildrenOfType<SettingsTeamDropdown>().Single().Current.Value = ladder.Teams.Single());
|
2020-03-04 12:26:25 +08:00
|
|
|
}
|
2020-03-03 17:12:42 +08:00
|
|
|
}
|
|
|
|
}
|