Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Commit 8a0ec0d

Browse files
committed
[TouchRunner] Improve name printing in NuGet mode. (#68)
* The full name is printed for the test suite * The simple name is printed for each test fixture.
1 parent c7f8ff0 commit 8a0ec0d

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

NUnitLite/TouchRunner/TouchRunner.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,11 @@ public void TestStarted (ITest test)
395395
{
396396
if (test is TestSuite) {
397397
Writer.WriteLine ();
398+
#if NUNITLITE_NUGET
399+
Writer.WriteLine (test.FullName);
400+
#else
398401
Writer.WriteLine (test.Name);
402+
#endif
399403
}
400404
}
401405

@@ -407,7 +411,11 @@ public virtual void TestFinished (ITestResult r)
407411
if (!result.IsFailure () && !result.IsSuccess () && !result.IsInconclusive () && !result.IsIgnored ())
408412
Writer.WriteLine ("\t[INFO] {0}", result.Message);
409413

414+
#if NUNITLITE_NUGET
415+
string name = result.Test.FullName;
416+
#else
410417
string name = result.Test.Name;
418+
#endif
411419
if (!String.IsNullOrEmpty (name))
412420
Writer.WriteLine ("{0} : {1} ms", name, result.GetDuration ().TotalMilliseconds);
413421
} else {
@@ -427,12 +435,12 @@ public virtual void TestFinished (ITestResult r)
427435
Writer.Write ("\t[INFO] ");
428436
}
429437
#if NUNITLITE_NUGET
430-
Writer.Write (result.Test.FullName);
438+
Writer.Write (result.Test.Name);
431439
#else
432440
Writer.Write (result.Test.FixtureType.Name);
433-
#endif
434441
Writer.Write (".");
435442
Writer.Write (result.Test.Name);
443+
#endif
436444

437445
string message = result.Message;
438446
if (!String.IsNullOrEmpty (message)) {

0 commit comments

Comments
 (0)