Uploaded image for project: 'Commons Validator'
  1. Commons Validator
  2. VALIDATOR-329

Checkdigit unit tests don't allow for invalid check digit checking

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • 1.4.1 Release
    • 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

          Activity

            People

              Unassigned Unassigned
              sebb Sebb
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: