mirror of https://github.com/ppy/osu
Add test
This commit is contained in:
parent
f9145ce5b4
commit
84ea279c94
|
@ -134,6 +134,22 @@ public void TestAddSameItemMultipleTimes()
|
|||
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
|
||||
{
|
||||
public new MatchBeatmapDetailArea BeatmapDetails => (MatchBeatmapDetailArea)base.BeatmapDetails;
|
||||
|
|
Loading…
Reference in New Issue