Beispiel #1
0
        public void WritesCorrectly()
        {
            var io = new StringIO("");

            io.Write("test");
            io.Write(" {0} {1}", 123, 456);
            Assert.AreEqual("test 123 456", io.output);
        }
Beispiel #2
0
        public void WritesLinesCorrectly()
        {
            var io = new StringIO("");

            io.WriteLine("aaa");
            io.Write("bbb");
            io.WriteLine(" {0} {1}", 123, 456);
            Assert.AreEqual("aaa\nbbb 123 456\n", io.output);
        }