axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject cvs commit: ws-axis/java/test/utils TestStringUtils.java PackageTests.java
Date Sun, 14 Nov 2004 05:04:20 GMT
gawor       2004/11/13 21:04:20

  Modified:    java/test/utils PackageTests.java
  Added:       java/test/utils TestStringUtils.java
  Log:
  StringUtils test
  
  Revision  Changes    Path
  1.12      +1 -1      ws-axis/java/test/utils/PackageTests.java
  
  Index: PackageTests.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/test/utils/PackageTests.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- PackageTests.java	31 Dec 2002 04:54:02 -0000	1.11
  +++ PackageTests.java	14 Nov 2004 05:04:20 -0000	1.12
  @@ -22,7 +22,7 @@
           suite.addTest(TestXMLUtils.suite());
           suite.addTest(TestMessages.suite());
           suite.addTest(TestSrcContent.suite());
  -
  +        suite.addTest(TestStringUtils.suite());
           return suite;
       }
   }
  
  
  
  1.1                  ws-axis/java/test/utils/TestStringUtils.java
  
  Index: TestStringUtils.java
  ===================================================================
  package test.utils;
  
  import junit.framework.Test;
  import junit.framework.TestCase;
  import junit.framework.TestSuite;
  
  import org.apache.axis.utils.StringUtils;
  
  public class TestStringUtils extends TestCase
  {
  
      public TestStringUtils (String name) {
          super(name);
      }
  
      public static Test suite() {
          return new TestSuite(TestStringUtils.class);
      }
  
      public void testStripWhite() {
          assertEquals(null, StringUtils.strip(null, null));
          assertEquals("", StringUtils.strip("", null));
          assertEquals("", StringUtils.strip(" \r\n  ", null));   
          assertEquals("abc", StringUtils.strip("abc", null));
          assertEquals("abc", StringUtils.strip("  abc", null));
          assertEquals("abc", StringUtils.strip("abc  ", null));
          assertEquals("abc", StringUtils.strip(" abc ", null));
      }
  
      public void testStripStartWhite() {
          assertEquals(null, StringUtils.stripStart(null, null));
          assertEquals("", StringUtils.stripStart("", null));
          assertEquals("", StringUtils.stripStart(" \r\n  ", null));   
          assertEquals("abc", StringUtils.stripStart("abc", null));
          assertEquals("abc", StringUtils.stripStart("  abc", null));
          assertEquals("abc  ", StringUtils.stripStart("abc  ", null));
          assertEquals("abc ", StringUtils.stripStart(" abc ", null));
      }
  
      public void testStripEndWhite() {
          assertEquals(null, StringUtils.stripEnd(null, null));
          assertEquals("", StringUtils.stripEnd("", null));
          assertEquals("", StringUtils.stripEnd(" \r\n  ", null));   
          assertEquals("abc", StringUtils.stripEnd("abc", null));
          assertEquals("  abc", StringUtils.stripEnd("  abc", null));
          assertEquals("abc", StringUtils.stripEnd("abc  ", null));
          assertEquals(" abc", StringUtils.stripEnd(" abc ", null));
      }
      
  }
  
  
  

Mime
View raw message