> From: James Strachan [mailto:[EMAIL PROTECTED]]
> From: "Michael Rettig" <[EMAIL PROTECTED]>
> > In jellyUnit is there support for using assertEquals with
> XPath? I have an
> xml value that I want to compare like so:
> >
> > <test:assertEquals xpath="$doc/order/item/@quantity" value="4"/>
> >
> > I am presently using the assert with xpath...
> >
> > <test:assert xpath="$doc/order/item/@quantity = '4'"/>
>
> The above is the best way to perform XPath assertions right now.
>
Would it be possible to write a different <test:assertEquals/> tag that has
two nested elements as its body, whose output is then compared? Something
like:
<test:assertEquals>
<foo:bar/>
<foo:baz/>
</test:assertEquals>
Would a custom XMLOuput class have to be implemented for this?
BTW, I noticed the following lines in
junit.AssertEqualsTag#doTag(XMLOutput):
if (expectedValue == null && expectedValue == null) {
return;
}
Looks like this could be written differently ;-)
Cheers,
--
knut