Activity log for bug #797150

Date Who What changed Old value New value Message
2011-06-14 12:15:09 Juan José Montes de Oca Arbós bug added bug
2011-06-14 12:15:44 Juan José Montes de Oca Arbós attachment added NUnitConsole.cs https://bugs.launchpad.net/nunitv2/+bug/797150/+attachment/2168287/+files/NUnitConsole.cs
2011-06-18 19:43:04 Juan José Montes de Oca Arbós description When testing a console application and run the method Console.Clear(); NUnit's console generates the exception System.IO.Exception. This work at MonoDevelop Test Console and don't work at NUnit Console and Resharper Console. Code Example: using System; using System.IO; using NUnit.Framework; namespace NUnitConsoleBug { [TestFixture] public class NUnitConsole { [Test] public void TestConsoleWriteLine() { //This work! var sw = new StringWriter(); Console.SetOut(sw); Console.WriteLine("Test WriteLine{0}", Environment.NewLine); Assert.IsTrue(sw.ToString().Contains(string.Format("Test WriteLine{0}", Environment.NewLine))); sw.Dispose(); } [Test] public void TestConsoleClear() { //This dont work! var sw = new StringWriter(); Console.SetOut(sw); Assert.DoesNotThrow(Console.Clear); sw.Dispose(); } } } When testing a console application and run the method Console.Clear(); NUnit's console generates the exception System.IO.Exception. This work at MonoDevelop Test GUI Console, NUnit Console no GUI and don't work at NUnit GUI Console and Resharper GUI Console. Code Example: using System; using System.IO; using NUnit.Framework; namespace NUnitConsoleBug {     [TestFixture]     public class NUnitConsole     {         [Test]         public void TestConsoleWriteLine()         {             //This work!             var sw = new StringWriter();             Console.SetOut(sw);             Console.WriteLine("Test WriteLine{0}", Environment.NewLine);             Assert.IsTrue(sw.ToString().Contains(string.Format("Test WriteLine{0}", Environment.NewLine)));             sw.Dispose();         }         [Test]         public void TestConsoleClear()         {             //This dont work!             var sw = new StringWriter();             Console.SetOut(sw);             Assert.DoesNotThrow(Console.Clear);             sw.Dispose();         }     } }
2011-10-28 17:18:56 Charlie Poole tags console console.clear confirm console console.clear
2011-10-28 17:22:49 Charlie Poole nunitv2: assignee Charlie Poole (charlie.poole)
2011-10-28 17:23:00 Charlie Poole nunitv2: milestone 2.6.0
2011-10-29 01:43:16 Charlie Poole nunitv2: milestone 2.6.0
2011-10-29 01:43:19 Charlie Poole nunitv2: assignee Charlie Poole (charlie.poole)
2011-10-29 01:43:25 Charlie Poole nunitv2: status New Invalid