Esempio n. 1
0
 public void ExtractingFirstInteger()
 {
     Assert.AreEqual(0, AddressParser.ExtractBeginingOfStringAsInteger(null));
     Assert.AreEqual(0, AddressParser.ExtractBeginingOfStringAsInteger(""));
     Assert.AreEqual(1, AddressParser.ExtractBeginingOfStringAsInteger("1"));
     Assert.AreEqual(123, AddressParser.ExtractBeginingOfStringAsInteger("123"));
     Assert.AreEqual(123, AddressParser.ExtractBeginingOfStringAsInteger("123-1"));
     Assert.AreEqual(123, AddressParser.ExtractBeginingOfStringAsInteger("  123"));
 }