org.htmlparser.tests.lexerTests
Class SourceTests

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

public class SourceTests
extends ParserTestCase


Field Summary
static java.lang.String DEFAULT_CHARSET
          The default charset.
 
Fields inherited from class org.htmlparser.tests.ParserTestCase
mLexer, node, nodeCount, parser
 
Constructor Summary
SourceTests(java.lang.String name)
          Test the first level stream class.
 
Method Summary
 void testInputStreamSourceClose()
          Test closing a InputStreamSource.
 void testInputStreamSourceEmpty()
          Test initialization of a InputStreamSource with a zero length byte array.
 void testInputStreamSourceMarkReset()
          Test mark/reset of a InputStreamSource in the middle of reading.
 void testInputStreamSourceMidReset()
          Test resetting a InputStreamSource in the middle of reading.
 void testInputStreamSourceMultByte()
          Test multi-byte read with a InputStreamSource.
 void testInputStreamSourceNull()
          Test initialization with a null value.
 void testInputStreamSourceOneByte()
          Test initialization of a InputStreamSource with an input stream having only one byte.
 void testInputStreamSourcePositionedMultByte()
          Test positioned multi-byte read with a InputStreamSource.
 void testInputStreamSourceReady()
          Test ready of a InputStreamSource.
 void testInputStreamSourceReset()
          Test resetting a InputStreamSource.
 void testInputStreamSourceSkip()
          Test skipping a InputStreamSource.
 void testSameChars()
          Test that the same characters are returned as with another reader.
 void testStringSourceClose()
          Test closing a StringSource.
 void testStringSourceEmpty()
          Test initialization of a StringSource with a zero length string.
 void testStringSourceMarkReset()
          Test mark/reset of a StringSource in the middle of reading.
 void testStringSourceMidReset()
          Test resetting a StringSource in the middle of reading.
 void testStringSourceMultByte()
          Test multi-byte read with a StringSource.
 void testStringSourceNull()
          Test initialization of a StringSource with a null value.
 void testStringSourceOneCharacter()
          Test initialization of a StringSource with a one character string.
 void testStringSourcePositionedMultByte()
          Test positioned multi-byte read with a StringSource.
 void testStringSourceReady()
          Test ready of a StringSource.
 void testStringSourceReset()
          Test resetting a StringSource.
 void testStringSourceSkip()
          Test skipping a StringSource.
 
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
 

Field Detail

DEFAULT_CHARSET

public static final java.lang.String DEFAULT_CHARSET
The default charset. This should be ISO-8859-1, see RFC 2616 (http://www.ietf.org/rfc/rfc2616.txt?number=2616) section 3.7.1 Another alias is "8859_1".

See Also:
Constant Field Values
Constructor Detail

SourceTests

public SourceTests(java.lang.String name)
Test the first level stream class.

Method Detail

testInputStreamSourceNull

public void testInputStreamSourceNull()
                               throws java.io.IOException
Test initialization with a null value.

Throws:
java.io.IOException

testInputStreamSourceEmpty

public void testInputStreamSourceEmpty()
                                throws java.io.IOException
Test initialization of a InputStreamSource with a zero length byte array.

Throws:
java.io.IOException

testInputStreamSourceOneByte

public void testInputStreamSourceOneByte()
                                  throws java.io.IOException
Test initialization of a InputStreamSource with an input stream having only one byte.

Throws:
java.io.IOException

testInputStreamSourceClose

public void testInputStreamSourceClose()
                                throws java.io.IOException
Test closing a InputStreamSource.

Throws:
java.io.IOException

testInputStreamSourceReset

public void testInputStreamSourceReset()
                                throws java.io.IOException
Test resetting a InputStreamSource.

Throws:
java.io.IOException

testInputStreamSourceMidReset

public void testInputStreamSourceMidReset()
                                   throws java.io.IOException
Test resetting a InputStreamSource in the middle of reading.

Throws:
java.io.IOException

testInputStreamSourceMarkReset

public void testInputStreamSourceMarkReset()
                                    throws java.io.IOException
Test mark/reset of a InputStreamSource in the middle of reading.

Throws:
java.io.IOException

testInputStreamSourceSkip

public void testInputStreamSourceSkip()
                               throws java.io.IOException
Test skipping a InputStreamSource.

Throws:
java.io.IOException

testInputStreamSourceMultByte

public void testInputStreamSourceMultByte()
                                   throws java.io.IOException
Test multi-byte read with a InputStreamSource.

Throws:
java.io.IOException

testInputStreamSourcePositionedMultByte

public void testInputStreamSourcePositionedMultByte()
                                             throws java.io.IOException
Test positioned multi-byte read with a InputStreamSource.

Throws:
java.io.IOException

testInputStreamSourceReady

public void testInputStreamSourceReady()
                                throws java.io.IOException
Test ready of a InputStreamSource.

Throws:
java.io.IOException

testSameChars

public void testSameChars()
                   throws java.io.IOException
Test that the same characters are returned as with another reader.

Throws:
java.io.IOException

testStringSourceNull

public void testStringSourceNull()
                          throws java.io.IOException
Test initialization of a StringSource with a null value.

Throws:
java.io.IOException

testStringSourceEmpty

public void testStringSourceEmpty()
                           throws java.io.IOException
Test initialization of a StringSource with a zero length string.

Throws:
java.io.IOException

testStringSourceOneCharacter

public void testStringSourceOneCharacter()
                                  throws java.io.IOException
Test initialization of a StringSource with a one character string.

Throws:
java.io.IOException

testStringSourceClose

public void testStringSourceClose()
                           throws java.io.IOException
Test closing a StringSource.

Throws:
java.io.IOException

testStringSourceReset

public void testStringSourceReset()
                           throws java.io.IOException
Test resetting a StringSource.

Throws:
java.io.IOException

testStringSourceMidReset

public void testStringSourceMidReset()
                              throws java.io.IOException
Test resetting a StringSource in the middle of reading.

Throws:
java.io.IOException

testStringSourceMarkReset

public void testStringSourceMarkReset()
                               throws java.io.IOException
Test mark/reset of a StringSource in the middle of reading.

Throws:
java.io.IOException

testStringSourceSkip

public void testStringSourceSkip()
                          throws java.io.IOException
Test skipping a StringSource.

Throws:
java.io.IOException

testStringSourceMultByte

public void testStringSourceMultByte()
                              throws java.io.IOException
Test multi-byte read with a StringSource.

Throws:
java.io.IOException

testStringSourcePositionedMultByte

public void testStringSourcePositionedMultByte()
                                        throws java.io.IOException
Test positioned multi-byte read with a StringSource.

Throws:
java.io.IOException

testStringSourceReady

public void testStringSourceReady()
                           throws java.io.IOException
Test ready of a StringSource.

Throws:
java.io.IOException