Skip to content

Refactor TestMethodInfo.cs into focused partial class files#7985

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/refactor-test-method-info
Draft

Refactor TestMethodInfo.cs into focused partial class files#7985
Copilot wants to merge 3 commits intomainfrom
copilot/refactor-test-method-info

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 1, 2026

TestMethodInfo.cs had grown to 1113 lines, making it hard to navigate. Splits it into focused partial class files using idiomatic C#.

File split

File Lines Contents
TestMethodInfo.cs 202 Fields, constructor, properties, InvokeAsync, GetTestMethodAttribute, GetRetryAttribute
TestMethodInfo.ArgumentResolution.cs 85 SetArguments, ResolveArguments
TestMethodInfo.Execution.cs 368 ExecuteInternalAsync, ExecuteInternalWithTimeoutAsync, GetTestTimeout, ThrowMultipleAttributesException, GetRealException, CreateTestClassInstance
TestMethodInfo.ExceptionHandling.cs 92 HandleMethodException
TestMethodInfo.Lifecycle.cs 373 All TestInitialize/TestCleanup fixture invocation methods
TestMethodInfo.TestContext.cs 56 SetTestContext

Notes

  • Pure reorganization — no logic changes, no signature changes, no access modifier changes
  • Each partial file carries only the using directives it actually needs
  • Also fixes a pre-existing typo in a comment: UwnrapUnwrap

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • c50vsblobprodcus330.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet restore test/UnitTests/MSTestAdapter.PlatformServices.UnitTests/MSTestAdapter.PlatformServices.UnitTests.csproj --ignore-failed-sources (dns block)
  • jd4vsblobprodcus366.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet restore test/UnitTests/MSTestAdapter.PlatformServices.UnitTests/MSTestAdapter.PlatformServices.UnitTests.csproj --ignore-failed-sources (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested review from Copilot and removed request for Copilot May 1, 2026 22:13
Copilot AI linked an issue May 1, 2026 that may be closed by this pull request
5 tasks
Copilot AI requested review from Copilot and removed request for Copilot May 1, 2026 22:39
Agent-Logs-Url: https://github.com/microsoft/testfx/sessions/dd544e32-680d-4df7-b737-2aedee7ec043

Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 1, 2026 22:40
Copilot AI changed the title [WIP] Refactor TestMethodInfo.cs into smaller files Refactor TestMethodInfo.cs into focused partial class files May 1, 2026
Copilot AI requested a review from Evangelink May 1, 2026 22:40
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.

🏋️ File Diet: Refactor TestMethodInfo.cs (1113 lines) into focused modules

2 participants