Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Oct 6, 2025

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

Original prompt

Add focused unit tests to validate exception wrapping and diagnostic error message contents when PlatformNotSupportedException is thrown during JSON encoding in ClaimsHelper. The new tests should:

  1. Verify that when ForceJsonPns is enabled, GetMergedClaimsAndClientCapabilities throws a MsalClientException wrapping PlatformNotSupportedException, and the error message contains key diagnostic details (ProcessArchitecture=, Is64Bit=, HWIntrinsic=).
  2. Verify that the error message generator handles a null environment variable gracefully, including '(not set)' in the message as appropriate.

Tests should follow the Arrange/Act/Assert style and match the conventions used in existing ClaimsTest.cs tests.

*This pull request was created as a result of the following prompt from Copilot chat.* > Add focused unit tests to validate exception wrapping and diagnostic error message contents when PlatformNotSupportedException is thrown during JSON encoding in ClaimsHelper. The new tests should: > > 1. Verify that when ForceJsonPns is enabled, GetMergedClaimsAndClientCapabilities throws a MsalClientException wrapping PlatformNotSupportedException, and the error message contains key diagnostic details (ProcessArchitecture=, Is64Bit=, HWIntrinsic=). > 2. Verify that the error message generator handles a null environment variable gracefully, including '(not set)' in the message as appropriate. > > Tests should follow the Arrange/Act/Assert style and match the conventions used in existing ClaimsTest.cs tests.

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@gladjohn gladjohn closed this Oct 6, 2025
@Copilot Copilot AI requested a review from gladjohn October 6, 2025 20:35
Copilot finished work on behalf of gladjohn October 6, 2025 20:35
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