org.apache.commons.betwixt
Class TestAttributeQNameProblem

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

public class TestAttributeQNameProblem
extends AbstractTestCase

I would SAX 'start element' event's attributes always expect to have qName equal to localName for simple, unprefixed XML tags. But that seems not to be true for betwixt output and breaks my application completely.
For the debugging output to STDOUT I would expect output like:

   XML: start document event
   XML: start element qName 'test-class', localName 'test-class', URI:
        - Attribute qName 'test-prop-1', localName 'test-prop-1' of CDATA: abc
        - Attribute qName 'test-prop-2', localName 'test-prop-2' of CDATA: 12
        - Attribute qName 'id', localName 'id' of ID: 1
   XML: end element 'test-class'
   XML: end document event
 
but I get (the attributes local names differ from the qnames):
   XML: start document event
   XML: start element qName 'test-class', localName 'test-class', URI:
        - Attribute qName 'test-prop-1', localName 'testPropertyOne' of CDATA: abc
 
got only the first two lines here beacuase assertEquals fails there.

Author:
Christoph Gaffga, cgaffga@triplemind.com

Nested Class Summary
static class TestAttributeQNameProblem.StdOutContentHandler
           
 
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
TestAttributeQNameProblem(java.lang.String testName)
           
 
Method Summary
 void testAttributeOutput()
           
 
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

TestAttributeQNameProblem

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

testAttributeOutput

public void testAttributeOutput()


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