// =====================================================================
// Test Expectations
// =====================================================================
BorderOptimizer optimizer = new BorderOptimizer(checkerMock,
shorthandSetMock);
setBoxProperties(inputValues,
StylePropertyDetails.BORDER_BOTTOM_COLOR,
OptimizerHelper.ANY, PropertyStatus.REQUIRED,
StylePropertyDetails.BORDER_LEFT_COLOR,
OptimizerHelper.ANY, PropertyStatus.REQUIRED,
StylePropertyDetails.BORDER_RIGHT_COLOR,
OptimizerHelper.ANY, PropertyStatus.REQUIRED,
StylePropertyDetails.BORDER_TOP_COLOR,
StyleColorNames.BLACK,
PropertyStatus.REQUIRED);
setBoxProperties(inputValues,
StylePropertyDetails.BORDER_BOTTOM_STYLE,
OptimizerHelper.ANY, PropertyStatus.REQUIRED,
StylePropertyDetails.BORDER_LEFT_STYLE,
OptimizerHelper.ANY, PropertyStatus.REQUIRED,
StylePropertyDetails.BORDER_RIGHT_STYLE,
OptimizerHelper.ANY, PropertyStatus.REQUIRED,
StylePropertyDetails.BORDER_TOP_STYLE,
BorderStyleKeywords.SOLID, PropertyStatus.REQUIRED);
setBoxProperties(inputValues,
StylePropertyDetails.BORDER_BOTTOM_WIDTH,
StyleValueFactory.getDefaultInstance().getLength(
null, 0.0, LengthUnit.PX),
PropertyStatus.REQUIRED,
StylePropertyDetails.BORDER_LEFT_WIDTH,
StyleValueFactory.getDefaultInstance().getLength(
null, 0.0, LengthUnit.PX),
PropertyStatus.REQUIRED,
StylePropertyDetails.BORDER_RIGHT_WIDTH,
StyleValueFactory.getDefaultInstance().getLength(
null, 0.0, LengthUnit.PX),
PropertyStatus.REQUIRED,
StylePropertyDetails.BORDER_TOP_WIDTH,
StyleValueFactory.getDefaultInstance().getLength(
null, 1.0, LengthUnit.PX),
PropertyStatus.REQUIRED);
MutableStyleProperties outputValues =
ThemeFactory.getDefaultInstance().createMutableStyleProperties();
optimizer.optimize(TargetEntity.ELEMENT, inputValues, outputValues,
deviceValuesMock);
assertEquals("border-color:black;border-style:solid;border-width:1px 0 0",
outputValues.getStandardCSS());
}