From cd3e89b29cf806b43d66b520d4b32469c9968999 Mon Sep 17 00:00:00 2001 From: Maksim Stepanov <17935127+delatrie@users.noreply.github.com> Date: Thu, 28 Mar 2024 02:32:36 +0700 Subject: [PATCH] Set Allure.Xunit's TFMs to netstandard2.0 and netcoreapp3.1 --- Allure.XUnit/Allure.XUnit.csproj | 2 +- Allure.XUnit/AllureMessageSink.cs | 2 +- Allure.XUnit/AllureXunitHelper.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Allure.XUnit/Allure.XUnit.csproj b/Allure.XUnit/Allure.XUnit.csproj index c3dd6797..9af2ec8d 100644 --- a/Allure.XUnit/Allure.XUnit.csproj +++ b/Allure.XUnit/Allure.XUnit.csproj @@ -2,7 +2,7 @@ Allure.Xunit.reporters - netcoreapp2.0;netstandard2.1;net5.0;net6.0 + netstandard2.0;netcoreapp3.1 true Shumakov Ivan Create beautiful reports from your xUnit.net tests. diff --git a/Allure.XUnit/AllureMessageSink.cs b/Allure.XUnit/AllureMessageSink.cs index cf901f9a..a62332cb 100644 --- a/Allure.XUnit/AllureMessageSink.cs +++ b/Allure.XUnit/AllureMessageSink.cs @@ -161,7 +161,7 @@ void OnTestFinished(MessageHandlerArgs args) }); } - this.allureTestData.Remove(test, out _); + this.allureTestData.TryRemove(test, out _); } AllureXunitTestData GetOrCreateTestData(ITest test) diff --git a/Allure.XUnit/AllureXunitHelper.cs b/Allure.XUnit/AllureXunitHelper.cs index 68d432ba..71d18afc 100644 --- a/Allure.XUnit/AllureXunitHelper.cs +++ b/Allure.XUnit/AllureXunitHelper.cs @@ -66,8 +66,8 @@ internal static void StartAllureTestCase( internal static void ApplyTestFailure(IFailureInformation failure) { - var trace = string.Join('\n', failure.StackTraces); - var message = string.Join('\n', failure.Messages); + var trace = string.Join("\n", failure.StackTraces); + var message = string.Join("\n", failure.Messages); var status = failure.ExceptionTypes.Any( exceptionType => !exceptionType.StartsWith("Xunit.Sdk.") ) ? Status.broken : Status.failed;