Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TouchRunner] Improve name printing in NuGet mode. #68

Merged
merged 1 commit into from
Jul 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions NUnitLite/TouchRunner/TouchRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,11 @@ public void TestStarted (ITest test)
{
if (test is TestSuite) {
Writer.WriteLine ();
#if NUNITLITE_NUGET
Writer.WriteLine (test.FullName);
#else
Writer.WriteLine (test.Name);
#endif
}
}

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

#if NUNITLITE_NUGET
string name = result.Test.FullName;
#else
string name = result.Test.Name;
#endif
if (!String.IsNullOrEmpty (name))
Writer.WriteLine ("{0} : {1} ms", name, result.GetDuration ().TotalMilliseconds);
} else {
Expand All @@ -427,12 +435,12 @@ public virtual void TestFinished (ITestResult r)
Writer.Write ("\t[INFO] ");
}
#if NUNITLITE_NUGET
Writer.Write (result.Test.FullName);
Writer.Write (result.Test.Name);
#else
Writer.Write (result.Test.FixtureType.Name);
#endif
Writer.Write (".");
Writer.Write (result.Test.Name);
#endif

string message = result.Message;
if (!String.IsNullOrEmpty (message)) {
Expand Down