예제 #1
0
        public void WriteLine_NonNullLine_DoesNotWriteToConsoleError()
        {
            var writer = new ConsoleLineWriter();

            writer.WriteLine("LINE1");
            writer.WriteLine("LINE2");

            Assert.That(_TempError.ToString(), Is.EqualTo(string.Empty));
        }
예제 #2
0
        public void WriteLine_NonNullLine_WritesLineToConsole()
        {
            var writer = new ConsoleLineWriter();

            writer.WriteLine("LINE1");
            writer.WriteLine("LINE2");

            CollectionAssert.AreEqual(_TempOut.ToString().Split(new[]
            {
                Environment.NewLine
            }, StringSplitOptions.None), new[]
            {
                "LINE1", "LINE2", string.Empty
            });
        }
예제 #3
0
        public void WriteLine_NullLine_ThrowsArgumentNullException()
        {
            var writer = new ConsoleLineWriter();

            Assert.Throws <ArgumentNullException>(() => writer.WriteLine(null));
        }