castor

XML Schema test creation

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.3.2
  • Component/s: XML tests
  • Labels:
    None
  • Patch Submitted:
    Yes
  • Number of attachments :
    3

Description

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

  1. patch_xmlschema_test_20080513.txt
    14/May/08 1:33 PM
    26 kB
    Le Duc Bao
  2. patch.c2384.20080523.txt
    23/May/08 5:02 AM
    9 kB
    Werner Guttmann
  3. patch.c2384.20080527.txt
    27/May/08 4:33 PM
    59 kB
    Le Duc Bao

Issue Links

Activity

Hide
Werner Guttmann added a comment -

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.

Show
Werner Guttmann added a comment - 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.
Hide
Le Duc Bao added a comment -

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

Show
Le Duc Bao added a comment - 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
Hide
Werner Guttmann added a comment -

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.

Show
Werner Guttmann added a comment - 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.
Hide
Le Duc Bao added a comment -

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

Show
Le Duc Bao added a comment - 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
Hide
Werner Guttmann added a comment -

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

Show
Werner Guttmann added a comment - Sorry, I am not 100% sure where you want my help ?
Hide
Le Duc Bao added a comment -

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

Show
Le Duc Bao added a comment - 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
Hide
Werner Guttmann added a comment -

Modified some of the internal workings of the test (framework) classes to adopt for JUnit @Test annotations. Any feedback welcome.

Show
Werner Guttmann added a comment - Modified some of the internal workings of the test (framework) classes to adopt for JUnit @Test annotations. Any feedback welcome.

People

Vote (0)
Watch (1)

Dates

  • Due:
    Created:
    Updated:
    Resolved: