Issue Details (XML | Word | Printable)

Key: CASTOR-2384
Type: New Feature New Feature
Status: Open Open
Priority: Minor Minor
Assignee: Werner Guttmann
Reporter: Le Duc Bao
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
castor

XML Schema test creation

Created: 14/May/08 01:33 PM   Updated: 26/Sep/08 03:27 PM  Due: 14/May/08
Component/s: XML tests
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. Text File patch.c2384.20080523.txt (9 kB)
2. Text File patch.c2384.20080527.txt (59 kB)
3. Text File patch_xmlschema_test_20080513.txt (26 kB)

Issue Links:
dependent
 

Patch Submitted: Yes


 Description  « Hide

I've created some code for XML Schema test. Please see the attached patch.



Werner Guttmann added a comment - 20/May/08 03:25 PM

Good stuff, Bao. Just a few random observations and comments:

a) Please drop these section delimiter stuff from all source files ... . This is Java, and with a decent editor (such as Eclipse), there's no need to have //---------

b) I think we'll need test code that checks for errors as well, i.e. where a condition is not met. What do you think about adding some more (abstract) test case classes that make it really easy to write such a failing test case.

Other than that, I think we can go ahead and commit this patch; all future changes will be (once again) based against SVN trunk.


Le Duc Bao added a comment - 21/May/08 04:11 PM

Hi Werner,

Please let me know when you commit this patch to svn. Please noted that I don't have permission to do commit in both castor and castor-jaxb-2.0 projects.

Thank you,
Bao


Werner Guttmann added a comment - 23/May/08 05:02 AM

Updated patch, with the following changes:

  • Removed TestAll.java (as JUnit is capable to auto-detect test cases).
  • Removed all '/-----------' comments
  • Removed all static suite() methods 8as per my comment above).

Here's what I'd like to see changed before committing this patch.

a) Please switch to a more java-style way of dealing with results of XMLDiff. Returning an integer result somehow seems odd to me. Maybe switching towards an AssertionfailedException and/or the use of an enumeration would make sense. You might want to have a look at the test suite Joachim has implemented for the JAXB 2.0 code.


Le Duc Bao added a comment - 26/Sep/08 03:14 PM

Hello Werner,

Could you please update dependencies for castor-xml-schema in order to run tests. It depends on castor-testsuite-xml-framework.

thanks,
Bao


Werner Guttmann added a comment - 26/Sep/08 03:21 PM

Sorry, I am not 100% sure where you want my help ?


Le Duc Bao added a comment - 26/Sep/08 03:27 PM

the patch attached to this (http://jira.codehaus.org/secure/attachment/34793/patch.c2384.20080527.txt) requires org.castor.xmlctf.xmldiff.XMLDiff. I couldn't manage to run it