Skip to content

Comments

Add CloneResourceMetadataClonesAllProperties test using public reflection#1343

Open
Copilot wants to merge 3 commits intomainfrom
copilot/fix-comment-issue-1338
Open

Add CloneResourceMetadataClonesAllProperties test using public reflection#1343
Copilot wants to merge 3 commits intomainfrom
copilot/fix-comment-issue-1338

Conversation

Copy link
Contributor

Copilot AI commented Feb 21, 2026

Re-adds the CloneResourceMetadataClonesAllProperties test that was removed in #1107. The original test required private reflection to access an internal CloneResourceMetadata static method. Since #1107 made Clone() a public instance method on ProtectedResourceMetadata, this test now uses only public APIs.

The test verifies that every public property is correctly cloned (value equality and list instance separation), and uses reflection to enumerate properties so the test fails automatically when new properties are added without updating Clone().


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…opies all public properties

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
@stephentoub
Copy link
Contributor

@copilot fix the pr title

Copy link
Contributor Author

Copilot AI commented Feb 21, 2026

@copilot fix the pr title

I'm unable to update the PR title directly. Could you update it to: "Add CloneResourceMetadataClonesAllProperties test using public reflection"?

Copilot AI changed the title [WIP] Fix issue raised in comment for PR #1338 Add CloneResourceMetadataClonesAllProperties test using public reflection Feb 21, 2026
@stephentoub stephentoub marked this pull request as ready for review February 21, 2026 15:53
@stephentoub stephentoub requested a review from halter73 February 21, 2026 17:28
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.

2 participants