Search in sources :

Example 1 with ElementWithAttributePresenceChecker

use of org.asqatasun.rules.elementchecker.element.ElementWithAttributePresenceChecker 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);
    }
}
Also used : ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) ElementWithAttributePresenceChecker(org.asqatasun.rules.elementchecker.element.ElementWithAttributePresenceChecker) ElementHandler(org.asqatasun.ruleimplementation.ElementHandler) ElementChecker(org.asqatasun.rules.elementchecker.ElementChecker) HashMap(java.util.HashMap) Map(java.util.Map)

Example 2 with ElementWithAttributePresenceChecker

use of org.asqatasun.rules.elementchecker.element.ElementWithAttributePresenceChecker 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);
    }
}
Also used : ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) ElementWithAttributePresenceChecker(org.asqatasun.rules.elementchecker.element.ElementWithAttributePresenceChecker) ElementHandler(org.asqatasun.ruleimplementation.ElementHandler) ElementChecker(org.asqatasun.rules.elementchecker.ElementChecker) HashMap(java.util.HashMap) Map(java.util.Map)

Example 3 with ElementWithAttributePresenceChecker

use of org.asqatasun.rules.elementchecker.element.ElementWithAttributePresenceChecker in project Asqatasun by Asqatasun.

the class Rgaa40Rule100102 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);
    }
}
Also used : ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) ElementWithAttributePresenceChecker(org.asqatasun.rules.elementchecker.element.ElementWithAttributePresenceChecker) ElementHandler(org.asqatasun.ruleimplementation.ElementHandler) ElementChecker(org.asqatasun.rules.elementchecker.ElementChecker) HashMap(java.util.HashMap) Map(java.util.Map)

Example 4 with ElementWithAttributePresenceChecker

use of org.asqatasun.rules.elementchecker.element.ElementWithAttributePresenceChecker 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);
    }
}
Also used : ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) ElementWithAttributePresenceChecker(org.asqatasun.rules.elementchecker.element.ElementWithAttributePresenceChecker) ElementHandler(org.asqatasun.ruleimplementation.ElementHandler) ElementChecker(org.asqatasun.rules.elementchecker.ElementChecker) HashMap(java.util.HashMap) Map(java.util.Map)

Example 5 with ElementWithAttributePresenceChecker

use of org.asqatasun.rules.elementchecker.element.ElementWithAttributePresenceChecker 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);
    }
}
Also used : ElementPresenceChecker(org.asqatasun.rules.elementchecker.element.ElementPresenceChecker) ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) ElementWithAttributePresenceChecker(org.asqatasun.rules.elementchecker.element.ElementWithAttributePresenceChecker) ElementChecker(org.asqatasun.rules.elementchecker.ElementChecker) ElementHandler(org.asqatasun.ruleimplementation.ElementHandler) HashMap(java.util.HashMap) Map(java.util.Map)

Aggregations

HashMap (java.util.HashMap)5 Map (java.util.Map)5 ImmutablePair (org.apache.commons.lang3.tuple.ImmutablePair)5 ElementHandler (org.asqatasun.ruleimplementation.ElementHandler)5 ElementChecker (org.asqatasun.rules.elementchecker.ElementChecker)5 ElementWithAttributePresenceChecker (org.asqatasun.rules.elementchecker.element.ElementWithAttributePresenceChecker)5 ElementPresenceChecker (org.asqatasun.rules.elementchecker.element.ElementPresenceChecker)1