Testsuite: org.simpleframework.xml.core.UnionConstructorInjectionTest
Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.137 sec
------------- Standard Output ---------------
<example age="20">
   <login>john.doe</login>
   <password>password123</password>
</example><example age="20">
   <login>john.doe</login>
   <password>password123</password>
</example>
<example ID="0" age="20">
   <!-- java.lang.String -->
   <login ID="1">john.doe</login>
   <!-- java.lang.String -->
   <password ID="2">password123</password>
</example>>>>>> ELEMENT=[element example]
>>>>> TYPE=[class org.simpleframework.xml.core.UnionConstructorInjectionTest$Example]
>>>>> SOURCE=[class com.sun.xml.internal.stream.events.StartElementEvent]
<Example ID="0" age="20">
   <!-- java.lang.String -->
   <Login ID="1">john.doe</Login>
   <!-- java.lang.String -->
   <Password ID="2">password123</Password>
</Example>>>>>> ELEMENT=[element Example]
>>>>> TYPE=[class org.simpleframework.xml.core.UnionConstructorInjectionTest$Example]
>>>>> SOURCE=[class com.sun.xml.internal.stream.events.StartElementEvent]
------------- ---------------- ---------------
------------- Standard Error -----------------
org.simpleframework.xml.core.ConstructorException: Type is not compatible with @org.simpleframework.xml.ElementUnion(value=[@org.simpleframework.xml.Element(name=login, data=false, required=true, type=void), @org.simpleframework.xml.Element(name=account, data=false, required=true, type=void), @org.simpleframework.xml.Element(name=username, data=false, required=true, type=void), @org.simpleframework.xml.Element(name=id, data=false, required=true, type=void), @org.simpleframework.xml.Element(name=name, data=false, required=true, type=void)]) on field 'name' private java.lang.String org.simpleframework.xml.core.UnionConstructorInjectionTest$InvalidExample.name for 'id' in parameter 0 of constructor public org.simpleframework.xml.core.UnionConstructorInjectionTest$InvalidExample(int)
	at org.simpleframework.xml.core.InstantiatorBuilder.validateParameter(InstantiatorBuilder.java:271)
	at org.simpleframework.xml.core.InstantiatorBuilder.validate(InstantiatorBuilder.java:251)
	at org.simpleframework.xml.core.InstantiatorBuilder.build(InstantiatorBuilder.java:114)
	at org.simpleframework.xml.core.StructureBuilder.commit(StructureBuilder.java:483)
	at org.simpleframework.xml.core.ObjectScanner.validate(ObjectScanner.java:418)
	at org.simpleframework.xml.core.ObjectScanner.scan(ObjectScanner.java:373)
	at org.simpleframework.xml.core.ObjectScanner.<init>(ObjectScanner.java:82)
	at org.simpleframework.xml.core.ScannerFactory.getInstance(ScannerFactory.java:81)
	at org.simpleframework.xml.core.Support.getScanner(Support.java:357)
	at org.simpleframework.xml.core.Support.getName(Support.java:419)
	at org.simpleframework.xml.core.Source.getName(Source.java:240)
	at org.simpleframework.xml.core.Traverser.getName(Traverser.java:284)
	at org.simpleframework.xml.core.Traverser.write(Traverser.java:203)
	at org.simpleframework.xml.core.Traverser.write(Traverser.java:186)
	at org.simpleframework.xml.core.Persister.write(Persister.java:1180)
	at org.simpleframework.xml.core.Persister.write(Persister.java:1162)
	at org.simpleframework.xml.core.Persister.write(Persister.java:1140)
	at org.simpleframework.xml.core.Persister.write(Persister.java:1259)
	at org.simpleframework.xml.core.UnionConstructorInjectionTest.testInvalidConstructorInjection(UnionConstructorInjectionTest.java:120)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at junit.framework.TestCase.runTest(TestCase.java:154)
	at junit.framework.TestCase.runBare(TestCase.java:127)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:518)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1052)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:906)
org.simpleframework.xml.core.ConstructorException: Parameter 'id' does not have a match in class org.simpleframework.xml.core.UnionConstructorInjectionTest$InvalidAnnotationExample
	at org.simpleframework.xml.core.InstantiatorBuilder.validate(InstantiatorBuilder.java:249)
	at org.simpleframework.xml.core.InstantiatorBuilder.build(InstantiatorBuilder.java:114)
	at org.simpleframework.xml.core.StructureBuilder.commit(StructureBuilder.java:483)
	at org.simpleframework.xml.core.ObjectScanner.validate(ObjectScanner.java:418)
	at org.simpleframework.xml.core.ObjectScanner.scan(ObjectScanner.java:373)
	at org.simpleframework.xml.core.ObjectScanner.<init>(ObjectScanner.java:82)
	at org.simpleframework.xml.core.ScannerFactory.getInstance(ScannerFactory.java:81)
	at org.simpleframework.xml.core.Support.getScanner(Support.java:357)
	at org.simpleframework.xml.core.Support.getName(Support.java:419)
	at org.simpleframework.xml.core.Source.getName(Source.java:240)
	at org.simpleframework.xml.core.Traverser.getName(Traverser.java:284)
	at org.simpleframework.xml.core.Traverser.write(Traverser.java:203)
	at org.simpleframework.xml.core.Traverser.write(Traverser.java:186)
	at org.simpleframework.xml.core.Persister.write(Persister.java:1180)
	at org.simpleframework.xml.core.Persister.write(Persister.java:1162)
	at org.simpleframework.xml.core.Persister.write(Persister.java:1140)
	at org.simpleframework.xml.core.Persister.write(Persister.java:1259)
	at org.simpleframework.xml.core.UnionConstructorInjectionTest.testInvalidAnnotationConstructorInjection(UnionConstructorInjectionTest.java:134)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at junit.framework.TestCase.runTest(TestCase.java:154)
	at junit.framework.TestCase.runBare(TestCase.java:127)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:518)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1052)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:906)
------------- ---------------- ---------------

Testcase: testConstructorInjection took 0.126 sec
Testcase: testInvalidConstructorInjection took 0.004 sec
Testcase: testInvalidAnnotationConstructorInjection took 0.005 sec
Testcase: testDirectory took 0 sec
