org.opencms.util
Class TestCmsStringUtil

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.opencms.util.TestCmsStringUtil
All Implemented Interfaces:
junit.framework.Test

public class TestCmsStringUtil
extends junit.framework.TestCase

Test cases for CmsStringUtil.


Constructor Summary
TestCmsStringUtil(String arg0)
          Default JUnit constructor.
 
Method Summary
 void testCmsContentReplacement()
          Tests content replacement during import.
 void testCombined()
          Combined tests.
 void testComplexPatternForImport()
          Tests for complext import patterns.
 void testEscapePattern()
          Tests for the escape patterns.
 void testExtractHtmlBody()
          Tests the body tag extraction.
 void testExtractXmlEncoding()
          Tests the xml encoding extraction.
 void testFormatResourceName()
          Tests for the resource name formatting.
 void testGetCommonPrefixPath()
          Test for getting the common prefix of two paths.
 void testGetRelativeSubPath()
          Test for the getRelativeSubPath utility method.
 void testLastIndexOf()
          Test case for CmsStringUtil.lastIndexOf(String, char[]) method.
 void testLine()
          Further tests.
 void testSplitCharDelimiter()
          Tests CmsStringUtil.splitAsArray(String, char).
 void testSplitStringDelimiter()
          Tests CmsStringUtil.splitAsArray(String, String).
 void testSubstitute()
          Tests the basic String substitution.
 void testTrimToSize()
          Test case for CmsStringUtil.trimToSize(String, int) method.
 void testTrimToSizeText()
          Test case for CmsStringUtil.trimToSize(String, int, int, String).
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestCmsStringUtil

public TestCmsStringUtil(String arg0)
Default JUnit constructor.

Parameters:
arg0 - JUnit parameters
Method Detail

testCmsContentReplacement

public void testCmsContentReplacement()
Tests content replacement during import.


testCombined

public void testCombined()
Combined tests.


testComplexPatternForImport

public void testComplexPatternForImport()
Tests for complext import patterns.


testEscapePattern

public void testEscapePattern()
Tests for the escape patterns.


testExtractHtmlBody

public void testExtractHtmlBody()
Tests the body tag extraction.


testExtractXmlEncoding

public void testExtractXmlEncoding()
Tests the xml encoding extraction.


testFormatResourceName

public void testFormatResourceName()
Tests for the resource name formatting.


testGetCommonPrefixPath

public void testGetCommonPrefixPath()
Test for getting the common prefix of two paths.


testGetRelativeSubPath

public void testGetRelativeSubPath()
                            throws Exception
Test for the getRelativeSubPath utility method.

Throws:
Exception

testLastIndexOf

public void testLastIndexOf()
Test case for CmsStringUtil.lastIndexOf(String, char[]) method.


testLine

public void testLine()
Further tests.


testSplitCharDelimiter

public void testSplitCharDelimiter()
Tests CmsStringUtil.splitAsArray(String, char).


testSplitStringDelimiter

public void testSplitStringDelimiter()
Tests CmsStringUtil.splitAsArray(String, String).


testSubstitute

public void testSubstitute()
Tests the basic String substitution.


testTrimToSize

public void testTrimToSize()
Test case for CmsStringUtil.trimToSize(String, int) method.


testTrimToSizeText

public void testTrimToSizeText()
Test case for CmsStringUtil.trimToSize(String, int, int, String).