public void testParseColorFunction()
{
StyleSheet s = new StyleSheet();
CSSStyleRule rule = new CSSStyleRule(s, null);
rule.setPropertyValueAsString(BorderStyleKeys.BACKGROUND_COLOR, "rgb(0,255,0)");
final CSSFunctionValue value = (CSSFunctionValue) rule.getPropertyCSSValue(BorderStyleKeys.BACKGROUND_COLOR);
assertEquals("rgb", value.getFunctionName());
final CSSValue[] cssValues = value.getParameters();
assertEquals("Parameter-count", 3, cssValues.length);
assertEquals("Parameter1", "0", cssValues[0].toString());
assertEquals("Parameter2", "255", cssValues[1].toString());
assertEquals("Parameter3", "0", cssValues[2].toString());
}