Skip to content

Commit

Permalink
Remove redundant code from AllureXunitHelper
Browse files Browse the repository at this point in the history
  • Loading branch information
delatrie committed Mar 28, 2024
1 parent cd3e89b commit cbd6378
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions Allure.XUnit/AllureXunitHelper.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Allure.Net.Commons;
using Allure.Net.Commons.Functions;
Expand All @@ -17,36 +16,6 @@ static class AllureXunitHelper
internal const string NS_OBSOLETE_MSG =
"The Allure.XUnit namespace is deprecated. Please, use Allure.Xunit instead";

internal interface ITestResultAccessor
{
TestResultContainer TestResultContainer { get; set; }
TestResult TestResult { get; set; }
}

static AllureXunitHelper()
{
const string allureConfigEnvVariable = "ALLURE_CONFIG";
const string allureConfigName = "allureConfig.json";

var allureConfigPath = Environment.GetEnvironmentVariable(
allureConfigEnvVariable
);
if (!string.IsNullOrEmpty(allureConfigPath))
{
return;
}

allureConfigPath = Path.Combine(
AppDomain.CurrentDomain.BaseDirectory,
allureConfigName
);

Environment.SetEnvironmentVariable(
allureConfigEnvVariable,
allureConfigPath
);
}

internal static TestResultContainer StartNewAllureContainer(
string className
)
Expand Down Expand Up @@ -178,16 +147,6 @@ string displayName
return testResult;
}

static void ApplyTestSkip(
TestResult testResult,
string reason
)
{
var statusDetails = testResult.statusDetails ??= new();
statusDetails.message = reason;
testResult.status = Status.skipped;
}

static void AddDistinct(
this List<Label> labels,
Label labelToInsert,
Expand Down

0 comments on commit cbd6378

Please sign in to comment.