mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 03:33:22 +08:00
Add test coverage
This commit is contained in:
parent
73c238fae3
commit
a7c43e17c2
@ -197,5 +197,22 @@ namespace osu.Game.Tests.NonVisual.Filtering
|
|||||||
carouselItem.Filter(criteria);
|
carouselItem.Filter(criteria);
|
||||||
Assert.AreEqual(filtered, carouselItem.Filtered.Value);
|
Assert.AreEqual(filtered, carouselItem.Filtered.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestCase("202010", true)]
|
||||||
|
[TestCase("20201010", false)]
|
||||||
|
[TestCase("153", true)]
|
||||||
|
[TestCase("1535", false)]
|
||||||
|
public void TestCriteriaMatchingBeatmapIDs(string query, bool filtered)
|
||||||
|
{
|
||||||
|
var beatmap = getExampleBeatmap();
|
||||||
|
beatmap.OnlineBeatmapID = 20201010;
|
||||||
|
beatmap.BeatmapSet = new BeatmapSetInfo { OnlineBeatmapSetID = 1535 };
|
||||||
|
|
||||||
|
var criteria = new FilterCriteria { SearchText = query };
|
||||||
|
var carouselItem = new CarouselBeatmap(beatmap);
|
||||||
|
carouselItem.Filter(criteria);
|
||||||
|
|
||||||
|
Assert.AreEqual(filtered, carouselItem.Filtered.Value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user