org.apache.commons.betwixt
Class TestBeanReader

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.betwixt.xmlunit.XmlTestCase
              extended by org.apache.commons.betwixt.AbstractTestCase
                  extended by org.apache.commons.betwixt.TestBeanReader
All Implemented Interfaces:
junit.framework.Test

public class TestBeanReader
extends AbstractTestCase

Test harness for the BeanReader

Version:
$Revision: 438373 $
Author:
James Strachan

Field Summary
 
Fields inherited from class org.apache.commons.betwixt.AbstractTestCase
basedir
 
Fields inherited from class org.apache.commons.betwixt.xmlunit.XmlTestCase
debug
 
Constructor Summary
TestBeanReader(java.lang.String testName)
           
 
Method Summary
 void _testDoubleLinkedCollectionRead()
           
 java.lang.Class getBeanClass()
           
protected  java.io.InputStream getXMLInput()
           
static void main(java.lang.String[] args)
           
static junit.framework.Test suite()
           
 void testAdderButNoProperty()
          This tests that you can read a bean which has an adder but not a property
 void testBeanWriter()
           
 void testCustomDateReadConversion()
           
protected  void testCustomer(java.lang.Object bean)
          Asserts that the parsed CustomerBean looks fine
 void testDateReadConversion()
           
 void testHyphenatedNameMapping()
           
 void testIndirectReference()
           
 void testPersonList()
           
 void testReadMap()
           
 void testReadMap2()
           
 void testSetDigesterRules()
           
 void testWrapElements()
          Another test for reading wrapped collections
 void testWriteThenRead()
           
 java.lang.String writeBean(java.lang.Object bean)
           
 
Methods inherited from class org.apache.commons.betwixt.AbstractTestCase
createBean, getTestFile, getTestFileURL
 
Methods inherited from class org.apache.commons.betwixt.xmlunit.XmlTestCase
createDocumentBuilder, getDomFactory, isValid, parseFile, parseString, parseString, validateWithSchema, xmlAssertIsomorphic, xmlAssertIsomorphic, xmlAssertIsomorphic, xmlAssertIsomorphic, xmlAssertIsomorphicContent, xmlAssertIsomorphicContent, xmlAssertIsomorphicContent, xmlAssertIsomorphicContent, xmlAssertIsValid, xmlAssertIsValid
 
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

TestBeanReader

public TestBeanReader(java.lang.String testName)
Method Detail

main

public static void main(java.lang.String[] args)

suite

public static junit.framework.Test suite()

testBeanWriter

public void testBeanWriter()
                    throws java.lang.Exception
Throws:
java.lang.Exception

testWriteThenRead

public void testWriteThenRead()
                       throws java.lang.Exception
Throws:
java.lang.Exception

writeBean

public java.lang.String writeBean(java.lang.Object bean)
                           throws java.lang.Exception
Throws:
java.lang.Exception

getBeanClass

public java.lang.Class getBeanClass()
Returns:
the bean class to use as the root

testCustomer

protected void testCustomer(java.lang.Object bean)
                     throws java.lang.Exception
Asserts that the parsed CustomerBean looks fine

Throws:
java.lang.Exception

getXMLInput

protected java.io.InputStream getXMLInput()
                                   throws java.io.IOException
Throws:
java.io.IOException

testAdderButNoProperty

public void testAdderButNoProperty()
                            throws java.lang.Exception
This tests that you can read a bean which has an adder but not a property

Throws:
java.lang.Exception

testPersonList

public void testPersonList()
                    throws java.lang.Exception
Throws:
java.lang.Exception

testWrapElements

public void testWrapElements()
                      throws java.lang.Exception
Another test for reading wrapped collections

Throws:
java.lang.Exception

testSetDigesterRules

public void testSetDigesterRules()
                          throws java.lang.Exception
Throws:
java.lang.Exception

testDateReadConversion

public void testDateReadConversion()
                            throws java.lang.Exception
Throws:
java.lang.Exception

testHyphenatedNameMapping

public void testHyphenatedNameMapping()
                               throws java.lang.Exception
Throws:
java.lang.Exception

testCustomDateReadConversion

public void testCustomDateReadConversion()
                                  throws java.lang.Exception
Throws:
java.lang.Exception

testReadMap

public void testReadMap()
                 throws java.lang.Exception
Throws:
java.lang.Exception

testReadMap2

public void testReadMap2()
                  throws java.lang.Exception
Throws:
java.lang.Exception

testIndirectReference

public void testIndirectReference()
                           throws java.lang.Exception
Throws:
java.lang.Exception

_testDoubleLinkedCollectionRead

public void _testDoubleLinkedCollectionRead()
                                     throws java.lang.Exception
Throws:
java.lang.Exception


Copyright 2002-2008 The Apache Software Foundation. All Rights Reserved.