NCEAS / z-test-issues

Test issue imports from redmine
0 stars 0 forks source link

tests only validate documents in test dir against SAX not EML #463

Closed mbjones closed 7 years ago

mbjones commented 7 years ago

Author Name: Shaun Walbridge (Shaun Walbridge) Original Redmine Issue: 3594, https://projects.ecoinformatics.org/ecoinfo/issues/3594 Original Date: 2008-11-05 Original Assignee: Shaun Walbridge


EML files residing within the test/ folder should be tested for EML validity along with SAX validation, to keep in line with how the emlparser servlet validates documents. Files known to be bad should reside within test/invalidEML/ folder, leaving only valid EML within the base test/ folder.

mbjones commented 7 years ago

Original Redmine Comment Author Name: Margaret O'Brien (Margaret O'Brien) Original Date: 2008-11-05T21:32:47Z


targeting for 2.1

mbjones commented 7 years ago

Original Redmine Comment Author Name: Shaun Walbridge (Shaun Walbridge) Original Date: 2008-11-05T23:15:45Z


Added code to EMLParserTest which uses the same method as SaxValidateTest to glob all XML files within the test folder and test for validity. Similarly, added a negative case test for all invalid EML documents which currently reside in test/invalidEML/. A new token was introduced called 'invalid.dir' for referencing the invalid EML documents.

Additionally, EMLParser was modified to ignore insignificant whitespace within reference elements, as manipulation programs will change these to improve the XML readability and was causing EML to be invalided by both the servlet and JUnit tests.

mbjones commented 7 years ago

Original Redmine Comment Author Name: Redmine Admin (Redmine Admin) Original Date: 2013-03-27T21:23:56Z


Original Bugzilla ID was 3594