commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1713437 - /commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/ISSNValidatorTest.java
Date Mon, 09 Nov 2015 14:08:16 GMT
Author: sebb
Date: Mon Nov  9 14:08:16 2015
New Revision: 1713437

URL: http://svn.apache.org/viewvc?rev=1713437&view=rev
Log:
Additional samples

Modified:
    commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/ISSNValidatorTest.java

Modified: commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/ISSNValidatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/ISSNValidatorTest.java?rev=1713437&r1=1713436&r2=1713437&view=diff
==============================================================================
--- commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/ISSNValidatorTest.java
(original)
+++ commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/ISSNValidatorTest.java
Mon Nov  9 14:08:16 2015
@@ -45,6 +45,8 @@ public class ISSNValidatorTest extends T
             "ISSN 1911-1460",
             "0001-6772",
             "1365-201X",
+            "0264-3596",
+            "1144-875X",
             };
 
     private final String[] invalidFormat = new String[] {
@@ -148,6 +150,10 @@ public class ISSNValidatorTest extends T
             String ean13 = VALIDATOR.convertToEAN13(f, suffix);
             assertTrue(ean13, ean13cd.isValid(ean13));
         }
+        // internet samples
+        assertEquals("9771144875007", VALIDATOR.convertToEAN13("1144-875X", "00"));
+        assertEquals("9770264359008", VALIDATOR.convertToEAN13("0264-3596", "00"));
+        assertEquals("9771234567003", VALIDATOR.convertToEAN13("1234-5679", "00"));
     }
 
 }



Mime
View raw message