AnchorAttributes attributes = new AnchorAttributes();
attributes.setStyles(StylesBuilder.getInitialValueStyles());
// test no link style
Element element = domFactory.createStyledElement(attributes.getStyles());
protocol.addAnchorAttributes(element, attributes);
assertEquals("no link style means no button attribute",
null, element.getAttributeValue("button"));
// test unrelated numeric shortcut link style
attributes.setStyles(StylesBuilder.getCompleteStyles(
"mcs-link-style: numeric-shortcut"));
element = domFactory.createStyledElement(attributes.getStyles());
protocol.addAnchorAttributes(element, attributes);
assertEquals("unrelated link style means no button attribute",
null, element.getAttributeValue("button"));
// test proper button link style
attributes.setStyles(StylesBuilder.getCompleteStyles(
"mcs-link-style: button"));
element = domFactory.createStyledElement(attributes.getStyles());
protocol.addAnchorAttributes(element, attributes);
assertEquals("button link style means button attribute",
"button", element.getAttributeValue("button"));
}