org.htmlparser.tests.utilTests
Class BeanTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.htmlparser.tests.ParserTestCase
              extended byorg.htmlparser.tests.utilTests.BeanTest
All Implemented Interfaces:
junit.framework.Test

public class BeanTest
extends ParserTestCase


Field Summary
 
Fields inherited from class org.htmlparser.tests.ParserTestCase
mLexer, node, nodeCount, parser
 
Constructor Summary
BeanTest(java.lang.String name)
           
 
Method Summary
protected  void check(StringBean bean, java.lang.String html, java.lang.String text)
          Makes sure that the bean returns text when passed the html.
protected  byte[] pickle(java.lang.Object object)
           
 void testCollapsed1()
          Test no text returns empty string.
 void testCollapsed2()
          Test multiple whitespace returns empty string.
 void testCollapsed3()
          Test text preceded or followed by whitespace returns just text.
 void testLinkBeanListener()
           
 void testOutputWithoutPreAndAnyTagPlusTextWithWhitespace()
           
 void testOutputWithPreAndAnyTag()
           
 void testOutputWithPreAndAnyTagPlusText()
           
 void testOutputWithPreAndAnyTagPlusTextWithWhitespace()
           
 void testOutputWithPreTags()
          Test text including a "pre" tag
 void testOutputWithScriptTags()
          Test text including a "script" tag
 void testSerializable()
           
 void testSerializableLinkBean()
           
 void testSerializableScanners()
           
 void testSerializableStringBean()
           
 void testStringBeanListener()
           
 void testZeroArgLexerConstructor()
           
 void testZeroArgPageConstructor()
           
 void testZeroArgParserConstructor()
           
protected  java.lang.Object unpickle(byte[] data)
           
 void xtestOutputWithPreAndScriptTags()
          Test output with pre and script tags
 
Methods inherited from class org.htmlparser.tests.ParserTestCase
assertHiddenIDTagPresent, assertNodeCount, assertNodeCount, assertSameType, assertStringEquals, assertSuperType, assertTagEquals, assertType, assertXmlEquals, createParser, createParser, createParser, createParser, failWithMessage, getParser, main, parse, parseAndAssertNodeCount, parseNodes, removeEscapeCharacters, setParser
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, 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

BeanTest

public BeanTest(java.lang.String name)
Method Detail

pickle

protected byte[] pickle(java.lang.Object object)
                 throws java.io.IOException
Throws:
java.io.IOException

unpickle

protected java.lang.Object unpickle(byte[] data)
                             throws java.io.IOException,
                                    java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException

check

protected void check(StringBean bean,
                     java.lang.String html,
                     java.lang.String text)
Makes sure that the bean returns text when passed the html.


testZeroArgPageConstructor

public void testZeroArgPageConstructor()
                                throws java.io.IOException,
                                       java.lang.ClassNotFoundException,
                                       ParserException
Throws:
java.io.IOException
java.lang.ClassNotFoundException
ParserException

testZeroArgLexerConstructor

public void testZeroArgLexerConstructor()
                                 throws java.io.IOException,
                                        java.lang.ClassNotFoundException,
                                        ParserException
Throws:
java.io.IOException
java.lang.ClassNotFoundException
ParserException

testZeroArgParserConstructor

public void testZeroArgParserConstructor()
                                  throws java.io.IOException,
                                         java.lang.ClassNotFoundException,
                                         ParserException
Throws:
java.io.IOException
java.lang.ClassNotFoundException
ParserException

testSerializable

public void testSerializable()
                      throws java.io.IOException,
                             java.lang.ClassNotFoundException,
                             ParserException
Throws:
java.io.IOException
java.lang.ClassNotFoundException
ParserException

testSerializableScanners

public void testSerializableScanners()
                              throws java.io.IOException,
                                     java.lang.ClassNotFoundException,
                                     ParserException
Throws:
java.io.IOException
java.lang.ClassNotFoundException
ParserException

testSerializableStringBean

public void testSerializableStringBean()
                                throws java.io.IOException,
                                       java.lang.ClassNotFoundException,
                                       ParserException
Throws:
java.io.IOException
java.lang.ClassNotFoundException
ParserException

testSerializableLinkBean

public void testSerializableLinkBean()
                              throws java.io.IOException,
                                     java.lang.ClassNotFoundException,
                                     ParserException
Throws:
java.io.IOException
java.lang.ClassNotFoundException
ParserException

testStringBeanListener

public void testStringBeanListener()

testLinkBeanListener

public void testLinkBeanListener()

testCollapsed1

public void testCollapsed1()
Test no text returns empty string.


testCollapsed2

public void testCollapsed2()
Test multiple whitespace returns empty string.


testCollapsed3

public void testCollapsed3()
Test text preceded or followed by whitespace returns just text.


testOutputWithPreTags

public void testOutputWithPreTags()
Test text including a "pre" tag


testOutputWithScriptTags

public void testOutputWithScriptTags()
Test text including a "script" tag


testOutputWithPreAndAnyTag

public void testOutputWithPreAndAnyTag()

testOutputWithPreAndAnyTagPlusText

public void testOutputWithPreAndAnyTagPlusText()

testOutputWithPreAndAnyTagPlusTextWithWhitespace

public void testOutputWithPreAndAnyTagPlusTextWithWhitespace()

testOutputWithoutPreAndAnyTagPlusTextWithWhitespace

public void testOutputWithoutPreAndAnyTagPlusTextWithWhitespace()

xtestOutputWithPreAndScriptTags

public void xtestOutputWithPreAndScriptTags()
Test output with pre and script tags