BorderImageRepeat extends AbstractCssProperty<BorderImageRepeat> { public void setVertical(final String vertical) { if (vertical == null) { throw new NullValueException("The vertical value cannot be null."); } final String inputVertical = TagStringUtil .toLowerCase(StringUtil.strip(vertical)); if (!INITIAL.equals(vertical) && !INHERIT.equals(inputVertical) && PREDEFINED_CONSTANTS.contains(inputVertical)) { this.vertical = inputVertical; if (horizontal != null) { cssValue = horizontal.concat(" ").concat(inputVertical); } else { cssValue = inputVertical; } } else { throw new InvalidValueException( "The given vertical value '" + vertical + "' is invalid."); } } BorderImageRepeat();  BorderImageRepeat(final String cssValue);  BorderImageRepeat(final BorderImageRepeat borderImageRepeat); @Override String getCssName(); @Override String getCssValue(); @Override String toString(); @Override BorderImageRepeat setCssValue(final String cssValue); void setVertical(final String vertical); void setHorizontal(final String horizontal); String getVertical(); String getHorizontal(); void setAsInitial(); void setAsInherit(); static boolean isValid(final String cssValue); static final String INITIAL; static final String INHERIT; static final String STRETCH; static final String REPEAT; static final String ROUND; }
@Test public void testSetVertical() { { BorderImageRepeat borderImageRepeat = new BorderImageRepeat(); borderImageRepeat.setCssValue(BorderImageRepeat.ROUND); assertEquals(BorderImageRepeat.ROUND, borderImageRepeat.getVertical()); borderImageRepeat.setVertical(BorderImageRepeat.STRETCH); assertNotNull(borderImageRepeat.getHorizontal()); assertNotNull(borderImageRepeat.getVertical()); assertEquals(BorderImageRepeat.ROUND, borderImageRepeat.getHorizontal()); assertEquals(BorderImageRepeat.STRETCH, borderImageRepeat.getVertical()); assertEquals( CssNameConstants.BORDER_IMAGE_REPEAT + ": " + BorderImageRepeat.ROUND + " " + BorderImageRepeat.STRETCH, borderImageRepeat.toString()); assertEquals(BorderImageRepeat.ROUND + " " + BorderImageRepeat.STRETCH, borderImageRepeat.getCssValue()); } }