commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject cvs commit: jakarta-commons/lang/src/test/org/apache/commons/lang StringUtilsTrimEmptyTest.java
Date Mon, 14 Jul 2003 22:26:22 GMT
scolebourne    2003/07/14 15:26:22

  Modified:    lang/src/test/org/apache/commons/lang
                        StringUtilsTrimEmptyTest.java
  Log:
  Add and rework isEmpty, isNotEmpty, isEmptyTrimmed, isNotEmptyTrimmed
  
  Revision  Changes    Path
  1.8       +25 -7     jakarta-commons/lang/src/test/org/apache/commons/lang/StringUtilsTrimEmptyTest.java
  
  Index: StringUtilsTrimEmptyTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/test/org/apache/commons/lang/StringUtilsTrimEmptyTest.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- StringUtilsTrimEmptyTest.java	24 Mar 2003 00:47:02 -0000	1.7
  +++ StringUtilsTrimEmptyTest.java	14 Jul 2003 22:26:22 -0000	1.8
  @@ -132,18 +132,36 @@
           assertEquals("", StringUtils.trimToEmpty(null));
       }
   
  +    public void testIsEmpty() {
  +        assertEquals(false, StringUtils.isEmpty("foo"));
  +        assertEquals(false, StringUtils.isEmpty("  foo  "));
  +        assertEquals(false, StringUtils.isEmpty(" "));
  +        assertEquals(true, StringUtils.isEmpty(""));
  +        assertEquals(true, StringUtils.isEmpty(null));
  +    }
  +
       public void testIsNotEmpty() {
  -        assertEquals(true, StringUtils.isNotEmpty(FOO));
  +        assertEquals(true, StringUtils.isNotEmpty("foo"));
  +        assertEquals(true, StringUtils.isNotEmpty("  foo  "));
           assertEquals(true, StringUtils.isNotEmpty(" "));
           assertEquals(false, StringUtils.isNotEmpty(""));
           assertEquals(false, StringUtils.isNotEmpty(null));
       }
   
  -    public void testIsEmpty() {
  -        assertEquals(false, StringUtils.isEmpty(FOO));
  -        assertEquals(true, StringUtils.isEmpty(" "));
  -        assertEquals(true, StringUtils.isEmpty(""));
  -        assertEquals(true, StringUtils.isEmpty(null));
  +    public void testIsEmptyTrimmed() {
  +        assertEquals(false, StringUtils.isEmptyTrimmed("foo"));
  +        assertEquals(false, StringUtils.isEmptyTrimmed("  foo  "));
  +        assertEquals(true, StringUtils.isEmptyTrimmed(" "));
  +        assertEquals(true, StringUtils.isEmptyTrimmed(""));
  +        assertEquals(true, StringUtils.isEmptyTrimmed(null));
  +    }
  +
  +    public void testIsNotEmptyTrimmed() {
  +        assertEquals(true, StringUtils.isNotEmptyTrimmed("foo"));
  +        assertEquals(true, StringUtils.isNotEmptyTrimmed("  foo  "));
  +        assertEquals(false, StringUtils.isNotEmptyTrimmed(" "));
  +        assertEquals(false, StringUtils.isNotEmptyTrimmed(""));
  +        assertEquals(false, StringUtils.isNotEmptyTrimmed(null));
       }
   
       public void testDeleteSpace() {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message