1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 22:07:40 +08:00
osu-lazer/osu.Game.Tournament.Tests/Screens/TestSceneSeedingScreen.cs

56 lines
1.7 KiB
C#
Raw Normal View History

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.
using System.Linq;
using NUnit.Framework;
2020-03-03 17:12:42 +08:00
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Testing;
2020-03-03 17:12:42 +08:00
using osu.Game.Tournament.Models;
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
{
public class TestSceneSeedingScreen : TournamentTestScene
2020-03-03 17:12:42 +08:00
{
[Cached]
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
[Test]
public void TestBasic()
2020-03-03 17:12:42 +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
}));
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
}
}