MarginBottom extends AbstractCssProperty<MarginBottom> { public void setPercent(final float percent) { value = percent; cssLengthUnit = CssLengthUnit.PER; cssValue = String.valueOf(percent) + cssLengthUnit; if (getStateChangeInformer() != null) { getStateChangeInformer().stateChanged(this); } } MarginBottom();  MarginBottom(final String cssValue);  MarginBottom(final MarginBottom marginBottom);  MarginBottom(final float percent);  MarginBottom(final float value, final CssLengthUnit cssLengthUnit); MarginBottom 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 MarginBottom setCssValue(final String cssValue); void setAsInitial(); void setAsInherit(); void setAsAuto(); static boolean isValid(final String cssValue); static final String INITIAL; static final String INHERIT; static final String AUTO; }
@Test public void testSetPercent() { { MarginBottom marginBottom = new MarginBottom(); marginBottom.setPercent(75); assertEquals("75.0%", marginBottom.getCssValue()); assertEquals(CssLengthUnit.PER, marginBottom.getUnit()); assertTrue(marginBottom.getValue() == 75); } }