TextUi class does not make use of TextWriter passed to constructor
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.
}
[Test]
public void MyTestMethod() {
}
}
}
=======
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
Changed in nunitlite: | |
status: | Triaged → Fix Committed |
Changed in nunitlite: | |
status: | Fix Committed → Fix Released |
Upon examination, it is clear that TextUi creates a new writer in all cases, rather than using the supplied writer.