TextUi class does not make use of TextWriter passed to constructor

Bug #1028181 reported by Charlie Poole
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnitLite
Fix Released
Critical
Charlie Poole

Bug Description

From the nunitlite mail list:

I tried the following program with the following output. It seems the TextWriter I passed is just ignored. Is this expected behaviour?

/Johan

==================

using System;
using System.IO;
using NUnit.Framework;

namespace nunitlitetest
{
    [TestFixture]
    public class MainClass
    {
        public static void Main (string[] args)
        {
            var sw = new StringWriter();
            new NUnitLite.Runner.TextUI(sw).Execute(args);
            Console.WriteLine("sw = \"" + sw + "\" (length = " + sw.ToString().Length + ")");
        }

        [Test]
        public void MyTestMethod() {
            Assert.That(1, Is.EqualTo(2));
        }
    }
}

======================

NUnitLite 0.7.0 ()
Copyright 2012, Charlie Poole

Runtime Environment -
    OS Version: Unix 2.6.38.11
  Mono Version: 4.0.30319.1

1 Tests : 0 Failures, 0 Errors, 0 Not Run
sw = "" (length = 0)

Related branches

Revision history for this message
Charlie Poole (charlie.poole) wrote :

Upon examination, it is clear that TextUi creates a new writer in all cases, rather than using the supplied writer.

Changed in nunitlite:
status: New → Triaged
importance: Undecided → Critical
assignee: nobody → Charlie Poole (charlie.poole)
milestone: none → 0.8
Changed in nunitlite:
status: Triaged → Fix Committed
Changed in nunitlite:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.