Skip to content

Update test to expect specific exception type for invalid private key#1

Merged
marevol merged 1 commit intomainfrom
fix/refine-invalid-key-test
Jun 20, 2025
Merged

Update test to expect specific exception type for invalid private key#1
marevol merged 1 commit intomainfrom
fix/refine-invalid-key-test

Conversation

@marevol
Copy link
Contributor

@marevol marevol commented Jun 20, 2025

This pull request updates the UtilsTest class to refine the test testGetNameIdDataWrongKey. The expected exception type has been changed from a generic Exception to a specific InvalidKeySpecRuntimeException, improving the precision of the test and better reflecting the actual behavior of the method Util.loadPrivateKey.

@marevol marevol requested a review from Copilot June 20, 2025 20:43
@marevol marevol self-assigned this Jun 20, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refines the UtilsTest by updating the testGetNameIdDataWrongKey to expect a specific InvalidKeySpecRuntimeException instead of a generic Exception.

  • Updates the expected exception type in the test.
  • Improves the precision of the test to better reflect the actual error behavior.

@marevol marevol merged commit 32f87ec into main Jun 20, 2025
2 checks passed
@marevol marevol deleted the fix/refine-invalid-key-test branch June 21, 2025 00:38
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