Enhancements of assertj module #126
Conversation
|
I also plan to add compare API (equivalent of CompareMatcher) and after that write something in the user guide. BTW. Now, maven have problem with TLS in java6 build mode. Downloading artifacts failed with message: Edit: Probably it's related to issue travis-ci/travis-ci#9713 |
|
I've seen the Java6 failures in other builds of mine before, the TLS stack in Java6 is pretty old and doesn't cope with longer keys or "more modern" ciphers (I think it doesn't even support Diffie-Hellman properly). Most likely Maven central has enabled a TLS feature that Java6 lacks. I'll look into it separately. Many, many thanks! |
|
|
||
| Assertions.assertThat(schemaSources) | ||
| .isNotNull() | ||
| .isNotEmpty() |
There was a problem hiding this comment.
The Hamcrest Matcher allows for an empty list of sources which in the end leads to JAXPValidator using https://docs.oracle.com/javase/7/docs/api/javax/xml/validation/SchemaFactory.html#newSchema() - i.e. schema sources are picked up from the document's xsi:schemaLocation and xsi:noSchemaLocation.
There was a problem hiding this comment.
I assumed that clients whould know if schemaSources is empty or not and use assertThat(xml).isValid() or assertThat(xml).isValidAgainst(schemaSources) respectively.
But you have right I shouldn't expect that clients would check length of schemaSources
| */ | ||
| package org.xmlunit.assertj; | ||
|
|
||
| import org.assertj.core.api.*; |
There was a problem hiding this comment.
just a nit, but if you happen to touch this class again, please expand the * import. This is nothing that would prevent me from merging the PR, though :-)
|
Thanks a lot! |
Following features were add to assertj module:
ValidationMatcherEvaluateXPathMatcher