2018-09-10 03:51:38 +08:00
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
using osu.Framework.Allocation;
|
2018-09-21 18:58:47 +08:00
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Game.Graphics.Cursor;
|
2018-09-21 17:51:37 +08:00
|
|
|
using osu.Game.Tournament.Screens.Ladder;
|
2018-09-10 03:51:38 +08:00
|
|
|
|
|
|
|
namespace osu.Game.Tournament.Tests
|
|
|
|
{
|
2018-10-13 06:09:33 +08:00
|
|
|
public class TestCaseLadderManager : LadderTestCase
|
2018-09-10 03:51:38 +08:00
|
|
|
{
|
2018-10-16 14:20:12 +08:00
|
|
|
private LadderManager manager;
|
2018-09-10 03:51:38 +08:00
|
|
|
|
2018-10-16 14:20:12 +08:00
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load()
|
2018-09-10 03:51:38 +08:00
|
|
|
{
|
2018-10-13 06:09:33 +08:00
|
|
|
Add(new OsuContextMenuContainer
|
2018-09-21 18:58:47 +08:00
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
2018-11-08 05:29:04 +08:00
|
|
|
Child = manager = new LadderManager()
|
2018-10-13 06:09:33 +08:00
|
|
|
});
|
2018-09-10 03:51:38 +08:00
|
|
|
}
|
|
|
|
|
2018-11-06 16:59:01 +08:00
|
|
|
protected override void Dispose(bool isDisposing)
|
2018-09-10 03:51:38 +08:00
|
|
|
{
|
2018-11-06 16:59:01 +08:00
|
|
|
base.Dispose(isDisposing);
|
2018-11-06 17:32:59 +08:00
|
|
|
|
|
|
|
var newInfo = manager.CreateInfo();
|
|
|
|
|
|
|
|
Ladder.Teams = newInfo.Teams;
|
|
|
|
Ladder.Groupings = newInfo.Groupings;
|
|
|
|
Ladder.Pairings = newInfo.Pairings;
|
|
|
|
Ladder.Progressions = newInfo.Progressions;
|
2018-09-10 03:51:38 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|