Skip to content

[code-simplifier] refactor: remove duplicate top-level interface declarations from LoggingManagerTests#8196

Open
Evangelink wants to merge 1 commit into
mainfrom
simplify/remove-duplicate-namespace-interfaces-27966de8b2512601
Open

[code-simplifier] refactor: remove duplicate top-level interface declarations from LoggingManagerTests#8196
Evangelink wants to merge 1 commit into
mainfrom
simplify/remove-duplicate-namespace-interfaces-27966de8b2512601

Conversation

@Evangelink
Copy link
Copy Markdown
Member

The three top-level namespace interfaces (IExtensionLoggerProvider,
IInitializableLoggerProvider, IInitializableExtensionLoggerProvider)
were stale leftovers. The test class already declares the interfaces it
needs as private nested types (IExtensionLoggerProvider,
IExtensionInitializableLoggerProvider, IInitializableLoggerProvider).
The top-level IInitializableExtensionLoggerProvider was also unused.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Fixes #8182

…ingManagerTests

The three top-level namespace interfaces (IExtensionLoggerProvider,
IInitializableLoggerProvider, IInitializableExtensionLoggerProvider)
were stale leftovers. The test class already declares the interfaces it
needs as private nested types (IExtensionLoggerProvider,
IExtensionInitializableLoggerProvider, IInitializableLoggerProvider).
The top-level IInitializableExtensionLoggerProvider was also unused.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 13, 2026 17:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes stale, duplicate namespace-scoped helper interfaces from LoggingManagerTests, relying solely on the already-present nested interfaces within the test class to avoid ambiguity and dead code in the test project.

Changes:

  • Removed redundant top-level interface declarations (IExtensionLoggerProvider, IInitializableLoggerProvider, IInitializableExtensionLoggerProvider) from LoggingManagerTests.cs.
  • Kept/confirmed usage of the nested helper interfaces inside LoggingManagerTests (no remaining references to the removed top-level interfaces).
Show a summary per file
File Description
test/UnitTests/Microsoft.Testing.Platform.UnitTests/Logging/LoggingManagerTests.cs Deletes duplicate/unused namespace-scoped interfaces; tests continue using the nested interface helpers.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

Copy link
Copy Markdown
Member Author

@Evangelink Evangelink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review — PR #8196

Summary: Clean dead-code removal. ✅

Analysis across all 21 review dimensions

Dimension Status Notes
Correctness All usages in the file reference the nested private interfaces inside LoggingManagerTests, not the removed top-level ones.
Breaking changes All three interfaces were internal and are unused outside LoggingManagerTests.cs. No other test or source file references them (grep confirms zero hits).
Dead code removal The three removed interfaces (IExtensionLoggerProvider, IInitializableLoggerProvider, IInitializableExtensionLoggerProvider) were stale top-level duplicates with no callers.
Duplicate detection The nested interfaces cover the same contracts: IExtensionLoggerProvider, IExtensionInitializableLoggerProvider (renamed from IInitializableExtensionLoggerProvider), and IInitializableLoggerProvider.
Test coverage No tests are affected; the Moq mocks all target the nested interfaces which remain intact.
Naming consistency The nested IExtensionInitializableLoggerProvider is actually a better name than the removed IInitializableExtensionLoggerProvider (adjective order matches the rest of the codebase).
Scope/visibility The nested interfaces are internal within a public sealed class — appropriate for test-only helpers.
API surface area Reduction only; no new public/internal API introduced.
PublicAPI.Unshipped.txt Not applicable (internal test interfaces).
Resource / localization files Not applicable.
Null safety Not applicable.
Style / EditorConfig No style changes introduced.
StyleCop (SA rules) Not applicable to this diff.
Init accessor policy Not applicable.
Logic errors None.
Security Not applicable.
Performance Not applicable.
Documentation No docs needed for internal test helpers.
Dependency hygiene No new dependencies.
Build impact Removing unused interfaces will only reduce compiler work.
Overall risk Very low — pure dead-code cleanup with no behavioral change.

Verdict

The change is correct and safe to merge. The removed top-level interfaces were unused leftovers that the nested private types inside LoggingManagerTests already supersede. No action required.

Generated by Expert Code Review (on open) for issue #8196 · ● 3.6M

Sign up for free to 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.

[code-simplifier] refactor: remove duplicate top-level interface declarations from LoggingManagerTests

2 participants