Skip to content

Add JUnit tests for validating PDB ID regex#6

Merged
ChunxiaoB merged 4 commits intomasterfrom
dev-cb-addtests
Feb 18, 2026
Merged

Add JUnit tests for validating PDB ID regex#6
ChunxiaoB merged 4 commits intomasterfrom
dev-cb-addtests

Conversation

@ChunxiaoB
Copy link
Contributor

This PR adds JUnit tests for validating PDB ID regex behavior.

  1. PDB_ID_WITH_SUFFIX_REGEX has been updated to match:
  • Standard 4-letter PDB IDs
  • 4-letter PDB IDs with an optional valid separator and suffix
  1. Unit tests have been added to ensure correct matching for both formats.

Copy link
Member

@josemduarte josemduarte left a comment

Choose a reason for hiding this comment

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

Thank you for adding tests! See one comment about junit version

pom.xml Outdated
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
Copy link
Member

Choose a reason for hiding this comment

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

Since this is the first time we add tests for this project, I think it'd be best to have the newest junit version (now version 6). Transforming the test to the latest version should be quite easy, I think even IntelliJ has a tool to migrate. Otherwise with AI.

@ChunxiaoB
Copy link
Contributor Author

@josemduarte I upgraded JUnit to the latest version and adapted unit tests. Thanks!

Copy link
Member

@josemduarte josemduarte left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

@ChunxiaoB
Copy link
Contributor Author

Thanks @josemduarte

@ChunxiaoB ChunxiaoB merged commit 4e414e0 into master Feb 18, 2026
2 checks passed
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