org.opencms.util
Class TestCmsHtmlStripper

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

public class TestCmsHtmlStripper
extends junit.framework.TestCase

Test case for CmsHtmlStripper.

Since:
6.9.2

Constructor Summary
TestCmsHtmlStripper(String arg0)
          Default JUnit constructor.
 
Method Summary
 void testStripHtml()
          Tests CmsHtmlStripper.stripHtml(String) with a configuration that only keeps: "b,p,strong,i".
 void testStripHtmlBypass()
          Tests CmsHtmlStripper.stripHtml(String) with all HTML tags of test files as preserve tags (manual bypass-mode).
 void testStripHtmlNewline()
          Tests CmsHtmlStripper.stripHtml(String) if it strips newline separators.
 
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

TestCmsHtmlStripper

public TestCmsHtmlStripper(String arg0)
Default JUnit constructor.

Parameters:
arg0 - JUnit parameters
Method Detail

testStripHtml

public void testStripHtml()
                   throws Exception
Tests CmsHtmlStripper.stripHtml(String) with a configuration that only keeps: "b,p,strong,i".

Throws:
Exception - in case the test fails

testStripHtmlBypass

public void testStripHtmlBypass()
                         throws Exception
Tests CmsHtmlStripper.stripHtml(String) with all HTML tags of test files as preserve tags (manual bypass-mode).

Throws:
Exception - in case the test fails

testStripHtmlNewline

public void testStripHtmlNewline()
                          throws Exception
Tests CmsHtmlStripper.stripHtml(String) if it strips newline separators.

Throws:
Exception - in case the test fails