com.sun.syndication.unittest
Class TestXmlReader

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.sun.syndication.unittest.TestXmlReader
All Implemented Interfaces:
junit.framework.Test

public class TestXmlReader
extends junit.framework.TestCase

Author:
pat, tucu

Constructor Summary
TestXmlReader()
           
 
Method Summary
 void _testAlternateDefaultEncoding(String cT, String bomEnc, String streamEnc, String prologEnc, String alternateEnc)
           
protected  void _testHttpInvalid(String cT, String bomEnc, String streamEnc, String prologEnc)
           
protected  void _testHttpLenient(String cT, String bomEnc, String streamEnc, String prologEnc, String shouldbe)
           
 void _testHttpValid(String cT, String bomEnc, String streamEnc, String prologEnc)
           
protected  void _testRawBomInvalid(String bomEnc, String streamEnc, String prologEnc)
           
protected  void _testRawBomValid(String encoding)
           
protected  void _testRawNoBomInvalid(String encoding)
           
protected  void _testRawNoBomValid(String encoding)
           
protected  InputStream getXmlStream(String bomType, String xmlType, String streamEnc, String prologEnc)
           
static void main(String[] args)
           
 void testEncodingAttributeXML()
           
 void testHttp()
           
 void testRawBom()
           
 void testRawNoBom()
           
 
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

TestXmlReader

public TestXmlReader()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

_testRawNoBomValid

protected void _testRawNoBomValid(String encoding)
                           throws Exception
Throws:
Exception

_testRawNoBomInvalid

protected void _testRawNoBomInvalid(String encoding)
                             throws Exception
Throws:
Exception

testRawNoBom

public void testRawNoBom()
                  throws Exception
Throws:
Exception

_testRawBomValid

protected void _testRawBomValid(String encoding)
                         throws Exception
Throws:
Exception

_testRawBomInvalid

protected void _testRawBomInvalid(String bomEnc,
                                  String streamEnc,
                                  String prologEnc)
                           throws Exception
Throws:
Exception

testRawBom

public void testRawBom()
                throws Exception
Throws:
Exception

testHttp

public void testHttp()
              throws Exception
Throws:
Exception

_testAlternateDefaultEncoding

public void _testAlternateDefaultEncoding(String cT,
                                          String bomEnc,
                                          String streamEnc,
                                          String prologEnc,
                                          String alternateEnc)
                                   throws Exception
Throws:
Exception

_testHttpValid

public void _testHttpValid(String cT,
                           String bomEnc,
                           String streamEnc,
                           String prologEnc)
                    throws Exception
Throws:
Exception

_testHttpInvalid

protected void _testHttpInvalid(String cT,
                                String bomEnc,
                                String streamEnc,
                                String prologEnc)
                         throws Exception
Throws:
Exception

_testHttpLenient

protected void _testHttpLenient(String cT,
                                String bomEnc,
                                String streamEnc,
                                String prologEnc,
                                String shouldbe)
                         throws Exception
Throws:
Exception

testEncodingAttributeXML

public void testEncodingAttributeXML()
                              throws Exception
Throws:
Exception

getXmlStream

protected InputStream getXmlStream(String bomType,
                                   String xmlType,
                                   String streamEnc,
                                   String prologEnc)
                            throws IOException
Parameters:
bomType - no-bom, UTF-16BE-bom, UTF-16LE-bom, UTF-8-bom
xmlType - xml, xml-prolog, xml-prolog-charset
Returns:
XML stream
Throws:
IOException


Copyright © 2004-2013 ROME Project. All Rights Reserved.