2018-12-20 14:17:33 +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 System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
using osu.Game.Online.Multiplayer;
|
|
|
|
using osu.Game.Rulesets.Osu;
|
|
|
|
using osu.Game.Rulesets.Osu.Mods;
|
|
|
|
using osu.Game.Screens.Multi.Match.Components;
|
|
|
|
|
|
|
|
namespace osu.Game.Tests.Visual
|
|
|
|
{
|
|
|
|
public class TestCaseMatchHeader : OsuTestCase
|
|
|
|
{
|
|
|
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
|
|
|
{
|
|
|
|
typeof(Header)
|
|
|
|
};
|
|
|
|
|
|
|
|
public TestCaseMatchHeader()
|
|
|
|
{
|
2018-12-22 13:12:27 +08:00
|
|
|
var room = new Room();
|
2018-12-20 14:17:33 +08:00
|
|
|
|
2018-12-22 13:12:27 +08:00
|
|
|
var header = new Header(room);
|
2018-12-20 14:17:33 +08:00
|
|
|
|
2018-12-22 13:12:27 +08:00
|
|
|
room.Playlist.Add(new PlaylistItem
|
2018-12-20 14:17:33 +08:00
|
|
|
{
|
2018-12-22 13:12:27 +08:00
|
|
|
Beatmap = new BeatmapInfo
|
2018-12-20 14:17:33 +08:00
|
|
|
{
|
2018-12-22 13:12:27 +08:00
|
|
|
Metadata = new BeatmapMetadata
|
|
|
|
{
|
|
|
|
Title = "Title",
|
|
|
|
Artist = "Artist",
|
|
|
|
AuthorString = "Author",
|
|
|
|
},
|
|
|
|
Version = "Version",
|
|
|
|
Ruleset = new OsuRuleset().RulesetInfo
|
2018-12-20 14:17:33 +08:00
|
|
|
},
|
2018-12-22 13:12:27 +08:00
|
|
|
RequiredMods =
|
|
|
|
{
|
|
|
|
new OsuModDoubleTime(),
|
|
|
|
new OsuModNoFail(),
|
|
|
|
new OsuModRelax(),
|
|
|
|
}
|
|
|
|
});
|
2018-12-20 14:17:33 +08:00
|
|
|
|
2018-12-22 13:12:27 +08:00
|
|
|
room.Type.Value = new GameTypeTimeshift();
|
2018-12-20 14:17:33 +08:00
|
|
|
|
|
|
|
Child = header;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|