MarginLeft extends AbstractCssProperty<MarginLeft> { public void setPercent(final float percent) { value = percent; cssLengthUnit = CssLengthUnit.PER; cssValue = String.valueOf(percent) + cssLengthUnit; if (getStateChangeInformer() != null) { getStateChangeInformer().stateChanged(this); } } MarginLeft();  MarginLeft(final String cssValue);  MarginLeft(final MarginLeft marginLeft);  MarginLeft(final float percent);  MarginLeft(final float value, final CssLengthUnit cssLengthUnit); MarginLeft 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 MarginLeft 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() { { MarginLeft marginLeft = new MarginLeft(); marginLeft.setPercent(75); assertEquals("75.0%", marginLeft.getCssValue()); assertEquals(CssLengthUnit.PER, marginLeft.getUnit()); assertTrue(marginLeft.getValue() == 75); } }