You should look at parsing XML in groovy, I wasn't talking about comparing string values.
- Peace Dave On Thu, May 19, 2011 at 5:26 PM, phil swenson <[email protected]> wrote: > Well the reason I ask this is it's possible to have an XML String that > is quite different than another XML String, but as far as an XML > document goes - they are equivalent. > > Such as: > > <document> > <child>the child</child> > </document> > > and > > <document><child>the child</child></document> > > These should be equal for a unit test, but you certainly wouldn't get > equivalence if you just looked at the string values. > > Also the ordering between the document structures could be different, > but for your purposes the ordering doesn't matter. That's what > XmlUnit does for you... > > Thinking XmlUnit is the way to go with this..... > > On Thu, May 19, 2011 at 5:21 PM, Dave King <[email protected]> wrote: >> I haven't used XML Unit, but parsing XML in Groovy is way too easy. >> So I'd look at doing >> unit tests in Groovy see: >> http://groovy.codehaus.org/Unit+Testing >> >> - Peace >> Dave >> >> On Thu, May 19, 2011 at 2:38 PM, phil swenson <[email protected]> wrote: >>> What is the best way to test XML documents (actual vs expected) using >>> groovy/gradle? XMLUnit? >>> >>> thanks >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
