mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 01:52:55 +08:00
Use TestWorkingBeatmap in BeatmapDetailsArea tests
This commit is contained in:
parent
570e211db0
commit
22fabef344
@ -9,6 +9,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Screens.Select;
|
||||
using osu.Game.Tests.Beatmaps;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Tests.Visual.SongSelect
|
||||
@ -30,14 +31,14 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
Size = new Vector2(550f, 450f),
|
||||
});
|
||||
|
||||
AddStep("all metrics", () => detailsArea.Beatmap = new DummyWorkingBeatmap(null, null)
|
||||
AddStep("all metrics", () => detailsArea.Beatmap = new TestWorkingBeatmap(new Beatmap
|
||||
{
|
||||
BeatmapSetInfo =
|
||||
BeatmapInfo =
|
||||
{
|
||||
BeatmapSet = new BeatmapSetInfo
|
||||
{
|
||||
Metrics = new BeatmapSetMetrics { Ratings = Enumerable.Range(0, 11).ToArray() }
|
||||
},
|
||||
BeatmapInfo =
|
||||
{
|
||||
Version = "All Metrics",
|
||||
Metadata = new BeatmapMetadata
|
||||
{
|
||||
@ -58,17 +59,16 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6).ToArray(),
|
||||
},
|
||||
}
|
||||
}
|
||||
);
|
||||
}));
|
||||
|
||||
AddStep("all except source", () => detailsArea.Beatmap = new DummyWorkingBeatmap(null, null)
|
||||
AddStep("all except source", () => detailsArea.Beatmap = new TestWorkingBeatmap(new Beatmap
|
||||
{
|
||||
BeatmapSetInfo =
|
||||
BeatmapInfo =
|
||||
{
|
||||
BeatmapSet = new BeatmapSetInfo
|
||||
{
|
||||
Metrics = new BeatmapSetMetrics { Ratings = Enumerable.Range(0, 11).ToArray() }
|
||||
},
|
||||
BeatmapInfo =
|
||||
{
|
||||
Version = "All Metrics",
|
||||
Metadata = new BeatmapMetadata
|
||||
{
|
||||
@ -88,16 +88,16 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6).ToArray(),
|
||||
},
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
AddStep("ratings", () => detailsArea.Beatmap = new DummyWorkingBeatmap(null, null)
|
||||
AddStep("ratings", () => detailsArea.Beatmap = new TestWorkingBeatmap(new Beatmap
|
||||
{
|
||||
BeatmapSetInfo =
|
||||
BeatmapInfo =
|
||||
{
|
||||
BeatmapSet = new BeatmapSetInfo
|
||||
{
|
||||
Metrics = new BeatmapSetMetrics { Ratings = Enumerable.Range(0, 11).ToArray() }
|
||||
},
|
||||
BeatmapInfo =
|
||||
{
|
||||
Version = "Only Ratings",
|
||||
Metadata = new BeatmapMetadata
|
||||
{
|
||||
@ -113,9 +113,9 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
},
|
||||
StarDifficulty = 4.8f
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
AddStep("fails+retries", () => detailsArea.Beatmap = new DummyWorkingBeatmap(null, null)
|
||||
AddStep("fails+retries", () => detailsArea.Beatmap = new TestWorkingBeatmap(new Beatmap
|
||||
{
|
||||
BeatmapInfo =
|
||||
{
|
||||
@ -139,9 +139,9 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6).ToArray(),
|
||||
},
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
AddStep("null metrics", () => detailsArea.Beatmap = new DummyWorkingBeatmap(null, null)
|
||||
AddStep("null metrics", () => detailsArea.Beatmap = new TestWorkingBeatmap(new Beatmap
|
||||
{
|
||||
BeatmapInfo =
|
||||
{
|
||||
@ -160,7 +160,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
},
|
||||
StarDifficulty = 1.97f,
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
AddStep("null beatmap", () => detailsArea.Beatmap = null);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user