FileDocCategorySizeDatePackage
TestStringUtils.javaAPI DocApache Axis 1.41863Sat Apr 22 18:57:26 BST 2006test.utils

TestStringUtils

public class TestStringUtils extends TestCase

Fields Summary
Constructors Summary
public TestStringUtils(String name)

        super(name);
    
Methods Summary
public static junit.framework.Testsuite()

        return new TestSuite(TestStringUtils.class);
    
public voidtestStripEndWhite()

        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));
    
public voidtestStripStartWhite()

        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 voidtestStripWhite()

        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));