Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
Description
The check digit unit tests are all based on the abstract class AbstractCheckDigitTest which performs various common checks based on the contents of the "valid" and "invalid" arrays.
The entries in the "invalid" array are checked by calling isValid() and also by calling calculate(). However the test assumes that the calculate() method will throw an exception. This means that the "invalid" array can only be used to test entries that have invalid characters etc, not entries which have a valid format but invalid check-digits.
Should probably introduce a new array which allows bad check-digits to be calculated independently
Attachments
Issue Links
- duplicates
-
VALIDATOR-344 AbstractCheckDigit class does not fully test invalid strings
- Closed
- relates to
-
VALIDATOR-344 AbstractCheckDigit class does not fully test invalid strings
- Closed