public void ShouldConvertForNumberDotAndCommand() { var y = CommonConvert.ConvertStringToPrice("12.123.323,23"); Assert.AreEqual(12123323, 23, y); var y1 = CommonConvert.ConvertStringToPrice("12,123,323.23"); Assert.AreEqual(12123323, 23, y1); }
public void CheckPriceParseOfERotenCom() { var x = CommonConvert.ConvertStringToPrice("657.00"); Assert.AreEqual(657, x); }
public void ShouldConvertForNumberLongWithDot() { var y = CommonConvert.ConvertStringToPrice("123.456.789"); Assert.AreEqual(123456789, y); }
public void ShouldConvertForNumberLongWitComma() { var y = CommonConvert.ConvertStringToPrice("123,455,789"); Assert.AreEqual(123455789, y); }
public void ShouldConvertForGreaterOneComanAndLessThreadNumbeEnd() { var y = CommonConvert.ConvertStringToPrice("123,789,91"); Assert.AreEqual(123789.91, y); }
public void ShouldConvertNoramlNumber() { var y = CommonConvert.ConvertStringToPrice("10000"); Assert.AreEqual(10000, y); }
public void ShouldThrowExceptionWhenNotValidRegexNumber() { CommonConvert.ConvertStringToPrice("3434,3434 vnd"); }
public void ShouldThrowNewExceptionWHenNoInput() { CommonConvert.ConvertStringToPrice(""); }