JAXP pom change
Ian Young
ian at iay.org.uk
Fri Jan 24 17:14:19 EST 2014
On 24 Jan 2014, at 21:49, Cantor, Scott <cantor.2 at osu.edu> wrote:
> Ian, I think you patched the MA to handle those duration tests without
> caring which parser was used?
Yes.
> Can you port that to the failing tests we
> have or describe what you did?
It's kinda late here, so the quick summary is that instead of comparing stringValue against a fixed string constant, I parse the string duration back into a Duration, extract the corresponding number of millis and then compare that instead:
final DatatypeFactory dtf = DatatypeFactory.newInstance();
Assert.assertEquals(dtf.newDuration(stringValue).getTimeInMillis(new Date()), correctAnswer);
Not very subtle, but it seems to work.
Word of warning: don't try and convert the expected and actual string values into Durations and then assertEquals() those... for some reason, Duration comparison ignores the millisecond component...
I can take a look at these next week if you're busy, but I imagine you can get to it more quickly.
-- Ian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5943 bytes
Desc: not available
Url : http://shibboleth.net/pipermail/dev/attachments/20140124/23006fa7/attachment-0001.bin
More information about the dev
mailing list