pane.setAttribute(FormatConstants.PREVIOUS_SHARD_LINK_CLASS_ATTRIBUTE,
prevClass);
pane.setAttribute(FormatConstants.MAXIMUM_CONTENT_SIZE_ATTRIBUTE,
maxContentSize);
DissectingPaneAttributes atts = new DissectingPaneAttributes();
atts.setDissectingPane(pane);
atts.setInclusionPath(inclusionPath);
atts.setIsNextLinkFirst(nextLinkFirst);
protocol.setDissecting(true);
protocol.openDissectingPane(buffer, atts);
if (protocol.isDissectionSupported()) {
Element el = null;
try {
el = buffer.closeElement("div");
el = buffer.closeElement
(DissectionConstants.DISSECTABLE_CONTENTS_ELEMENT);
} catch (IllegalStateException ise) {
fail(DissectionConstants.DISSECTABLE_CONTENTS_ELEMENT +
" element not found.");
}
// check that all the attributes have been written out
assertEquals("Invalid inclusion path attribute",
el.getAttributeValue
(DissectionConstants.INCLUSION_PATH_ATTRIBUTE),
atts.getInclusionPath());
assertEquals("Invalid pane name attribute",
el.getAttributeValue
(DissectionConstants.DISSECTING_PANE_NAME_ATTRIBUTE),
atts.getDissectingPane().getName());
assertEquals("Invalid next shard shortcut attribute",
el.getAttributeValue
(DissectionConstants.NEXT_SHARD_SHORTCUT_ATTRIBUTE),
nextShortcut);