commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Created] (VALIDATOR-329) Checkdigit unit tests don't allow for invalid check digit checking
Date Fri, 24 Jan 2014 12:58:38 GMT
Sebb created VALIDATOR-329:
------------------------------

             Summary: Checkdigit unit tests don't allow for invalid check digit checking
                 Key: VALIDATOR-329
                 URL: https://issues.apache.org/jira/browse/VALIDATOR-329
             Project: Commons Validator
          Issue Type: Bug
            Reporter: Sebb


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



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message