BorderImageSlice extends AbstractCssProperty<BorderImageSlice> { public void setAsInherit() { setCssValue(INHERIT); } 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 testSetAsInherit() { BorderImageSlice borderImageSlice = new BorderImageSlice(); borderImageSlice.setCssValue("55%"); assertEquals("55.0%", borderImageSlice.getCssValue()); assertNotNull(borderImageSlice.getTop()); assertNotNull(borderImageSlice.getRight()); assertNotNull(borderImageSlice.getBottom()); assertNotNull(borderImageSlice.getLeft()); assertTrue(55F == borderImageSlice.getTop()); assertTrue(55F == borderImageSlice.getRight()); assertTrue(55F == borderImageSlice.getBottom()); assertTrue(55F == borderImageSlice.getLeft()); assertNotNull(borderImageSlice.getTopUnit()); assertNotNull(borderImageSlice.getRightUnit()); assertNotNull(borderImageSlice.getBottomUnit()); assertNotNull(borderImageSlice.getLeftUnit()); assertEquals(CssLengthUnit.PER, borderImageSlice.getTopUnit()); assertEquals(CssLengthUnit.PER, borderImageSlice.getRightUnit()); assertEquals(CssLengthUnit.PER, borderImageSlice.getBottomUnit()); assertEquals(CssLengthUnit.PER, borderImageSlice.getLeftUnit()); borderImageSlice.setAsInherit(); assertNull(borderImageSlice.getTop()); assertNull(borderImageSlice.getRight()); assertNull(borderImageSlice.getBottom()); assertNull(borderImageSlice.getLeft()); assertNull(borderImageSlice.getTopUnit()); assertNull(borderImageSlice.getRightUnit()); assertNull(borderImageSlice.getBottomUnit()); assertNull(borderImageSlice.getLeftUnit()); }