@Test public void backgroundPositionValidationTest() { Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_POSITION_X, "initial"))); Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_POSITION_Y, "-0"))); Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_POSITION_Y, "5px"))); Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_POSITION_X, "5em"))); Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_POSITION_Y, "5px, 5%, bottom"))); Assert.assertTrue(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_POSITION_X, "left 5%, right"))); Assert.assertFalse(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_POSITION_X, "5"))); Assert.assertFalse(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_POSITION_Y, "ja"))); Assert.assertFalse(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_POSITION_X, "initial 5px"))); Assert.assertFalse(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_POSITION_Y, "ja, 5px"))); Assert.assertFalse(CssDeclarationValidationMaster.checkDeclaration( new CssDeclaration(CommonCssConstants.BACKGROUND_POSITION_X, "initial, 5px"))); }
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);  }