コード例 #1
0
 public void recognizes_all_special_characters_omitted()
 {
     Assert.That(PokedexData.NormalizeName("MrMime"), Is.EqualTo("Mr. Mime"));
     Assert.That(PokedexData.NormalizeName("MrRime"), Is.EqualTo("Mr. Rime"));
     Assert.That(PokedexData.NormalizeName("MimeJr"), Is.EqualTo("Mime Jr."));
     Assert.That(PokedexData.NormalizeName("TypeNull"), Is.EqualTo("Type: Null"));
 }
コード例 #2
0
 public void ignores_names_that_do_not_need_normalization()
 {
     Assert.That(PokedexData.NormalizeName("Pidgey"), Is.EqualTo("Pidgey"));
     Assert.That(PokedexData.NormalizeName("Pid'gey"), Is.Not.EqualTo("Pidgey"));
     Assert.That(PokedexData.NormalizeName("Pid gey"), Is.Not.EqualTo("Pidgey"));
     Assert.That(PokedexData.NormalizeName("Pid-gey"), Is.Not.EqualTo("Pidgey"));
     Assert.That(PokedexData.NormalizeName("Pidgey."), Is.Not.EqualTo("Pidgey"));
 }
コード例 #3
0
 public void recognizes_replaced_unicode()
 {
     Assert.That(PokedexData.NormalizeName("Nidoranf"), Is.EqualTo("Nidoran♀"));
     Assert.That(PokedexData.NormalizeName("Nidoran-f"), Is.EqualTo("Nidoran♀"));
     Assert.That(PokedexData.NormalizeName("Nidoranm"), Is.EqualTo("Nidoran♂"));
     Assert.That(PokedexData.NormalizeName("Nidoran-m"), Is.EqualTo("Nidoran♂"));
     Assert.That(PokedexData.NormalizeName("Flabebe"), Is.EqualTo("Flabébé"));
 }
コード例 #4
0
 public void recognizes_omitted_dashes()
 {
     Assert.That(PokedexData.NormalizeName("HoOh"), Is.EqualTo("Ho-Oh"));
     Assert.That(PokedexData.NormalizeName("PorygonZ"), Is.EqualTo("Porygon-Z"));
     Assert.That(PokedexData.NormalizeName("Jangmoo"), Is.EqualTo("Jangmo-o"));
     Assert.That(PokedexData.NormalizeName("Hakamoo"), Is.EqualTo("Hakamo-o"));
     Assert.That(PokedexData.NormalizeName("Kommoo"), Is.EqualTo("Kommo-o"));
 }
コード例 #5
0
ファイル: PokedexDataTest.cs プロジェクト: Yoso2/tpp-core
 public void ignores_names_that_do_not_need_normalization()
 {
     Assert.AreEqual("Pidgey", PokedexData.NormalizeName("Pidgey"));
     Assert.AreNotEqual("Pidgey", PokedexData.NormalizeName("Pid'gey"));
     Assert.AreNotEqual("Pidgey", PokedexData.NormalizeName("Pid gey"));
     Assert.AreNotEqual("Pidgey", PokedexData.NormalizeName("Pid-gey"));
     Assert.AreNotEqual("Pidgey", PokedexData.NormalizeName("Pidgey."));
 }
コード例 #6
0
ファイル: PokedexDataTest.cs プロジェクト: Yoso2/tpp-core
 public void recognizes_replaced_unicode()
 {
     Assert.AreEqual("Nidoran♀", PokedexData.NormalizeName("Nidoranf"));
     Assert.AreEqual("Nidoran♀", PokedexData.NormalizeName("Nidoran-f"));
     Assert.AreEqual("Nidoran♂", PokedexData.NormalizeName("Nidoranm"));
     Assert.AreEqual("Nidoran♂", PokedexData.NormalizeName("Nidoran-m"));
     Assert.AreEqual("Flabébé", PokedexData.NormalizeName("Flabebe"));
 }
コード例 #7
0
 public void recognizes_omitted_punctuation()
 {
     Assert.That(PokedexData.NormalizeName("Mr Mime"), Is.EqualTo("Mr. Mime"));
     Assert.That(PokedexData.NormalizeName("Mr Rime"), Is.EqualTo("Mr. Rime"));
     Assert.That(PokedexData.NormalizeName("Mime Jr"), Is.EqualTo("Mime Jr."));
     Assert.That(PokedexData.NormalizeName("Type Null"), Is.EqualTo("Type: Null"));
     Assert.That(PokedexData.NormalizeName("MissingNo"), Is.EqualTo("MissingNo."));
     Assert.That(PokedexData.NormalizeName("Farfetchd"), Is.EqualTo("Farfetch'd"));
     Assert.That(PokedexData.NormalizeName("Sirfetchd"), Is.EqualTo("Sirfetch'd"));
 }
