@Test public void backgroundImageTest() { Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_IMAGE, "initial"))); Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_IMAGE, "url(rock_texture.jpg)"))); Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_IMAGE, "linear-gradient(red,green,blue)"))); Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_IMAGE, "url()"))); Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_IMAGE, "none"))); Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_IMAGE, "url(img.jpg),url(img2.jpg)"))); Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_IMAGE, "none,url(img2.jpg)"))); Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_IMAGE, "linear-gradient(red,green,blue),url(img2.jpg)"))); Assert.assertFalse(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_IMAGE, "ja"))); Assert.assertFalse(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_IMAGE, "5px"))); Assert.assertFalse(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_IMAGE, "url(url(rock_texture.jpg)"))); Assert.assertFalse(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_IMAGE, "true-linear-gradient(red,green,blue)"))); Assert.assertFalse(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_IMAGE, "url(img.jpg) url(img2.jpg)"))); Assert.assertFalse(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_IMAGE, "initial,url(img.jpg)"))); }
public static boolean checkDeclaration(CssDeclaration declaration) { ICssDeclarationValidator validator = DEFAULT_VALIDATORS.get(declaration.getProperty()); return validator == null || validator.isValid(declaration); }
CssDeclarationValidationMaster { public static boolean checkDeclaration(CssDeclaration declaration) { ICssDeclarationValidator validator = DEFAULT_VALIDATORS.get(declaration.getProperty()); return validator == null || validator.isValid(declaration); } }
CssDeclarationValidationMaster { public static boolean checkDeclaration(CssDeclaration declaration) { ICssDeclarationValidator validator = DEFAULT_VALIDATORS.get(declaration.getProperty()); return validator == null || validator.isValid(declaration); } private  CssDeclarationValidationMaster(); }
CssDeclarationValidationMaster { public static boolean checkDeclaration(CssDeclaration declaration) { ICssDeclarationValidator validator = DEFAULT_VALIDATORS.get(declaration.getProperty()); return validator == null || validator.isValid(declaration); } private  CssDeclarationValidationMaster(); static boolean checkDeclaration(CssDeclaration declaration); }
CssDeclarationValidationMaster { public static boolean checkDeclaration(CssDeclaration declaration) { ICssDeclarationValidator validator = DEFAULT_VALIDATORS.get(declaration.getProperty()); return validator == null || validator.isValid(declaration); } private  CssDeclarationValidationMaster(); static boolean checkDeclaration(CssDeclaration declaration);  }