Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Commit

Permalink
When there is no message from the underlying failure exception e need…
Browse files Browse the repository at this point in the history
… to substitute String.Empty for something else meaningful.
  • Loading branch information
CraigRichards committed Jun 8, 2021
1 parent 56982ac commit 0f48bbc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/allure-nunit/Core/AllureNUnitHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ private void StopTestCase()

AllureLifecycle.UpdateTestCase(x => x.statusDetails = new StatusDetails
{
message = TestContext.CurrentContext.Result.Message,
message = string.IsNullOrWhiteSpace(TestContext.CurrentContext.Result.Message)
? TestContext.CurrentContext.Test.Name
: TestContext.CurrentContext.Result.Message,
trace = TestContext.CurrentContext.Result.StackTrace
});

Expand Down

0 comments on commit 0f48bbc

Please sign in to comment.