diff --git a/osu.Game.Tests/Visual/Online/TestSceneDirectDownloadButton.cs b/osu.Game.Tests/Visual/Online/TestSceneDirectDownloadButton.cs index 3d828077c8..8d7e0f9f0c 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneDirectDownloadButton.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneDirectDownloadButton.cs @@ -40,14 +40,14 @@ namespace osu.Game.Tests.Visual.Online { AddUntilStep("ensure manager loaded", () => beatmaps != null); ensureSoleilyRemoved(); - createButtonWithBeatmap(createSoleily()); + createButtonWithBeatmap(CreateAPIBeatmapSet()); AddAssert("button state not downloaded", () => downloadButton.DownloadState == DownloadState.NotDownloaded); AddStep("import soleily", () => beatmaps.Import(TestResources.GetQuickTestBeatmapForImport())); AddUntilStep("wait for beatmap import", () => beatmaps.GetAllUsableBeatmapSets().Any(b => b.OnlineBeatmapSetID == 241526)); AddAssert("button state downloaded", () => downloadButton.DownloadState == DownloadState.LocallyAvailable); - createButtonWithBeatmap(createSoleily()); + createButtonWithBeatmap(CreateAPIBeatmapSet()); AddAssert("button state downloaded", () => downloadButton.DownloadState == DownloadState.LocallyAvailable); ensureSoleilyRemoved(); AddAssert("button state not downloaded", () => downloadButton.DownloadState == DownloadState.NotDownloaded); @@ -68,7 +68,7 @@ namespace osu.Game.Tests.Visual.Online AddAssert($"button {(enabled ? "enabled" : "disabled")}", () => downloadButton.DownloadEnabled == enabled); } - private void createButtonWithBeatmap(IBeatmapSetInfo beatmap) + private void createButtonWithBeatmap(APIBeatmapSet beatmap) { AddStep("create button", () => { @@ -94,20 +94,7 @@ namespace osu.Game.Tests.Visual.Online }); } - private IBeatmapSetInfo createSoleily() - { - return new APIBeatmapSet - { - OnlineID = 241526, - Availability = new BeatmapSetOnlineAvailability - { - DownloadDisabled = false, - ExternalLink = string.Empty, - }, - }; - } - - private IBeatmapSetInfo getDownloadableBeatmapSet() + private APIBeatmapSet getDownloadableBeatmapSet() { var apiBeatmapSet = CreateAPIBeatmapSet(); @@ -117,7 +104,7 @@ namespace osu.Game.Tests.Visual.Online return apiBeatmapSet; } - private IBeatmapSetInfo getUndownloadableBeatmapSet() + private APIBeatmapSet getUndownloadableBeatmapSet() { var apiBeatmapSet = CreateAPIBeatmapSet(); @@ -143,7 +130,7 @@ namespace osu.Game.Tests.Visual.Online public DownloadState DownloadState => State.Value; - public TestDownloadButton(IBeatmapSetInfo beatmapSet) + public TestDownloadButton(APIBeatmapSet beatmapSet) : base(beatmapSet) { }