Hi,
I want to check that my parsefilter (which is similar to our
microformats rel-tag parsefilter) is doing the correct filtering
therefore I wish to test the content of the WebPage metadata to check
everything is working as I wish.
Say my filter method mirrors MetaTagParser#filter e.g.
...
last three lines of method
..
ByteBuffer bb = ByteBuffer.wrap(sb.toString().getBytes());
page.putToMetadata(new Utf8(REL_TAG), bb);
return parse;
I would expect every rel=""tag" to be put to the page metadata
To check for this I've tried stuff similar to
page.getFromMetadata(new Utf8("Rel-Tag"));
however I'm not sure how to store the results as an integer from which
I can check against what I know should be there! Previously I've tried
other assertions using ByteBuffer but to no avail.
Can someone help me out please?
Thank you very much in advance.
Lewis
--
Lewis