Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion 2 TUnit.Core/Models/TestModels/AssemblyMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public record AssemblyMetadata
private static readonly ConcurrentDictionary<string, AssemblyMetadata> Cache = [];
public static AssemblyMetadata GetOrAdd(string name, Func<AssemblyMetadata> factory)
{
return Cache.GetOrAdd(name, _ => factory());
return Cache.GetOrAdd(name, static (_, factory) => factory(), factory);
}

public virtual bool Equals(AssemblyMetadata? other)
Expand Down
4 changes: 2 additions & 2 deletions 4 TUnit.Core/Models/TestModels/ClassMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ public static ClassMetadata GetOrAdd(string name, Func<ClassMetadata> factory)
}
return existing;
}

// Otherwise add new value
return Cache.GetOrAdd(name, _ => factory());
return Cache.GetOrAdd(name, static (_, factory) => factory(), factory);
}

public virtual bool Equals(ClassMetadata? other)
Expand Down
1 change: 0 additions & 1 deletion 1 TUnit.Engine/Building/TestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,6 @@ public async Task<AbstractExecutableTest> BuildTestAsync(TestMetadata metadata,
return firstSkipAttribute?.Reason;
}


private async ValueTask<TestContext> CreateTestContextAsync(string testId, TestMetadata metadata, TestData testData, TestBuilderContext testBuilderContext)
{
// Use attributes from context if available, or create new ones
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.