1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-19 19:22:55 +08:00
osu-lazer/osu.Desktop.Tests/Visual/TestCaseOnlineBeatmapSetOverlay.cs

209 lines
9.0 KiB
C#
Raw Normal View History

2017-09-10 06:05:22 +08:00
using System;
using System.Collections.Generic;
2017-09-11 13:48:48 +08:00
using System.Linq;
2017-09-09 05:32:07 +08:00
using osu.Framework.Allocation;
using osu.Framework.Testing;
using osu.Game.Beatmaps;
using osu.Game.Overlays;
using osu.Game.Rulesets;
2017-09-10 06:05:22 +08:00
using osu.Game.Users;
2017-09-09 05:32:07 +08:00
namespace osu.Desktop.VisualTests.Tests
{
internal class TestCaseOnlineBeatmapSetOverlay : TestCase
{
public override string Description => @"view online beatmap sets";
private readonly OnlineBeatmapSetOverlay overlay;
public TestCaseOnlineBeatmapSetOverlay()
{
Add(overlay = new OnlineBeatmapSetOverlay());
}
[BackgroundDependencyLoader]
private void load(RulesetStore rulesets)
{
var r = rulesets.GetRuleset(3);
AddStep(@"show lachryma", () =>
{
overlay.ShowBeatmapSet(new BeatmapSetInfo
{
OnlineBeatmapSetID = 415886,
Metadata = new BeatmapMetadata
{
Title = @"Lachryma <Re:QueenM>",
Artist = @"Kaneko Chiharu",
Author = @"Fresh Chicken",
Source = @"SOUND VOLTEX III GRAVITY WARS",
Tags = @"sdvx grace the 5th kac original song contest konami bemani",
},
OnlineInfo = new BeatmapSetOnlineInfo
{
Preview = @"https://b.ppy.sh/preview/415886.mp3",
PlayCount = 681380,
FavouriteCount = 356,
2017-09-10 06:05:22 +08:00
Submitted = new DateTime(2016, 2, 10),
Ranked = new DateTime(2016, 6, 19),
2017-09-11 13:48:48 +08:00
Length = 118000,
BPM = 236,
2017-09-10 06:05:22 +08:00
Author = new User
{
Username = @"Fresh Chicken",
Id = 3984370,
},
2017-09-09 05:32:07 +08:00
Covers = new BeatmapSetOnlineCovers
{
Cover = @"https://assets.ppy.sh/beatmaps/415886/covers/cover.jpg?1465651778",
},
},
Beatmaps = new List<BeatmapInfo>
{
new BeatmapInfo
{
OnlineBeatmapID = 901048,
StarDifficulty = 1.36,
Version = @"BASIC",
Ruleset = r,
Difficulty = new BeatmapDifficulty
{
CircleSize = 4,
DrainRate = 6.5f,
OverallDifficulty = 6.5f,
ApproachRate = 5,
},
2017-09-11 13:48:48 +08:00
OnlineInfo = new BeatmapOnlineInfo
{
HasVideo = false,
CircleCount = 265,
SliderCount = 71,
PlayCount = 47906,
PassCount = 19899,
},
Metrics = new BeatmapMetrics
{
Ratings = Enumerable.Range(0, 10),
Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6),
Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6),
},
2017-09-09 05:32:07 +08:00
},
new BeatmapInfo
{
OnlineBeatmapID = 901051,
StarDifficulty = 2.22,
Version = @"NOVICE",
Ruleset = r,
Difficulty = new BeatmapDifficulty
{
CircleSize = 4,
DrainRate = 7,
OverallDifficulty = 7,
ApproachRate = 5,
},
2017-09-11 13:48:48 +08:00
OnlineInfo = new BeatmapOnlineInfo
{
HasVideo = false,
CircleCount = 592,
SliderCount = 62,
PlayCount = 162021,
PassCount = 72116,
},
Metrics = new BeatmapMetrics
{
Ratings = Enumerable.Range(0, 10),
Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6),
Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6),
},
2017-09-09 05:32:07 +08:00
},
new BeatmapInfo
{
OnlineBeatmapID = 901047,
StarDifficulty = 3.49,
Version = @"ADVANCED",
Ruleset = r,
Difficulty = new BeatmapDifficulty
{
CircleSize = 4,
DrainRate = 7.5f,
OverallDifficulty = 7.5f,
ApproachRate = 5,
},
2017-09-11 13:48:48 +08:00
OnlineInfo = new BeatmapOnlineInfo
{
HasVideo = false,
CircleCount = 1042,
SliderCount = 79,
PlayCount = 225178,
PassCount = 73001,
},
Metrics = new BeatmapMetrics
{
Ratings = Enumerable.Range(0, 10),
Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6),
Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6),
},
2017-09-09 05:32:07 +08:00
},
new BeatmapInfo
{
OnlineBeatmapID = 901049,
StarDifficulty = 4.24,
Version = @"EXHAUST",
Ruleset = r,
Difficulty = new BeatmapDifficulty
{
CircleSize = 4,
DrainRate = 8,
OverallDifficulty = 8,
ApproachRate = 5,
},
2017-09-11 13:48:48 +08:00
OnlineInfo = new BeatmapOnlineInfo
{
HasVideo = false,
CircleCount = 1352,
SliderCount = 69,
PlayCount = 131545,
PassCount = 42703,
},
Metrics = new BeatmapMetrics
{
Ratings = Enumerable.Range(0, 10),
Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6),
Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6),
},
2017-09-09 05:32:07 +08:00
},
new BeatmapInfo
{
OnlineBeatmapID = 901050,
2017-09-10 06:05:22 +08:00
StarDifficulty = 5.26,
2017-09-09 05:32:07 +08:00
Version = @"GRAVITY",
Ruleset = r,
Difficulty = new BeatmapDifficulty
{
CircleSize = 4,
DrainRate = 8.5f,
OverallDifficulty = 8.5f,
ApproachRate = 5,
},
2017-09-11 13:48:48 +08:00
OnlineInfo = new BeatmapOnlineInfo
{
HasVideo = false,
CircleCount = 1730,
SliderCount = 115,
PlayCount = 117673,
PassCount = 24241,
},
Metrics = new BeatmapMetrics
{
Ratings = Enumerable.Range(0, 10),
Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6),
Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6),
},
2017-09-09 05:32:07 +08:00
},
},
});
});
}
}
}