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
protected  InputStream getXmlStream(String bomType, String xmlType, String streamEnc, String prologEnc)
           
static void main(String[] args)
           
 void testAlternateDefaultEncoding(String cT, String bomEnc, String streamEnc, String prologEnc, String alternateEnc)
           
 void testEncodingAttributeXML()
           
 void testHttp()
           
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)
           
 void testRawBom()
           
protected  void testRawBomInvalid(String bomEnc, String streamEnc, String prologEnc)
           
protected  void testRawBomValid(String encoding)
           
 void testRawNoBom()
           
protected  void testRawNoBomInvalid(String encoding)
           
protected  void testRawNoBomValid(String encoding)
           
 
Methods inherited from class junit.framework.TestCase
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
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.