Esempio n. 1
0
 public void NumToAlphaOutline()
 {
     Assert.AreEqual("A", AlphaOutline.NumToAlphaOutline(1));
     Assert.AreEqual("Z", AlphaOutline.NumToAlphaOutline(26));
     Assert.AreEqual("AA", AlphaOutline.NumToAlphaOutline(27));
     Assert.AreEqual("ZZ", AlphaOutline.NumToAlphaOutline(52));
     Assert.AreEqual("AAA", AlphaOutline.NumToAlphaOutline(53));
 }
Esempio n. 2
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"));
 }
Esempio n. 3
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("?"));
 }