@Test public void backgroundSizeTest() { Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_SIZE, "initial"))); Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_SIZE, "0"))); Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_SIZE, "10px"))); Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_SIZE, "10%"))); Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_SIZE, "10% 10px"))); Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_SIZE, "10px 10em"))); Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_SIZE, "auto"))); Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_SIZE, "auto 10px"))); Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_SIZE, "10px auto"))); Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_SIZE, "cover"))); Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_SIZE, "contain"))); Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_SIZE, "5px, 10%, auto"))); Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_SIZE, "5px 10%, 20em"))); Assert.assertFalse(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_SIZE, "ja"))); Assert.assertFalse(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_SIZE, "10"))); Assert.assertFalse(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_SIZE, "cover 10px"))); Assert.assertFalse(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_SIZE, "initial 10px"))); Assert.assertFalse(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_SIZE, "10px contain"))); Assert.assertFalse(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_SIZE, "ja, 5px"))); Assert.assertFalse(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_SIZE, "5px, ja"))); Assert.assertFalse(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_SIZE, "initial, 10px"))); }
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);  }