mirror of
https://github.com/osukey/osukey.git
synced 2025-06-08 12:58:01 +09:00
Add test
This commit is contained in:
parent
f9145ce5b4
commit
84ea279c94
@ -134,6 +134,22 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
AddAssert("playlist has 2 items", () => Room.Playlist.Count == 2);
|
AddAssert("playlist has 2 items", () => Room.Playlist.Count == 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestAddItemAfterRearrangement()
|
||||||
|
{
|
||||||
|
AddStep("create new item", () => songSelect.BeatmapDetails.CreateNewItem());
|
||||||
|
AddStep("create new item", () => songSelect.BeatmapDetails.CreateNewItem());
|
||||||
|
AddStep("rearrange", () =>
|
||||||
|
{
|
||||||
|
var item = Room.Playlist[0];
|
||||||
|
Room.Playlist.RemoveAt(0);
|
||||||
|
Room.Playlist.Add(item);
|
||||||
|
});
|
||||||
|
|
||||||
|
AddStep("create new item", () => songSelect.BeatmapDetails.CreateNewItem());
|
||||||
|
AddAssert("new item has id 2", () => Room.Playlist.Last().ID == 2);
|
||||||
|
}
|
||||||
|
|
||||||
private class TestMatchSongSelect : MatchSongSelect
|
private class TestMatchSongSelect : MatchSongSelect
|
||||||
{
|
{
|
||||||
public new MatchBeatmapDetailArea BeatmapDetails => (MatchBeatmapDetailArea)base.BeatmapDetails;
|
public new MatchBeatmapDetailArea BeatmapDetails => (MatchBeatmapDetailArea)base.BeatmapDetails;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user