示例#1
0
        public void TestConvertFromStringNull()
        {
            FormatterPercent formatter = new FormatterPercent();

            Assert.IsNull(formatter.ConvertFromString(null));
        }
示例#2
0
        public void TestConvertToString2()
        {
            FormatterPercent formatter = new FormatterPercent();

            Assert.AreEqual("50,01", formatter.ConvertToString(50.01m));
        }
示例#3
0
        public void TestConstructeur()
        {
            FormatterPercent formatter = new FormatterPercent();

            Assert.AreEqual("%", formatter.Unit);
        }
示例#4
0
        public void TestConvertFromStringBadFormat()
        {
            FormatterPercent formatter = new FormatterPercent();

            formatter.ConvertFromString("azerty");
        }
示例#5
0
        public void TestConvertFromStringPercentEmpty()
        {
            FormatterPercent formatter = new FormatterPercent();

            Assert.IsNull(formatter.ConvertFromString("%"));
        }
示例#6
0
        public void TestConvertFromStringPercent()
        {
            FormatterPercent formatter = new FormatterPercent();

            Assert.AreEqual(51.45m, formatter.ConvertFromString("51,45%"));
        }