Exemplo n.º 1
0
 public void TestNumberAlphaNumber()
 {
     for (int i = 1; i < 100000; i++)
     {
         Assert.AreEqual(StringNumberConversions.StringToNumber(StringNumberConversions.NumberToString(i)), i, i.ToString());
     }
 }
Exemplo n.º 2
0
        public void TestAlphaNumberAlpha()
        {
            string randomStr;

            // only test upto length 5
            for (int j = 1; j < 6; j++)
            {
                // run 1000 tests
                for (int i = 0; i < 1000; i++)
                {
                    randomStr = RandomString(j);
                    Assert.AreEqual(StringNumberConversions.NumberToString(StringNumberConversions.StringToNumber(randomStr)), randomStr, randomStr);
                }
            }
        }