Skip to content

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

@Evangelink

Description

@Evangelink

Code Simplification - 2026-05-13

This PR removes stale duplicate interface declarations from LoggingManagerTests that were left over after the review feedback in #8125 moved test-only interfaces inside the class.

Files Simplified

  • test/UnitTests/Microsoft.Testing.Platform.UnitTests/Logging/LoggingManagerTests.cs — removed 3 redundant top-level namespace-scoped interface declarations

Improvements Made

Removed Dead / Duplicate Code

After #8125 scoped the helper interfaces inside LoggingManagerTests, three top-level declarations were left at namespace scope:

  • IExtensionLoggerProvider — exact duplicate of the inner interface at line 188
  • IInitializableLoggerProvider — exact duplicate of the inner interface at line 192
  • IInitializableExtensionLoggerProvider — never referenced anywhere (all tests use the correctly-named inner IExtensionInitializableLoggerProvider)

Removing them eliminates ambiguity and keeps the file consistent with the stated intent of scoping test-only helpers inside the test class.

Changes Based On

Recent changes from:

Testing

  • ✅ No functional changes — only dead code removed
  • ✅ All test logic and inner interface definitions preserved

Automated by Code Simplifier Agent

Note

🔒 Integrity filter blocked 4 items

The following items were blocked because they don't meet the GitHub integrity level.

  • #8164 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #8163 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #8142 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #8141 search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

Generated by Code Simplifier · ● 11.9M ·

  • expires on May 14, 2026, 2:02 PM UTC

Note

This was originally intended as a pull request, but the git push operation failed.

Workflow Run: View run details and download bundle artifact

The bundle file is available in the agent artifact in the workflow run linked above.

To create a pull request with the changes:

# Download the artifact from the workflow run
gh run download 25803435914 -n agent -D /tmp/agent-25803435914

# Fetch the bundle into a local branch
git fetch /tmp/agent-25803435914/aw-simplify-remove-duplicate-namespace-interfaces.bundle refs/heads/simplify/remove-duplicate-namespace-interfaces:refs/heads/simplify/remove-duplicate-namespace-interfaces-27966de8b2512601
git checkout simplify/remove-duplicate-namespace-interfaces-27966de8b2512601

# Push the branch to origin
git push origin simplify/remove-duplicate-namespace-interfaces-27966de8b2512601

# Create the pull request
gh pr create --title '[code-simplifier] refactor: remove duplicate top-level interface declarations from LoggingManagerTests' --base main --head simplify/remove-duplicate-namespace-interfaces-27966de8b2512601 --repo microsoft/testfx

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions