use of org.asqatasun.ruleimplementation.ElementHandler in project Asqatasun by Asqatasun.
the class Rgaa30Rule100102 method check.
@Override
protected void check(SSPHandler sspHandler, TestSolutionHandler testSolutionHandler) {
// Attributes checks
for (Map.Entry<String, ElementHandler> attrElementHandlerMapEntry : attrElementHandlerMap.entrySet()) {
ElementChecker attrEc = new ElementWithAttributePresenceChecker(new ImmutablePair(TestSolution.FAILED, PRESENTATION_ATTR_DETECTED_MSG), new ImmutablePair(TestSolution.PASSED, ""), attrElementHandlerMapEntry.getKey());
attrEc.check(sspHandler, attrElementHandlerMapEntry.getValue(), testSolutionHandler);
}
}
use of org.asqatasun.ruleimplementation.ElementHandler in project Asqatasun by Asqatasun.
the class Rgaa32016Rule100102 method check.
@Override
protected void check(SSPHandler sspHandler, TestSolutionHandler testSolutionHandler) {
// Attributes checks
for (Map.Entry<String, ElementHandler> attrElementHandlerMapEntry : attrElementHandlerMap.entrySet()) {
ElementChecker attrEc = new ElementWithAttributePresenceChecker(new ImmutablePair(TestSolution.FAILED, PRESENTATION_ATTR_DETECTED_MSG), new ImmutablePair(TestSolution.PASSED, ""), attrElementHandlerMapEntry.getKey());
attrEc.check(sspHandler, attrElementHandlerMapEntry.getValue(), testSolutionHandler);
}
}
use of org.asqatasun.ruleimplementation.ElementHandler in project Asqatasun by Asqatasun.
the class Rgaa22Rule07081 method select.
@Override
protected void select(SSPHandler sspHandler) {
super.select(sspHandler);
// retrieve element from the nomenclature
Nomenclature deprecatedHtmlTags = nomenclatureLoaderService.loadByCode(PRESENTATION_TAG_NOM);
// add each element of the nomenclature to the selector
MultipleElementSelector mes = new MultipleElementSelector();
for (String deprecatedTag : deprecatedHtmlTags.getValueList()) {
mes.addCssQuery(deprecatedTag.toLowerCase());
}
mes.selectElements(sspHandler, deprecatedElementHandler);
// retrieve element from the nomenclature
Nomenclature deprecatedHtmlAttr = nomenclatureLoaderService.loadByCode(PRESENTATION_ATTR_NOM);
for (String deprecatedAttr : deprecatedHtmlAttr.getValueList()) {
SimpleElementSelector sec = new SimpleElementSelector(buildQuery(deprecatedAttr));
ElementHandler eh = new ElementHandlerImpl();
sec.selectElements(sspHandler, eh);
attrElementHandlerMap.put(deprecatedAttr, eh);
}
}
use of org.asqatasun.ruleimplementation.ElementHandler in project Asqatasun by Asqatasun.
the class Aw22Rule10012 method check.
@Override
protected void check(SSPHandler sspHandler, TestSolutionHandler testSolutionHandler) {
// Attributes checks
for (Map.Entry<String, ElementHandler> attrElementHandlerMapEntry : attrElementHandlerMap.entrySet()) {
ElementChecker attrEc = new ElementWithAttributePresenceChecker(new ImmutablePair(TestSolution.FAILED, PRESENTATION_ATTR_DETECTED_MSG), new ImmutablePair(TestSolution.PASSED, ""), attrElementHandlerMapEntry.getKey());
attrEc.check(sspHandler, attrElementHandlerMapEntry.getValue(), testSolutionHandler);
}
}
use of org.asqatasun.ruleimplementation.ElementHandler in project Asqatasun by Asqatasun.
the class Rgaa22Rule07081 method check.
@Override
protected void check(SSPHandler sspHandler, TestSolutionHandler testSolutionHandler) {
// Tags check
ElementChecker ec = new ElementPresenceChecker(TestSolution.FAILED, TestSolution.PASSED, PRESENTATION_TAG_DETECTED_MSG, null);
ec.check(sspHandler, deprecatedElementHandler, testSolutionHandler);
// Attributes checks
for (Map.Entry<String, ElementHandler> attrElementHandlerMapEntry : attrElementHandlerMap.entrySet()) {
ElementChecker attrEc = new ElementWithAttributePresenceChecker(new ImmutablePair(TestSolution.FAILED, PRESENTATION_ATTR_DETECTED_MSG), new ImmutablePair(TestSolution.PASSED, ""), attrElementHandlerMapEntry.getKey());
attrEc.check(sspHandler, attrElementHandlerMapEntry.getValue(), testSolutionHandler);
}
}
Aggregations