BorderImageWidth extends AbstractCssProperty<BorderImageWidth> { public void setTop(final Float top, final CssLengthUnit topUnit) { cssValue = getProducedCssValue(top, topUnit, right, rightUnit, bottom, bottomUnit, left, leftUnit); this.top = top; this.topUnit = topUnit; final StateChangeInformer<CssProperty> stateChangeInformer = getStateChangeInformer(); if (stateChangeInformer != null) { stateChangeInformer.stateChanged(this); } } BorderImageWidth();  BorderImageWidth(final String cssValue);  BorderImageWidth(final BorderImageWidth bottom);  BorderImageWidth(final float percent);  BorderImageWidth(final float value,
            final CssLengthUnit cssLengthUnit); void setPercent(final float percent); @Override String getCssName(); @Override String getCssValue(); @Override String toString(); @Override BorderImageWidth setCssValue(final String cssValue); void setAsInitial(); void setAsInherit(); void setAsAuto(); void setBorderImageTopRightBottomLeft(final Float top,
            final Float right, final Float bottom, final Float left,
            final CssLengthUnit unit); void setBorderImageTopRightBottomLeft(final Float top,
            final CssLengthUnit topUnit, final Float right,
            final CssLengthUnit rightUnit, final Float bottom,
            final CssLengthUnit bottomUnit, final Float left,
            final CssLengthUnit leftUnit); void setTop(final Float top, final CssLengthUnit topUnit); void setRight(final Float right, final CssLengthUnit rightUnit); void setBottom(final Float bottom, final CssLengthUnit bottomUnit); void setLeft(final Float left, final CssLengthUnit leftUnit); Float getTop(); CssLengthUnit getTopUnit(); Float getRight(); CssLengthUnit getRightUnit(); Float getBottom(); CssLengthUnit getBottomUnit(); Float getLeft(); CssLengthUnit getLeftUnit(); static boolean isValid(final String cssValue); boolean hasPredefinedConstantValue(); static final String AUTO; static final String INITIAL; static final String INHERIT; }
@Test public void testSetTop() { BorderImageWidth borderImageWidth = new BorderImageWidth(); borderImageWidth.setBorderImageTopRightBottomLeft(5F, CssLengthUnit.CH, 10F, CssLengthUnit.CM, 15F, CssLengthUnit.EM, 20F, CssLengthUnit.EX); assertEquals("5.0ch 10.0cm 15.0em 20.0ex", borderImageWidth.getCssValue()); assertNotNull(borderImageWidth.getTop()); assertNotNull(borderImageWidth.getRight()); assertNotNull(borderImageWidth.getBottom()); assertNotNull(borderImageWidth.getLeft()); assertTrue(5F == borderImageWidth.getTop()); assertTrue(10F == borderImageWidth.getRight()); assertTrue(15F == borderImageWidth.getBottom()); assertTrue(20F == borderImageWidth.getLeft()); assertNotNull(borderImageWidth.getTopUnit()); assertNotNull(borderImageWidth.getRightUnit()); assertNotNull(borderImageWidth.getBottomUnit()); assertNotNull(borderImageWidth.getLeftUnit()); assertEquals(CssLengthUnit.CH, borderImageWidth.getTopUnit()); assertEquals(CssLengthUnit.CM, borderImageWidth.getRightUnit()); assertEquals(CssLengthUnit.EM, borderImageWidth.getBottomUnit()); assertEquals(CssLengthUnit.EX, borderImageWidth.getLeftUnit()); borderImageWidth.setTop(55F, CssLengthUnit.PT); assertEquals("55.0pt 10.0cm 15.0em 20.0ex", borderImageWidth.getCssValue()); assertEquals(CssLengthUnit.PT, borderImageWidth.getTopUnit()); }