Пример #1
0
        public void printMultiLine()
        {
            CaptureText capture = new CaptureText(new StreamInformation(new Settings()));

            Print p = new Print {
                formatStrings = new [] { "1 $0", "2 $0" }, processor = capture
            };

            p.processLine("Adam Smith");

            Assert.Equal("1 Adam Smith\r\n2 Adam Smith\r\n", capture.capture.ToString());
        }
Пример #2
0
        public void printMultiRow()
        {
            List <String> row = new List <String> {
                "AA", "BB"
            };
            CaptureText capture = new CaptureText(new StreamInformation(new Settings()));

            Print p = new Print {
                formatStrings = new [] { "1 $1", "2 $2" }, processor = capture
            };

            p.processRow(row);

            Assert.Equal("1 AA\r\n2 BB\r\n", capture.capture.ToString());
        }