Ejemplo n.º 1
0
        public void AutoFormatTest1()
        {
            StringColumnFormat format = new StringColumnFormat(10);

            string[] values = new string[] { "1", "12", "123", "1234", "123456", "1234567" };
            format.AutoFormat(values, false);

            Assert.AreEqual(7, format.MaxWidth);
        }
Ejemplo n.º 2
0
        public void AutoFormatTest2()
        {
            StringColumnFormat format = new StringColumnFormat(10);

            string[] values = new string[] { "1", "12" };
            format.AutoFormat(values, false);

            // Not less than the characters required to display null values.
            Assert.AreEqual(ColumnFormat.NullText.Length, format.MaxWidth);
        }