2020-03-03 09:12:42 +00: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 07:37:17 +00:00
|
|
|
#nullable disable
|
|
|
|
|
2021-07-17 16:06:45 +00:00
|
|
|
using System.Linq;
|
|
|
|
using NUnit.Framework;
|
2020-03-03 09:12:42 +00:00
|
|
|
using osu.Framework.Allocation;
|
|
|
|
using osu.Framework.Graphics;
|
2021-07-17 16:06:45 +00:00
|
|
|
using osu.Framework.Testing;
|
2020-03-03 09:12:42 +00:00
|
|
|
using osu.Game.Tournament.Models;
|
2021-07-17 16:06:45 +00:00
|
|
|
using osu.Game.Tournament.Screens.Ladder.Components;
|
2020-03-03 09:12:42 +00:00
|
|
|
using osu.Game.Tournament.Screens.TeamIntro;
|
|
|
|
|
|
|
|
namespace osu.Game.Tournament.Tests.Screens
|
|
|
|
{
|
2022-11-24 05:32:20 +00:00
|
|
|
public partial class TestSceneSeedingScreen : TournamentTestScene
|
2020-03-03 09:12:42 +00:00
|
|
|
{
|
|
|
|
[Cached]
|
2021-07-17 16:06:45 +00: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 09:12:42 +00:00
|
|
|
|
2021-07-17 16:06:45 +00:00
|
|
|
[Test]
|
|
|
|
public void TestBasic()
|
2020-03-03 09:12:42 +00:00
|
|
|
{
|
2021-07-17 16:06:45 +00:00
|
|
|
AddStep("create seeding screen", () => Add(new SeedingScreen
|
2020-03-03 09:12:42 +00:00
|
|
|
{
|
2020-03-04 04:26:25 +00:00
|
|
|
FillMode = FillMode.Fit,
|
|
|
|
FillAspectRatio = 16 / 9f
|
2021-07-17 16:06:45 +00:00
|
|
|
}));
|
|
|
|
|
|
|
|
AddStep("set team to Japan", () => this.ChildrenOfType<SettingsTeamDropdown>().Single().Current.Value = ladder.Teams.Single());
|
2020-03-04 04:26:25 +00:00
|
|
|
}
|
2020-03-03 09:12:42 +00:00
|
|
|
}
|
|
|
|
}
|