@@ -0,0 +1,2803 @@
+/*%0A * Tanaguru - Automated webpage assessment%0A * Copyright (C) 2008-2015 Tanaguru.org%0A *%0A * This program is free software: you can redistribute it and/or modify%0A * it under the terms of the GNU Affero General Public License as%0A * published by the Free Software Foundation, either version 3 of the%0A * License, or (at your option) any later version.%0A *%0A * This program is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A * GNU Affero General Public License for more details.%0A *%0A * You should have received a copy of the GNU Affero General Public License%0A * along with this program.  If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A *%0A * Contact us by mail: tanaguru AT tanaguru DOT org%0A */%0A%0Apackage org.tanaguru.rules.rgaa32017;%0A%0Aimport org.tanaguru.entity.audit.TestSolution;%0Aimport org.tanaguru.processor.SSPHandler;%0Aimport org.tanaguru.ruleimplementation.AbstractPageRuleWithSelectorAndCheckerImplementation;%0Aimport org.tanaguru.ruleimplementation.TestSolutionHandler;%0Aimport org.tanaguru.rules.elementchecker.lang.LangChangeChecker;%0Aimport org.tanaguru.rules.elementchecker.lang.LangChecker;%0Aimport org.tanaguru.rules.elementselector.SimpleElementSelector;%0Aimport static org.tanaguru.rules.keystore.CssLikeQueryStore.HTML_WITH_LANG_CSS_LIKE_QUERY;%0Aimport org.tanaguru.rules.keystore.RemarkMessageStore;%0A%0A/**%0A * Implementation of the rule 8.7.1 of the referential Rgaa 3-2017.%0A * %3Cbr/%3E%0A * For more details about the implementation, refer to %3Ca href=%22http://tanaguru-rules-rgaa3.readthedocs.org/en/latest/Rule-8-7-1%22%3Ethe rule 8.7.1 design page.%3C/a%3E%0A * @see %3Ca href=%22http://references.modernisation.gouv.fr/referentiel-technique-0#test-8-7-1%22%3E 8.7.1 rule specification%3C/a%3E%0A *%0A */%0Apublic class Rgaa32017Rule080701 extends AbstractPageRuleWithSelectorAndCheckerImplementation %7B%0A%0A    private final LangChecker ec = new LangChangeChecker();%0A%0A    /**%0A     * Default constructor%0A     */%0A    public Rgaa32017Rule080701() %7B%0A        super();%0A        setElementSelector(new SimpleElementSelector(HTML_WITH_LANG_CSS_LIKE_QUERY));%0A        setElementChecker(ec);%0A    %7D%0A%0A    @Override%0A    public void check(SSPHandler sspHandler, TestSolutionHandler testSolutionHandler) %7B%0A        super.check(sspHandler, testSolutionHandler);%0A        // add extra remark at the end of the test, if the result is NMI%0A        if (testSolutionHandler.getTestSolution().equals(TestSolution.NEED_MORE_INFO)) %7B%0A            sspHandler.getProcessRemarkService().addProcessRemark(%0A                    TestSolution.NEED_MORE_INFO, %0A                    RemarkMessageStore.CHECK_SHORT_TEST_MSG);%0A        %7D%0A    %7D%0A    %0A    @Override%0A    public int getSelectionSize() %7B%0A        return ec.getNbOfElementsTested();%0A    %7D%0A%0A%7D%0A

Add implementation rule Rgaa32017Rule080701