BackgroundImage extends AbstractCssProperty<BackgroundImage> implements StateChangeInformer<Bean> { @Override public String toString() { return getCssName() + ": " + getCssValue(); } BackgroundImage();  BackgroundImage(final String cssValue);  BackgroundImage(final BackgroundImage backgroundImage);  BackgroundImage(final String... imageUrls);  BackgroundImage(final UrlCss3Value... urlCss3Values); @Override String getCssName(); @Override String getCssValue(); @Override String toString(); @Override BackgroundImage setCssValue(final String cssValue); void setImageUrls(final String... imageUrls); void setImageUrls(final UrlCss3Value... urlCss3Values); List<UrlCss3Value> getUrlCss3Values(); void setAsInitial(); void setAsInherit(); @Override void stateChanged(final Bean stateChangedObject); static final String INITIAL; static final String INHERIT; static final String NONE; }
@Test public void testToString() { BackgroundImage backgroundImage = new BackgroundImage("/images/HelloDesign.jpg", "/images/HelloDesign2.jpg"); assertEquals(backgroundImage.getCssName()+": url(\"/images/HelloDesign.jpg\"), url(\"/images/HelloDesign2.jpg\")", backgroundImage.toString()); }
@Test public void testDataStringInBackgroundImage() throws Exception { { UrlCss3Value urlCss3Value = new UrlCss3Value(URL_CSS_VALUE_STRING); assertEquals(URL_CSS_VALUE_STRING, urlCss3Value.getValue()); assertEquals(URL_CSS_VALUE_STRING.substring(5, URL_CSS_VALUE_STRING.length() - 2), urlCss3Value.getUrl()); System.out.println(urlCss3Value.toString()); BackgroundImage backgroundImage = new BackgroundImage(urlCss3Value); System.out.println(backgroundImage.toCssString()); assertEquals(".processing{background-image:" + URL_CSS_VALUE_STRING + ";background-repeat:no-repeat;}", processingSvg.toCssString()); System.out.println(processingSvg.toCssString()); } }