BorderImageOutset extends AbstractCssProperty<BorderImageOutset> { public static boolean isValid(final String cssValue) { final String trimmedCssValue = TagStringUtil .toLowerCase(StringUtil.strip(cssValue)); if (PREDEFINED_CONSTANTS.contains(trimmedCssValue)) { return true; } final String[] cssValueParts = StringUtil.splitBySpace(trimmedCssValue); if (cssValueParts.length > 4) { return false; } for (final String cssValuePart : cssValueParts) { final Object[] lengthValueAndUnit = CssLengthUtil .getLengthValueAndUnit(cssValuePart); if (lengthValueAndUnit.length == 0) { return false; } } return true; } BorderImageOutset();  BorderImageOutset(final String cssValue);  BorderImageOutset(final BorderImageOutset bottom);  BorderImageOutset(final float percent);  BorderImageOutset(final float value,
            final CssLengthUnit cssLengthUnit); void setPercent(final float percent); @Override String getCssName(); @Override String getCssValue(); @Override String toString(); @Override BorderImageOutset setCssValue(final String cssValue); void setAsInitial(); void setAsInherit(); 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 INITIAL; static final String INHERIT; }
@Test public void testIsValid() { { final boolean valid = BorderImageOutset.isValid("45px"); assertTrue(valid); assertTrue(BorderImageOutset.isValid("55")); } { final boolean valid = BorderImageOutset.isValid("45em 45px"); assertTrue(valid); final boolean invalid = BorderImageOutset.isValid("45em dfd 45px"); assertFalse(invalid); } { final boolean valid = BorderImageOutset.isValid("45%"); assertTrue(valid); final boolean invalid = BorderImageOutset.isValid("45 px"); assertFalse(invalid); } { final boolean valid = BorderImageOutset.isValid("45em"); assertTrue(valid); final boolean invalid = BorderImageOutset.isValid("45sem"); assertFalse(invalid); } { final boolean valid = BorderImageOutset.isValid("45rem"); assertTrue(valid); } { final boolean valid = BorderImageOutset.isValid("45rem auto"); assertFalse(valid); } }