コード例 #8
0
 public void recognizes_omitted_spaces()
 {
     Assert.That(PokedexData.NormalizeName("Mr.Mime"), Is.EqualTo("Mr. Mime"));
     Assert.That(PokedexData.NormalizeName("Mr.Rime"), Is.EqualTo("Mr. Rime"));
     Assert.That(PokedexData.NormalizeName("MimeJr."), Is.EqualTo("Mime Jr."));
     Assert.That(PokedexData.NormalizeName("Type:Null"), Is.EqualTo("Type: Null"));
     Assert.That(PokedexData.NormalizeName("TapuKoko"), Is.EqualTo("Tapu Koko"));
     Assert.That(PokedexData.NormalizeName("TapuLele"), Is.EqualTo("Tapu Lele"));
     Assert.That(PokedexData.NormalizeName("TapuBulu"), Is.EqualTo("Tapu Bulu"));
     Assert.That(PokedexData.NormalizeName("TapuFini"), Is.EqualTo("Tapu Fini"));
 }
コード例 #9
0
 public void recognizes_dashes_for_spaces()
 {
     Assert.That(PokedexData.NormalizeName("Mr.-Mime"), Is.EqualTo("Mr. Mime"));
     Assert.That(PokedexData.NormalizeName("Mr.-Rime"), Is.EqualTo("Mr. Rime"));
     Assert.That(PokedexData.NormalizeName("Mime-Jr."), Is.EqualTo("Mime Jr."));
     Assert.That(PokedexData.NormalizeName("Type:-Null"), Is.EqualTo("Type: Null"));
     Assert.That(PokedexData.NormalizeName("Tapu-Koko"), Is.EqualTo("Tapu Koko"));
     Assert.That(PokedexData.NormalizeName("Tapu-Lele"), Is.EqualTo("Tapu Lele"));
     Assert.That(PokedexData.NormalizeName("Tapu-Bulu"), Is.EqualTo("Tapu Bulu"));
     Assert.That(PokedexData.NormalizeName("Tapu-Fini"), Is.EqualTo("Tapu Fini"));
 }
コード例 #10
0
 public void passes_through_exact_name()
 {
     string[] names =
     {
         "Nidoran♀",   "Nidoran♂",
         "Farfetch'd", "Sirfetch'd",
         "Mr. Mime",   "Mr. Rime",  "Mime Jr.",
         "Jangmo-o",   "Hakamo-o",  "Kommo-o",
         "Tapu Koko",  "Tapu Lele", "Tapu Bulu", "Tapu Fini",
         "Ho-Oh",
         "Porygon-Z",
         "Flabébé",
         "Type: Null",
         "MissingNo."
     };
     foreach (string name in names)
     {
         Assert.That(PokedexData.NormalizeName(name), Is.EqualTo(name));
     }
 }
コード例 #11
0
 public void requires_full_match()
 {
     Assert.That(PokedexData.NormalizeName("Porygon-Z"), Is.EqualTo("Porygon-Z"));
     Assert.That(PokedexData.NormalizeName("~Porygon-Z"), Is.Not.EqualTo("Porygon-Z"));
     Assert.That(PokedexData.NormalizeName("Porygon-Z~"), Is.Not.EqualTo("Porygon-Z"));
 }
コード例 #12
0
 public void is_case_insensitive()
 {
     Assert.That(PokedexData.NormalizeName("porygon-z"), Is.EqualTo("Porygon-Z"));
     Assert.That(PokedexData.NormalizeName("HO-OH"), Is.EqualTo("Ho-Oh"));
 }
コード例 #13
0
ファイル: PokedexDataTest.cs プロジェクト: Yoso2/tpp-core
 public void requires_full_match()
 {
     Assert.AreEqual("Porygon-Z", PokedexData.NormalizeName("Porygon-Z"));
     Assert.AreNotEqual("Porygon-Z", PokedexData.NormalizeName("~Porygon-Z"));
     Assert.AreNotEqual("Porygon-Z", PokedexData.NormalizeName("Porygon-Z~"));
 }
コード例 #14
0
ファイル: PokedexDataTest.cs プロジェクト: Yoso2/tpp-core
 public void is_case_insensitive()
 {
     Assert.AreEqual("Porygon-Z", PokedexData.NormalizeName("porygon-z"));
     Assert.AreEqual("Ho-Oh", PokedexData.NormalizeName("HO-OH"));
 }