You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Benedikt Ritter (JIRA)" <ji...@apache.org> on 2015/01/13 21:02:38 UTC

[jira] [Closed] (VALIDATOR-329) Checkdigit unit tests don't allow for invalid check digit checking

     [ https://issues.apache.org/jira/browse/VALIDATOR-329?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benedikt Ritter closed VALIDATOR-329.
-------------------------------------

> 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
>             Fix For: 1.4.1 Release
>
>
> 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.3.4#6332)