Created
April 12, 2019 15:58
-
-
Save cleopatra27/96db93d78b3bc2a42aa84758805176a6 to your computer and use it in GitHub Desktop.
Card PAN generating (random numbers)
This file contains 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
public long givenUsingPlainJava_whenGeneratingRandomLongBounded_thenCorrect() { | |
long leftLimit = 10000000000L; | |
long rightLimit = 1000L; | |
long generatedLong = leftLimit + (long) (Math.random() * (rightLimit - leftLimit)); | |
return generatedLong; | |
} | |
public long generateRandomCard() { | |
long card = this.givenUsingPlainJava_whenGeneratingRandomLongBounded_thenCorrect(); | |
return card; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment