void Test16() { var map = new List <(string Key, string Value)>() { ("1", "AB"), ("1", "CD"), ("2", "EEE") }; var matcher = new ConfusableMatcher(map, null, false); Assert.Equal(new[] { "AB", "CD" }.OrderBy(x => x), matcher.GetKeyMappings("1").OrderBy(x => x)); Assert.Equal(new[] { "EEE" }, matcher.GetKeyMappings("2")); }
void Test15() { var map = new List <(string Key, string Value)>() { ("A", "1"), ("B", "1"), ("C", "1") }; var matcher = new ConfusableMatcher(map, null, false); Assert.Equal(new[] { "1" }, matcher.GetKeyMappings("A")); Assert.Equal(new[] { "1" }, matcher.GetKeyMappings("B")); Assert.Equal(new[] { "1" }, matcher.GetKeyMappings("C")); }
void Test17() { var map = new List <(string Key, string Value)>(); for (var x = 0; x < 500; x++) { map.Add(("123", x.ToString())); } var matcher = new ConfusableMatcher(map, null, false); Assert.Equal(map.Select(x => x.Value).OrderBy(x => x), matcher.GetKeyMappings("123").OrderBy(x => x)); }