Add test coverage

This commit is contained in:
Bartłomiej Dach 2020-10-10 15:41:48 +02:00
parent 73c238fae3
commit a7c43e17c2
1 changed files with 17 additions and 0 deletions

View File

@ -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);
}
}
}