Skip to content

Use pattern matching for adapter null checks#10142

Merged
Evangelink merged 1 commit into
mainfrom
dev/amauryleve/simplify-adapter-null-checks
Jul 22, 2026
Merged

Use pattern matching for adapter null checks#10142
Evangelink merged 1 commit into
mainfrom
dev/amauryleve/simplify-adapter-null-checks

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Summary

  • replace equality-based null checks in the new adapter code with is null and is not null
  • align the affected files with the repository coding standards without changing behavior

Fixes #10138

Testing

  • ./build.cmd -projects "src\\Adapter\\MSTest.TestAdapter\\MSTest.TestAdapter.csproj" -bl -v:minimal

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

Copilot-Session: 49ab863c-8f28-43a4-a96b-cbd0fc76c6d0
Copilot AI review requested due to automatic review settings July 22, 2026 15:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Aligns adapter null checks with repository pattern-matching standards without changing behavior.

Changes:

  • Replaces == null with is null.
  • Replaces != null with is not null.
Show a summary per file
File Description
TestMethodFilter.cs Updates context, test case, and property-name null checks.
UnitTestElementExtensions.cs Updates priority and work-item null checks.
TcmTestPropertiesProvider.cs Updates the test-case null check.

Review details

  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Medium

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note

🤖 Automated review by GitHub Copilot. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.

Review Summary

LGTM — Clean mechanical refactoring replacing == null / != null with is null / is not null pattern matching, aligning with repository coding standards.

No issues found. Ship it! 🚀

@Evangelink
Evangelink enabled auto-merge (squash) July 22, 2026 15:19
@Evangelink Evangelink added the state/needs-review Awaiting review from the team. label Jul 22, 2026
@Evangelink
Evangelink merged commit 5e9e490 into main Jul 22, 2026
28 checks passed
@Evangelink
Evangelink deleted the dev/amauryleve/simplify-adapter-null-checks branch July 22, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state/needs-review Awaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[code-simplifier] Simplify: use is null/is not null in new adapter files

3 participants