Skip to content

Commit

Permalink
Add test case for numeric prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
Satyam Saxena committed Feb 25, 2025
1 parent 6eeb30f commit 60f2ea9
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,13 @@ void testParseSuccess() {
id.getGeneratedDate());
}

@Test
void testParseFailAfterGeneration() {
val generatedId = IdGenerator.generate("TEST123");
val parsedId = IdGenerator.parse(generatedId.getId()).orElse(null);
Assertions.assertNull(parsedId);
}

@Test
void testParseSuccessAfterGeneration() {
val generatedId = IdGenerator.generate("TEST");
Expand Down

0 comments on commit 60f2ea9

Please sign in to comment.