Class IBANCheckDigitTest
- java.lang.Object
-
- org.apache.bval.extras.constraints.checkdigit.AbstractCheckDigitTest
-
- org.apache.bval.extras.constraints.checkdigit.IBANCheckDigitTest
-
public class IBANCheckDigitTest extends AbstractCheckDigitTest
IVAN Check Digit Test.
-
-
Constructor Summary
Constructors Constructor Description IBANCheckDigitTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringcheckDigit(String code)Returns the check digit (i.e.protected String[]createInvalidCodes(String[] codes)Returns an array of codes with invalid check digits.intgetCheckDigitLth()protected jakarta.validation.ConstraintValidator<? extends Annotation,? super String>getConstraint()protected String[]getInvalid()StringgetMissingMessage()protected String[]getValid()protected StringgetZeroSum()protected StringremoveCheckDigit(String code)Returns a code with the Check Digit (i.e.voidtestZeroSum()Test zero sum-
Methods inherited from class org.apache.bval.extras.constraints.checkdigit.AbstractCheckDigitTest
setUp, tearDown, testIsValidFalse, testIsValidTrue, testMissingCode
-
-
-
-
Method Detail
-
getCheckDigitLth
public int getCheckDigitLth()
- Overrides:
getCheckDigitLthin classAbstractCheckDigitTest
-
getConstraint
protected jakarta.validation.ConstraintValidator<? extends Annotation,? super String> getConstraint()
- Specified by:
getConstraintin classAbstractCheckDigitTest
-
getValid
protected String[] getValid()
- Specified by:
getValidin classAbstractCheckDigitTest
-
getInvalid
protected String[] getInvalid()
- Overrides:
getInvalidin classAbstractCheckDigitTest
-
getZeroSum
protected String getZeroSum()
- Overrides:
getZeroSumin classAbstractCheckDigitTest
-
getMissingMessage
public String getMissingMessage()
- Overrides:
getMissingMessagein classAbstractCheckDigitTest
-
testZeroSum
public void testZeroSum()
Test zero sum- Overrides:
testZeroSumin classAbstractCheckDigitTest
-
createInvalidCodes
protected String[] createInvalidCodes(String[] codes)
Description copied from class:AbstractCheckDigitTestReturns an array of codes with invalid check digits.- Overrides:
createInvalidCodesin classAbstractCheckDigitTest- Parameters:
codes- Codes with valid check digits- Returns:
- Codes with invalid check digits
-
removeCheckDigit
protected String removeCheckDigit(String code)
Returns a code with the Check Digit (i.e. last character) removed.- Overrides:
removeCheckDigitin classAbstractCheckDigitTest- Parameters:
code- The code- Returns:
- The code without the check digit
-
checkDigit
protected String checkDigit(String code)
Returns the check digit (i.e. last character) for a code.- Overrides:
checkDigitin classAbstractCheckDigitTest- Parameters:
code- The code- Returns:
- The check digit
-
-