coverage: add missing analyzer tests#399
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds missing test coverage for the Mockolate analyzers, specifically for the WrappabilityAnalyzer and MockabilityAnalyzer. The tests ensure that generic interfaces can be wrapped and that arrays are properly flagged as unmockable.
Changes:
- Added test for wrapping generic interfaces to ensure no false positives
- Added test for mocking arrays to verify proper error reporting
- Added test for mock generators without attributes to ensure they're not flagged
- Removed dead code checking for static types in
MockabilityAnalyzer
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Tests/Mockolate.Analyzers.Tests/WrappabilityAnalyzerTests.cs | Adds test coverage for wrapping generic interfaces |
| Tests/Mockolate.Analyzers.Tests/MockabilityAnalyzerTests.cs | Adds tests for array mocking, global interfaces in namespaces, and mock generators without attributes |
| Source/Mockolate.Analyzers/MockabilityAnalyzer.cs | Removes unreachable static type check since arrays are handled earlier |
5015bea to
541b529
Compare
🚀 Benchmark ResultsDetails
|
|
|
This is addressed in release v1.0.3. |



This PR adds missing test coverage for the Mockolate analyzers, specifically for the
WrappabilityAnalyzerandMockabilityAnalyzer.Key Changes:
MockabilityAnalyzer