BorderImageSlice extends AbstractCssProperty<BorderImageSlice> { public void setLeft(final Float left, final CssLengthUnit leftUnit) { cssValue = getProducedCssValue(top, topUnit, right, rightUnit, bottom, bottomUnit, left, leftUnit, middle); this.left = left; this.leftUnit = leftUnit; final StateChangeInformer<CssProperty> stateChangeInformer = getStateChangeInformer(); if (stateChangeInformer != null) { stateChangeInformer.stateChanged(this); } } BorderImageSlice();  BorderImageSlice(final String cssValue);  BorderImageSlice(final BorderImageSlice bottom);  BorderImageSlice(final float percent);  BorderImageSlice(final float value,
            final CssLengthUnit cssLengthUnit); void setPercent(final float percent); @Override String getCssName(); @Override String getCssValue(); @Override String toString(); @Override BorderImageSlice setCssValue(final String cssValue); void setAsInitial(); void setAsInherit(); void addFill(); void removeFill(); 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 FILL; static final String INITIAL; static final String INHERIT; }
@Test public void testSetLeft() { BorderImageSlice borderImageSlice = new BorderImageSlice(); borderImageSlice.setBorderImageTopRightBottomLeft(5F, CssLengthUnit.CH, 10F, CssLengthUnit.CM, 15F, CssLengthUnit.EM, 20F, CssLengthUnit.EX); assertEquals("5.0ch 10.0cm 15.0em 20.0ex", borderImageSlice.getCssValue()); assertNotNull(borderImageSlice.getTop()); assertNotNull(borderImageSlice.getRight()); assertNotNull(borderImageSlice.getBottom()); assertNotNull(borderImageSlice.getLeft()); assertTrue(5F == borderImageSlice.getTop()); assertTrue(10F == borderImageSlice.getRight()); assertTrue(15F == borderImageSlice.getBottom()); assertTrue(20F == borderImageSlice.getLeft()); assertNotNull(borderImageSlice.getTopUnit()); assertNotNull(borderImageSlice.getRightUnit()); assertNotNull(borderImageSlice.getBottomUnit()); assertNotNull(borderImageSlice.getLeftUnit()); assertEquals(CssLengthUnit.CH, borderImageSlice.getTopUnit()); assertEquals(CssLengthUnit.CM, borderImageSlice.getRightUnit()); assertEquals(CssLengthUnit.EM, borderImageSlice.getBottomUnit()); assertEquals(CssLengthUnit.EX, borderImageSlice.getLeftUnit()); borderImageSlice.setLeft(55F, CssLengthUnit.PT); assertEquals("5.0ch 10.0cm 15.0em 55.0pt", borderImageSlice.getCssValue()); assertEquals(CssLengthUnit.PT, borderImageSlice.getLeftUnit()); }