Created
March 7, 2013 18:17
-
-
Save jlkeiper/5110374 to your computer and use it in GitHub Desktop.
verifies idgen ability to increase identifier for seed beyond initial padding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Test | |
| public void getIdentifierForSeed_shouldAutomaticallyIncreaseLengthOfIdentifierBeyondPaddedFirstIdentifierBaseIfNoLengthIsProvided() throws Exception { | |
| SequentialIdentifierGenerator generator = new SequentialIdentifierGenerator(); | |
| generator.setFirstIdentifierBase("00"); | |
| generator.setBaseCharacterSet("0123456789"); | |
| assertThat(generator.getIdentifierForSeed(1), is("01")); | |
| assertThat(generator.getIdentifierForSeed(100), is("100")); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment