1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-30 09:22:54 +08:00
osu-lazer/osu.Game.Tournament.Tests/Screens/TestSceneSeedingScreen.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

58 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.
2022-06-17 15:37:17 +08:00
#nullable disable
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 partial 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
}
}