org.apache.commons.betwixt.schema
Class TestSchema

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.schema.TestSchema
All Implemented Interfaces:
junit.framework.Test

public class TestSchema
extends AbstractTestCase

This will test betwixt on handling a different kind of xml file, without a "collection" tag.

Version:
$Id: TestSchema.java 438373 2006-08-30 05:17:21Z bayard $
Author:
Martin van den Bemt

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
TestSchema(java.lang.String testName)
           
 
Method Summary
protected  org.apache.commons.betwixt.io.BeanReader createBeanReader()
          Creates a beanReader
protected  org.apache.commons.betwixt.XMLIntrospector createXMLIntrospector()
          Set up the XMLIntroSpector
static junit.framework.Test suite()
           
 void testCombinedRoundTrip()
          Test the roundtrip with an xml file that doesn't have collection elements, writes it with collection elements and then compares the 2 object, which should end up equal..
 void testRoundTripWithoutCollectionElement()
          Tests we can round trip from the XML -> bean -> XML -> 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

TestSchema

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

suite

public static junit.framework.Test suite()

testCombinedRoundTrip

public void testCombinedRoundTrip()
                           throws java.lang.Exception
Test the roundtrip with an xml file that doesn't have collection elements, writes it with collection elements and then compares the 2 object, which should end up equal..

Throws:
java.lang.Exception

testRoundTripWithoutCollectionElement

public void testRoundTripWithoutCollectionElement()
                                           throws java.lang.Exception
Tests we can round trip from the XML -> bean -> XML -> bean. It will test if both object are identical. For this to actually work I implemented a details equals in my Beans..

Throws:
java.lang.Exception

createBeanReader

protected org.apache.commons.betwixt.io.BeanReader createBeanReader()
                                                             throws java.lang.Exception
Creates a beanReader

Throws:
java.lang.Exception

createXMLIntrospector

protected org.apache.commons.betwixt.XMLIntrospector createXMLIntrospector()
Set up the XMLIntroSpector



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