Beispiel #1
0
        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);
        }
Beispiel #2
0
        public void CheckPriceParseOfERotenCom()
        {
            var x = CommonConvert.ConvertStringToPrice("657.00");

            Assert.AreEqual(657, x);
        }
Beispiel #3
0
        public void ShouldConvertForNumberLongWithDot()
        {
            var y = CommonConvert.ConvertStringToPrice("123.456.789");

            Assert.AreEqual(123456789, y);
        }
Beispiel #4
0
        public void ShouldConvertForNumberLongWitComma()
        {
            var y = CommonConvert.ConvertStringToPrice("123,455,789");

            Assert.AreEqual(123455789, y);
        }
Beispiel #5
0
        public void ShouldConvertForGreaterOneComanAndLessThreadNumbeEnd()
        {
            var y = CommonConvert.ConvertStringToPrice("123,789,91");

            Assert.AreEqual(123789.91, y);
        }
Beispiel #6
0
        public void ShouldConvertNoramlNumber()
        {
            var y = CommonConvert.ConvertStringToPrice("10000");

            Assert.AreEqual(10000, y);
        }
Beispiel #7
0
 public void ShouldThrowExceptionWhenNotValidRegexNumber()
 {
     CommonConvert.ConvertStringToPrice("3434,3434 vnd");
 }
Beispiel #8
0
 public void ShouldThrowNewExceptionWHenNoInput()
 {
     CommonConvert.ConvertStringToPrice("");
 }