mirror of https://github.com/ppy/osu
Add test coverage
This commit is contained in:
parent
73c238fae3
commit
a7c43e17c2
|
@ -197,5 +197,22 @@ public void TestCriteriaMatchingArtistWithNullUnicodeName(string artistName, boo
|
|||
carouselItem.Filter(criteria);
|
||||
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