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