Esempio n. 1
0
        public void From_decimal_to_integer()
        {
            // Arrange
            var c = new StringFormatConverter(typeof(int), "F0");

            // Act
            var result = c.FieldToString(1234.5678m);

            // Assert
            Assert.AreEqual("1235", result);
        }
Esempio n. 2
0
        public void From_decimal()
        {
            // Arrange
            var c = new StringFormatConverter(typeof(decimal), "F2");

            // Act
            var result = c.FieldToString(1234.5678m);

            // Assert
            Assert.AreEqual("1234.57", result);
        }