[ 
https://issues.apache.org/jira/browse/TEXT-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16050978#comment-16050978
 ] 

ASF GitHub Bot commented on TEXT-90:
------------------------------------

Github user PascalSchumacher commented on a diff in the pull request:

    https://github.com/apache/commons-text/pull/50#discussion_r122292528
  
    --- Diff: 
src/test/java/org/apache/commons/text/CharacterPredicatesTest.java ---
    @@ -44,4 +44,77 @@ public void testDigits() {
             assertFalse(CharacterPredicates.DIGITS.test('.'));
             assertFalse(CharacterPredicates.DIGITS.test('L'));
         }
    +
    +    @Test
    +    public void testArabicNumerals() {
    --- End diff --
    
    I personally do not like junit parametrized tests because every test method 
has to be in its own class and you have to a lot of boiler plate. For 
parametrized test I use https://github.com/TNG/junit-dataprovider
    
    Theories can be nice for testing methods with multiple parameters, although 
in my opinion well chosen parameter combinations are often enough. I think 
theories are a bit lacking compared to "real" property based testing like 
quick-check (no test data generation, no failure shrinking). For java 
https://github.com/pholser/junit-quickcheck is the best option I'm aware of, 
but it has been requiring java 8 for years.


> Add CharacterPredicates for ASCII letters (uppercase/lowercase) and arabic 
> numerals
> -----------------------------------------------------------------------------------
>
>                 Key: TEXT-90
>                 URL: https://issues.apache.org/jira/browse/TEXT-90
>             Project: Commons Text
>          Issue Type: New Feature
>            Reporter: Pascal Schumacher
>            Assignee: Pascal Schumacher
>             Fix For: 1.2
>
>
> I tried to migrate a project from RandomStringUtils to RandomStringGenerator 
> today, but I found it hard to replace methods like 
> RandomStringUtils#randomAlphanumeric and RandomStringUtils#randomAlphabetic.
> I believe it would ease migration from RandomStringUtils to 
> RandomStringGenerator if CharacterPrecidates would offer more predicates.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to