use of org.asqatasun.entity.audit.TestSolution in project Asqatasun by Asqatasun.
the class LangChangeChecker method checkLanguageChange.
/**
*
* @param element
* @param sspHandler
* @return
*/
private TestSolution checkLanguageChange(Element element, SSPHandler sspHandler) {
String langDefinition = extractLangDefinitionFromElement(element, sspHandler);
defaultLang = extractEffectiveLang(langDefinition);
TestSolution declarationValidity = checkLanguageDeclarationValidity(element, langDefinition, defaultLang, false);
if (declarationValidity.equals(TestSolution.FAILED)) {
return TestSolution.NOT_APPLICABLE;
}
// the handler may contain the html element or nothing
return checkLanguageRelevancyRecursively(sspHandler, element, null);
}
use of org.asqatasun.entity.audit.TestSolution in project Asqatasun by Asqatasun.
the class ElementUnicityChecker method checkElementPresence.
/**
* This methods checks whether a given element is present on the page.
*
* @param elements
* @param testSolutionHandler
*/
private void checkElementPresence(Elements elements, TestSolutionHandler testSolutionHandler) {
TestSolution checkResult = getSuccessSolution();
if (elements.size() == 1) {
for (Element el : elements) {
addSourceCodeRemark(getSuccessSolution(), el, getSuccessMsgCode());
}
} else {
checkResult = getFailureSolution();
for (Element el : elements) {
addSourceCodeRemark(getFailureSolution(), el, getFailureMsgCode());
}
}
testSolutionHandler.addTestSolution(checkResult);
}
Aggregations