I have two scala.xml.Elem
objects (actual, expected). I am using JUnit 4, but have also included XMLUnit 1.3.
Is there any easy way to compare the two objec
Use the version of assertTrue
that allows passing custom messages
public static void assertTrue(java.lang.String message,
boolean condition)
and (for example) diff
to produce the string with the descendand nodes that aren't equal
scala> val xml1 = john smith
xml1: scala.xml.Elem = john smith
scala> val xml2 = jane smith
xml2: scala.xml.Elem = jane smith
scala> assert(xml1 == xml2, xml1.child diff xml2.child mkString(", "))
java.lang.AssertionError: assertion failed: john
at scala.Predef$.assert(Predef.scala:91)
at .(:8)
at .()