FontSize extends AbstractCssProperty<FontSize> { public void setPercent(final float percent) { value = percent; cssLengthUnit = CssLengthUnit.PER; cssValue = String.valueOf(percent) + cssLengthUnit; if (getStateChangeInformer() != null) { getStateChangeInformer().stateChanged(this); } } FontSize();  FontSize(final String cssValue);  FontSize(final FontSize fontSizeCss);  FontSize(final float percent);  FontSize(final float value, final CssLengthUnit cssLengthUnit); FontSize setValue(final float value,
            final CssLengthUnit cssLengthUnit); void setPercent(final float percent); @Override String getCssName(); @Override String getCssValue(); @Override String toString(); Float getValue(); CssLengthUnit getUnit(); @Override FontSize setCssValue(final String cssValue); void setAsInitial(); void setAsInherit(); void setAsMedium(); void setAsXxSmall(); void setAsXSmall(); void setAsSmall(); void setAsLarge(); void setAsXLarge(); void setAsXxLarge(); void setAsSmaller(); void setAsLarger(); static boolean isValid(final String cssValue); static final String INITIAL; static final String INHERIT; static final String MEDIUM; static final String XX_SMALL; static final String X_SMALL; static final String SMALL; static final String LARGE; static final String X_LARGE; static final String XX_LARGE; static final String SMALLER; static final String LARGER; }
@Test public void testSetPercent() { { FontSize fontSize = new FontSize(); fontSize.setPercent(75); assertEquals("75.0%", fontSize.getCssValue()); assertEquals(CssLengthUnit.PER, fontSize.getUnit()); assertTrue(fontSize.getValue() == 75); } }