public void ToQueryForms_Test(string input, IEnumerable <string> expected) { var result = Pinyin.ToQueryForms(input); var common = expected.Intersect(result); var incorrect = result.Except(common).ToList(); incorrect.AddRange(common.Except(result).ToList()); Assert.IsTrue(incorrect.Count == 0); }
public void Regex_Test() { Pinyin.ToQueryForms("qing qinglü4 lü4qing1 qinglü"); Pinyin.ToQueryForms("chuangzaouerang"); Pinyin.ToQueryForms("xi'an"); Pinyin.ToQueryForms(""); Pinyin.ToQueryForms("中文"); Pinyin.ToQueryForms("abbbbbb"); }
public void ToQueryForms_Combinations() { Pinyin.ToQueryForms("lu2 zhuang3nv LU:an"); }