Skip to content
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
9 changes: 5 additions & 4 deletions TUnit.Engine/Extensions/TestExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ private static string GetCachedAssemblyFullName(Assembly assembly)

private static CachedTestNodeProperties GetOrCreateCachedProperties(TestContext testContext)
{
var testDetails = testContext.Metadata.TestDetails;
var testId = testDetails.TestId;
var testId = testContext.Metadata.TestDetails.TestId;

return TestNodePropertiesCache.GetOrAdd(testId, _ =>
return TestNodePropertiesCache.GetOrAdd(testId, static (_, testContext) =>
{
var testDetails = testContext.Metadata.TestDetails;

var fileLocation = new TestFileLocationProperty(testDetails.TestFilePath, new LinePositionSpan(
new LinePosition(testDetails.TestLineNumber, 0),
new LinePosition(testDetails.TestLineNumber, 0)
Expand Down Expand Up @@ -108,7 +109,7 @@ private static CachedTestNodeProperties GetOrCreateCachedProperties(TestContext
TrxFullyQualifiedTypeName = trxTypeName,
TrxCategories = trxCategories
};
});
}, testContext);
}

internal static TestNode ToTestNode(this TestContext testContext, TestNodeStateProperty stateProperty)
Expand Down
Loading