Skip to content

fix: support open generic transitive auto-mocks - #5568

Merged
thomhurst merged 4 commits into
mainfrom
codex/open-generic-transitive-mocks
Apr 16, 2026
Merged

fix: support open generic transitive auto-mocks#5568
thomhurst merged 4 commits into
mainfrom
codex/open-generic-transitive-mocks

Conversation

@thomhurst

Copy link
Copy Markdown
Owner

Summary

Testing

  • dotnet test .\TUnit.Mocks.SourceGenerator.Tests\TUnit.Mocks.SourceGenerator.Tests.csproj
  • dotnet test .\TUnit.Mocks.Tests\TUnit.Mocks.Tests.csproj

Closes#5567

Handle transitive generic interface mocks as open generic definitions so generated code and runtime factories can close them for concrete type arguments.
Refs #5567
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
1 pipeline(s) were filtered out due to trigger conditions.

@codacy-production

codacy-productionBot commented Apr 15, 2026

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues4 medium · 26 minor

Alerts:
⚠ 30 issues (≤ 0 issues of at least minor severity)

Results:
30 new issues

CategoryResults
UnusedCode1 minor
BestPractice2 medium
1 minor
CodeStyle24 minor
Performance2 medium

View in Codacy

🟢 Metrics292 complexity

MetricResults
Complexity292

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
1 pipeline(s) were filtered out due to trigger conditions.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
1 pipeline(s) were filtered out due to trigger conditions.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TUnit.Mocks fails for generic interface inheriting IEnumerable<T> in transitive mock generation

1 participant

@thomhurst