Example #1
0
        public void AsTextTest()
        {
            ErrorCollection target = new ErrorCollection();
            string          actual;

            actual = target.AsText();
            Assert.AreEqual(string.Empty, actual);

            target.Add("Test 1");
            actual = target.AsText();
            Assert.AreEqual("* Test 1\n", actual);

            target.Add("Test 2");
            actual = target.AsText();
            Assert.AreEqual("* Test 1\n* Test 2\n", actual);
        }
Example #2
0
        public void AddTest()
        {
            ErrorCollection target = new ErrorCollection();
            string          actual;

            target.Add("This is an {0} of {2} + {1}", "example", 2, 3);
            actual = target.AsText();
            Assert.AreEqual("* This is an example of 3 + 2\n", actual);
        }