Example #1
0
        public void PrettyPrintTest()
        {
            double number;
            int    left;
            int    right;
            string expected;
            string actual;

            number   = 9876.12345d;
            left     = 2;
            right    = 2;
            expected = "9876.12";
            actual   = ProfileSection.PrettyPrint(number, left, right);
            Assert.AreEqual(expected, actual);
            number   = 0.12345d;
            left     = 2;
            right    = 2;
            expected = "  0.12";
            actual   = ProfileSection.PrettyPrint(number, left, right);
            Assert.AreEqual(expected, actual);
            number   = -44.12345d;
            left     = 4;
            right    = 4;
            expected = "  -44.1234";
            actual   = ProfileSection.PrettyPrint(number, left, right);
            Assert.AreEqual(expected, actual);
        }