コード例 #1
0
 public void AlphaToOutlineNum_Valid()
 {
     Assert.AreEqual(1, AlphaOutline.AlphaOutlineToNum("A"));
     Assert.AreEqual(1, AlphaOutline.AlphaOutlineToNum("a"));
     Assert.AreEqual(26, AlphaOutline.AlphaOutlineToNum("Z"));
     Assert.AreEqual(27, AlphaOutline.AlphaOutlineToNum("AA"));
     Assert.AreEqual(52, AlphaOutline.AlphaOutlineToNum("ZZ"));
     Assert.AreEqual(53, AlphaOutline.AlphaOutlineToNum("AAA"));
 }
コード例 #2
0
 public void AlphaToOutlineNum_Invalid()
 {
     Assert.AreEqual(-1, AlphaOutline.AlphaOutlineToNum(string.Empty));
     Assert.AreEqual(-1, AlphaOutline.AlphaOutlineToNum(null));
     Assert.AreEqual(-1, AlphaOutline.AlphaOutlineToNum("7"));
     Assert.AreEqual(-1, AlphaOutline.AlphaOutlineToNum("A1"));
     Assert.AreEqual(-1, AlphaOutline.AlphaOutlineToNum("AB"));
     Assert.AreEqual(-1, AlphaOutline.AlphaOutlineToNum("AAC"));
     Assert.AreEqual(-1, AlphaOutline.AlphaOutlineToNum("?"));
 }