String actual = DOMUtilities.toString(dom.getRoot());
assertEquals("Result shouild match\n" +
"EXPECTED: " + expected + "\n" +
"ACTUAL : " + actual + "\n", expected, actual);
final MutablePropertyValues attributePropertyValues =
attributes.getStyles().getPropertyValues();
final MutablePropertyValues elementPropertyValues =
element.getStyles().getPropertyValues();
final StylePropertyDefinitions stylePropertyDefinitions =
attributePropertyValues.getStylePropertyDefinitions();
final int count = stylePropertyDefinitions.count();
for (int i = 0; i < count; i++) {
final StyleProperty styleProperty =
stylePropertyDefinitions.getStyleProperty(i);
if (styleProperty.equals(StylePropertyDetails.DISPLAY)) {
assertEquals(DisplayKeywords.TABLE_CELL,
elementPropertyValues.getComputedValue(styleProperty));
assertEquals(DisplayKeywords.TABLE_CELL,
elementPropertyValues.getSpecifiedValue(styleProperty));
} else {
assertEquals(attributePropertyValues.getComputedValue(styleProperty),
elementPropertyValues.getComputedValue(styleProperty));
assertEquals(attributePropertyValues.getSpecifiedValue(styleProperty),
elementPropertyValues.getSpecifiedValue(styleProperty));
}
}
}