On 2014-12-28, Harald Brabenetz wrote: > I'm certain, that with maven it is easier to contribute to xmlunit.
Maybe. I'll think about it but don't promise anything. If we move things around to make Maven happy, this might be the best point in time to split the Java and .NET implementations. Which also requires a solution for the shared test resources (yet another repo and submodules or subtrees, likely). So please dont put too much effort into it now, we'd only end up with merge conflicts. My short term focus is getting XMLUnit Java 1.6 out. I've been working on https://sourceforge.net/p/xmlunit/bugs/65/ for a while and have uncovered two bugs in xmlunit-legacy while porting a not yet committed solution from XMLUnit 1.x - interesting. All this while juggling some real-live responsibilities, please bear with me. :-) > I would like to contribute a CompareMatcher with fluent style: This sounds great. > But I must rewrite my code for the new XmlUnit-API (e.g.: use > NodeMatcher instead ElementQualifier). I'd shoot for ElementSelector and DefaultNodeMatcher when replacing ElementQualifier. > Is there a documentation for the new API? Unfortunately nothing beyond Javadocs and the tests. I wanted to document the design ideas behind some parts of the new API in the Wiki and even discuss things there as I'm sure there are a few things that could be solved in a nicer way. > What is the new Syntax for a comparission for "similar": > Diff myDiff = new Diff(myControlXML, myTestXML); > assertTrue("XML similar " + myDiff.toString(), myDiff.similar()); Yet another missing piece. > I found no default implementation of a ComparisonListener.java (only > in tests and legacy). I'm not sure there is a default implementation that is of wider use. The sketch in my head that needs to get written down goes along the lines of Diff myDiff = DiffBuilder.compareControl(Input.fromMemory(myControlXML)) .withTest(Input.fromMemory(myTestXML)) .build(); assertTrue("XML similar " + myDiff.toString(), myDiff.isSimilar()); where DiffBuilder uses an internal implementation of ComparisonListener and turns the collected results into a(n imutable) Diff object which captures the outcome. The DiffBuilder would have additional methods for specifying custom NodeMatchers, DifferenceEvaluators and so on. I can easily see your ComparisonMatcher work on top of DiffBuilder. One thing that is important to me is to keep external dependencies - and JUnit is one - out of core. I can easily envision a graphical XML diff tool on top of DifferenceEngine that visualizes differences based on information obtained via ComparisonListener callbacks. Cheers Stefan ------------------------------------------------------------------------------ Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net _______________________________________________ Xmlunit-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/xmlunit-general
