1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 11:42:56 +08:00

Add test coverage

This commit is contained in:
Dean Herbert 2021-02-24 18:42:26 +09:00
parent 165da32044
commit 6e6fb31c05

View File

@ -44,7 +44,7 @@ namespace osu.Game.Tests.Visual.Collections
{
manager = new CollectionManager(LocalStorage),
Content,
dialogOverlay = new DialogOverlay()
dialogOverlay = new DialogOverlay(),
});
Dependencies.Cache(manager);
@ -134,6 +134,27 @@ namespace osu.Game.Tests.Visual.Collections
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]
public void TestRemoveCollectionViaButton()
{