mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Add test coverage
This commit is contained in:
@ -44,7 +44,7 @@ namespace osu.Game.Tests.Visual.Collections
|
|||||||
{
|
{
|
||||||
manager = new CollectionManager(LocalStorage),
|
manager = new CollectionManager(LocalStorage),
|
||||||
Content,
|
Content,
|
||||||
dialogOverlay = new DialogOverlay()
|
dialogOverlay = new DialogOverlay(),
|
||||||
});
|
});
|
||||||
|
|
||||||
Dependencies.Cache(manager);
|
Dependencies.Cache(manager);
|
||||||
@ -134,6 +134,27 @@ namespace osu.Game.Tests.Visual.Collections
|
|||||||
assertCollectionName(0, "2");
|
assertCollectionName(0, "2");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestCollectionNameCollisions()
|
||||||
|
{
|
||||||
|
AddStep("add dropdown", () =>
|
||||||
|
{
|
||||||
|
Add(new CollectionFilterDropdown
|
||||||
|
{
|
||||||
|
Anchor = Anchor.TopRight,
|
||||||
|
Origin = Anchor.TopRight,
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
Width = 0.4f,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
AddStep("add two collections with same name", () => manager.Collections.AddRange(new[]
|
||||||
|
{
|
||||||
|
new BeatmapCollection { Name = { Value = "1" } },
|
||||||
|
new BeatmapCollection { Name = { Value = "1" }, Beatmaps = { beatmapManager.GetAllUsableBeatmapSets().First().Beatmaps[0] } },
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestRemoveCollectionViaButton()
|
public void TestRemoveCollectionViaButton()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user