Exemple #1
0
        public void WriteErrorLine_NonNullLine_DoesNotWriteToConsoleOut()
        {
            var writer = new ConsoleLineWriter();

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

            Assert.That(_TempOut.ToString(), Is.EqualTo(string.Empty));
        }
Exemple #2
0
        public void WriteErrorLine_NonNullLine_WritesLineToErrorConsole()
        {
            var writer = new ConsoleLineWriter();

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

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

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