Last active
December 22, 2015 11:59
-
-
Save bigbasti/6469111 to your computer and use it in GitHub Desktop.
Demo code for using IBANValidator
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
private final String VALID_IBAN_DE = "DE89 3704 0044 0532-0130 00"; | |
private final String DE_IBAN_LENGTH = "22"; | |
private final String DE_IBAN_STRUCTURE = "DE2!n8!n10!n"; | |
@Test | |
public void validGermanIBANStructureCheck() { | |
boolean result = false; | |
try { | |
result = IBANValidator.checkIbanStructure(VALID_IBAN_DE, "DE", DE_IBAN_LENGTH, DE_IBAN_STRUCTURE); | |
} catch (IBANValidationException e) {} | |
assertTrue(result); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment