|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.bval.extras.constraints.checkdigit.AbstractCheckDigitTest
public abstract class AbstractCheckDigitTest
| Constructor Summary | |
|---|---|
AbstractCheckDigitTest()
|
|
| Method Summary | |
|---|---|
protected String |
checkDigit(String code)
Returns the check digit (i.e. |
protected String[] |
createInvalidCodes(String[] codes)
Returns an array of codes with invalid check digits. |
int |
getCheckDigitLth()
|
protected abstract ConstraintValidator<? extends Annotation,String> |
getConstraint()
|
protected String[] |
getInvalid()
|
String |
getMissingMessage()
|
protected abstract String[] |
getValid()
|
protected String |
getZeroSum()
|
protected String |
removeCheckDigit(String code)
Returns a code with the Check Digit (i.e. |
void |
setUp()
|
void |
tearDown()
Tear Down - clears routine and valid codes. |
void |
testIsValidFalse()
Test isValid() for invalid values. |
void |
testIsValidTrue()
Test isValid() for valid values. |
void |
testMissingCode()
Test missing code |
void |
testZeroSum()
Test zero sum |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractCheckDigitTest()
| Method Detail |
|---|
public int getCheckDigitLth()
protected abstract ConstraintValidator<? extends Annotation,String> getConstraint()
protected abstract String[] getValid()
protected String[] getInvalid()
protected String getZeroSum()
public String getMissingMessage()
public void setUp()
public void tearDown()
public void testIsValidTrue()
public void testIsValidFalse()
public void testMissingCode()
public void testZeroSum()
protected String[] createInvalidCodes(String[] codes)
codes - Codes with valid check digits
protected String removeCheckDigit(String code)
code - The code
protected String checkDigit(String code)
code - The code
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||