@Override protected void setProcess() { // ---------------------------------------------------------------------- // ---------------------------1Passed-01--------------------------------- // ---------------------------------------------------------------------- ProcessResult processResult = processPageTest("AW22.Test.8.8.1-1Passed-01"); // check number of elements in the page assertEquals(1, processResult.getElementCounter()); // check test result assertEquals(TestSolution.PASSED, processResult.getValue()); // check number of remarks and their value assertNull(processResult.getRemarkSet()); // ---------------------------------------------------------------------- // ---------------------------1Passed-02--------------------------------- // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.8.8.1-1Passed-02"); // check number of elements in the page assertEquals(1, processResult.getElementCounter()); // check test result assertEquals(TestSolution.PASSED, processResult.getValue()); // check number of remarks and their value assertNull(processResult.getRemarkSet()); // ---------------------------------------------------------------------- // ---------------------------1Passed-03--------------------------------- // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.8.8.1-1Passed-03"); // check number of elements in the page assertEquals(1, processResult.getElementCounter()); // check test result assertEquals(TestSolution.PASSED, processResult.getValue()); // check number of remarks and their value assertNull(processResult.getRemarkSet()); // ---------------------------------------------------------------------- // ---------------------------1Passed-04--------------------------------- // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.8.8.1-1Passed-04"); // check number of elements in the page assertEquals(1, processResult.getElementCounter()); // check test result assertEquals(TestSolution.PASSED, processResult.getValue()); // check number of remarks and their value assertNull(processResult.getRemarkSet()); // ---------------------------------------------------------------------- // ------------------------------2Failed-01------------------------------ // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.8.8.1-2Failed-01"); assertEquals(TestSolution.FAILED, processResult.getValue()); // check number of elements in the page assertEquals(1, processResult.getElementCounter()); // check test result assertEquals(TestSolution.FAILED, processResult.getValue()); // check number of remarks and their value assertEquals(1, processResult.getRemarkSet().size()); SourceCodeRemark processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next()); assertEquals(TestSolution.FAILED, processRemark.getIssue()); assertEquals( RemarkMessageStore.MALFORMED_LANGUAGE_DECLARATION_MSG, processRemark.getMessageCode()); assertEquals(HtmlElementStore.DIV_ELEMENT, processRemark.getTarget()); assertNotNull(processRemark.getSnippet()); // check number of evidence elements and their value assertEquals(1, processRemark.getElementList().size()); Iterator<EvidenceElement> pIter = processRemark.getElementList().iterator(); EvidenceElement ee = pIter.next(); assertEquals("fren-FR", ee.getValue()); assertEquals(EvidenceStore.LANGUAGE_EE, ee.getEvidence().getCode()); // ---------------------------------------------------------------------- // ------------------------------2Failed-02------------------------------ // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.8.8.1-2Failed-02"); assertEquals(TestSolution.FAILED, processResult.getValue()); // check number of elements in the page assertEquals(1, processResult.getElementCounter()); // check test result assertEquals(TestSolution.FAILED, processResult.getValue()); // check number of remarks and their value assertEquals(1, processResult.getRemarkSet().size()); processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next()); assertEquals(TestSolution.FAILED, processRemark.getIssue()); assertEquals(RemarkMessageStore.WRONG_LANGUAGE_DECLARATION_MSG, processRemark.getMessageCode()); assertEquals(HtmlElementStore.DIV_ELEMENT, processRemark.getTarget()); assertNotNull(processRemark.getSnippet()); // check number of evidence elements and their value assertEquals(1, processRemark.getElementList().size()); pIter = processRemark.getElementList().iterator(); ee = pIter.next(); assertEquals("aq", ee.getValue()); assertEquals(EvidenceStore.LANGUAGE_EE, ee.getEvidence().getCode()); // ---------------------------------------------------------------------- // ------------------------------2Failed-03------------------------------ // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.8.8.1-2Failed-03"); assertEquals(TestSolution.FAILED, processResult.getValue()); // check number of elements in the page assertEquals(1, processResult.getElementCounter()); // check test result assertEquals(TestSolution.FAILED, processResult.getValue()); // check number of remarks and their value assertEquals(1, processResult.getRemarkSet().size()); processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next()); assertEquals(TestSolution.FAILED, processRemark.getIssue()); assertEquals( RemarkMessageStore.MALFORMED_LANGUAGE_DECLARATION_MSG, processRemark.getMessageCode()); assertEquals(HtmlElementStore.DIV_ELEMENT, processRemark.getTarget()); assertNotNull(processRemark.getSnippet()); // check number of evidence elements and their value assertEquals(1, processRemark.getElementList().size()); pIter = processRemark.getElementList().iterator(); ee = pIter.next(); assertEquals("french", ee.getValue()); assertEquals(EvidenceStore.LANGUAGE_EE, ee.getEvidence().getCode()); // ---------------------------------------------------------------------- // ------------------------------2Failed-04------------------------------ // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.8.8.1-2Failed-04"); assertEquals(TestSolution.FAILED, processResult.getValue()); // check number of elements in the page assertEquals(1, processResult.getElementCounter()); // check test result assertEquals(TestSolution.FAILED, processResult.getValue()); // check number of remarks and their value assertEquals(1, processResult.getRemarkSet().size()); processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next()); assertEquals(TestSolution.FAILED, processRemark.getIssue()); assertEquals( RemarkMessageStore.MALFORMED_LANGUAGE_DECLARATION_MSG, processRemark.getMessageCode()); assertEquals(HtmlElementStore.DIV_ELEMENT, processRemark.getTarget()); assertNotNull(processRemark.getSnippet()); // check number of evidence elements and their value assertEquals(1, processRemark.getElementList().size()); pIter = processRemark.getElementList().iterator(); ee = pIter.next(); assertEquals("fr-F", ee.getValue()); assertEquals(EvidenceStore.LANGUAGE_EE, ee.getEvidence().getCode()); // ---------------------------------------------------------------------- // ------------------------------2Failed-05------------------------------ // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.8.8.1-2Failed-05"); assertEquals(TestSolution.FAILED, processResult.getValue()); // check number of elements in the page assertEquals(1, processResult.getElementCounter()); // check test result assertEquals(TestSolution.FAILED, processResult.getValue()); // check number of remarks and their value assertEquals(1, processResult.getRemarkSet().size()); processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next()); assertEquals(TestSolution.FAILED, processRemark.getIssue()); assertEquals( RemarkMessageStore.MALFORMED_LANGUAGE_DECLARATION_MSG, processRemark.getMessageCode()); assertEquals(HtmlElementStore.DIV_ELEMENT, processRemark.getTarget()); assertNotNull(processRemark.getSnippet()); // check number of evidence elements and their value assertEquals(1, processRemark.getElementList().size()); pIter = processRemark.getElementList().iterator(); ee = pIter.next(); assertEquals("fr/FR", ee.getValue()); assertEquals(EvidenceStore.LANGUAGE_EE, ee.getEvidence().getCode()); // ---------------------------------------------------------------------- // ------------------------------4NA-01---------------------------------- // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.8.8.1-4NA-01"); // check test result assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue()); // check test has no remark assertNull(processResult.getRemarkSet()); // ---------------------------------------------------------------------- // ------------------------------4NA-02---------------------------------- // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.8.8.1-4NA-02"); // check test result assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue()); // check test has no remark assertNull(processResult.getRemarkSet()); }
@Override protected void setProcess() { // ---------------------------------------------------------------------- // ------------------------------1Passed-01------------------------------ // ---------------------------------------------------------------------- ProcessResult processResult = processPageTest("AW22.Test.1.2.2-1Passed-01"); // check test result assertEquals(TestSolution.PASSED, processResult.getValue()); // check test has no remark assertNull(processResult.getRemarkSet()); // check number of elements in the page assertEquals(1, processResult.getElementCounter()); // ---------------------------------------------------------------------- // ------------------------------1Passed-02------------------------------ // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-1Passed-02"); // check test result assertEquals(TestSolution.PASSED, processResult.getValue()); // check test has no remark assertNull(processResult.getRemarkSet()); // check number of elements in the page assertEquals(1, processResult.getElementCounter()); // ---------------------------------------------------------------------- // ------------------------------1Passed-03------------------------------ // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-1Passed-03"); // check test result assertEquals(TestSolution.PASSED, processResult.getValue()); // check test has no remark assertNull(processResult.getRemarkSet()); // check number of elements in the page assertEquals(1, processResult.getElementCounter()); // ---------------------------------------------------------------------- // ------------------------------1Passed-04------------------------------ // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-1Passed-04"); // check test result assertEquals(TestSolution.PASSED, processResult.getValue()); // check test has no remark assertNull(processResult.getRemarkSet()); // check number of elements in the page assertEquals(3, processResult.getElementCounter()); // ---------------------------------------------------------------------- // ------------------------------1Passed-05------------------------------ // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-1Passed-05"); // check test result assertEquals(TestSolution.PASSED, processResult.getValue()); // check test has no remark assertNull(processResult.getRemarkSet()); // check number of elements in the page assertEquals(1, processResult.getElementCounter()); // ---------------------------------------------------------------------- // ------------------------------2Failed-01------------------------------ // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-2Failed-01"); // check number of elements in the page assertEquals(1, processResult.getElementCounter()); // check test result assertEquals(TestSolution.FAILED, processResult.getValue()); // check number of remarks and their value assertEquals(1, processResult.getRemarkSet().size()); SourceCodeRemark processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next()); assertEquals( RemarkMessageStore.DECORATIVE_ELEMENT_WITH_NOT_EMPTY_ALT_MSG, processRemark.getMessageCode()); assertEquals(TestSolution.FAILED, processRemark.getIssue()); assertEquals(HtmlElementStore.AREA_ELEMENT, processRemark.getTarget()); assertNotNull(processRemark.getSnippet()); // check number of evidence elements and their value assertEquals(1, processRemark.getElementList().size()); Iterator<EvidenceElement> iter = processRemark.getElementList().iterator(); EvidenceElement ee = iter.next(); assertTrue(StringUtils.contains(ee.getValue(), "Not empty alt")); assertEquals(ALT_ATTR, ee.getEvidence().getCode()); // ---------------------------------------------------------------------- // ------------------------------2Failed-02------------------------------ // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-2Failed-02"); // check number of elements in the page assertEquals(1, processResult.getElementCounter()); // check test result assertEquals(TestSolution.FAILED, processResult.getValue()); // check number of remarks and their value assertEquals(1, processResult.getRemarkSet().size()); processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next()); assertEquals( RemarkMessageStore.DECORATIVE_ELEMENT_WITH_NOT_EMPTY_ALT_MSG, processRemark.getMessageCode()); assertEquals(TestSolution.FAILED, processRemark.getIssue()); assertEquals(HtmlElementStore.AREA_ELEMENT, processRemark.getTarget()); assertNotNull(processRemark.getSnippet()); // check number of evidence elements and their value assertEquals(1, processRemark.getElementList().size()); iter = processRemark.getElementList().iterator(); ee = iter.next(); assertTrue(StringUtils.contains(ee.getValue(), "Not empty alt")); assertEquals(ALT_ATTR, ee.getEvidence().getCode()); // ---------------------------------------------------------------------- // ------------------------------2Failed-03------------------------------ // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-2Failed-03"); // check number of elements in the page assertEquals(1, processResult.getElementCounter()); // check test result assertEquals(TestSolution.FAILED, processResult.getValue()); // check number of remarks and their value assertEquals(1, processResult.getRemarkSet().size()); processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next()); assertEquals( RemarkMessageStore.DECORATIVE_ELEMENT_WITH_NOT_EMPTY_ALT_MSG, processRemark.getMessageCode()); assertEquals(TestSolution.FAILED, processRemark.getIssue()); assertEquals(HtmlElementStore.AREA_ELEMENT, processRemark.getTarget()); assertNotNull(processRemark.getSnippet()); // check number of evidence elements and their value assertEquals(1, processRemark.getElementList().size()); iter = processRemark.getElementList().iterator(); ee = iter.next(); assertTrue(StringUtils.contains(ee.getValue(), "Not empty alt")); assertEquals(ALT_ATTR, ee.getEvidence().getCode()); // ---------------------------------------------------------------------- // ------------------------------2Failed-04------------------------------ // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-2Failed-04"); // check number of elements in the page assertEquals(3, processResult.getElementCounter()); // check test result assertEquals(TestSolution.FAILED, processResult.getValue()); // check number of remarks and their value assertEquals(3, processResult.getRemarkSet().size()); Iterator<ProcessRemark> pIter = processResult.getRemarkSet().iterator(); processRemark = (SourceCodeRemark) pIter.next(); assertEquals( RemarkMessageStore.DECORATIVE_ELEMENT_WITH_NOT_EMPTY_ALT_MSG, processRemark.getMessageCode()); assertEquals(TestSolution.FAILED, processRemark.getIssue()); assertEquals(HtmlElementStore.AREA_ELEMENT, processRemark.getTarget()); assertNotNull(processRemark.getSnippet()); // check number of evidence elements and their value assertEquals(1, processRemark.getElementList().size()); iter = processRemark.getElementList().iterator(); ee = iter.next(); assertTrue(StringUtils.contains(ee.getValue(), "Not empty alt")); assertEquals(ALT_ATTR, ee.getEvidence().getCode()); processRemark = (SourceCodeRemark) pIter.next(); assertEquals( RemarkMessageStore.DECORATIVE_ELEMENT_WITH_NOT_EMPTY_ALT_MSG, processRemark.getMessageCode()); assertEquals(TestSolution.FAILED, processRemark.getIssue()); assertEquals(HtmlElementStore.AREA_ELEMENT, processRemark.getTarget()); assertNotNull(processRemark.getSnippet()); // check number of evidence elements and their value assertEquals(1, processRemark.getElementList().size()); iter = processRemark.getElementList().iterator(); ee = iter.next(); assertTrue(StringUtils.contains(ee.getValue(), "Not empty alt")); assertEquals(ALT_ATTR, ee.getEvidence().getCode()); processRemark = (SourceCodeRemark) pIter.next(); assertEquals( RemarkMessageStore.DECORATIVE_ELEMENT_WITH_NOT_EMPTY_ALT_MSG, processRemark.getMessageCode()); assertEquals(TestSolution.FAILED, processRemark.getIssue()); assertEquals(HtmlElementStore.AREA_ELEMENT, processRemark.getTarget()); assertNotNull(processRemark.getSnippet()); // check number of evidence elements and their value assertEquals(1, processRemark.getElementList().size()); iter = processRemark.getElementList().iterator(); ee = iter.next(); assertTrue(StringUtils.contains(ee.getValue(), "Not empty alt")); assertEquals(ALT_ATTR, ee.getEvidence().getCode()); // ---------------------------------------------------------------------- // ------------------------------2Failed-05------------------------------ // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-2Failed-05"); // check number of elements in the page assertEquals(1, processResult.getElementCounter()); // check test result assertEquals(TestSolution.FAILED, processResult.getValue()); // check number of remarks and their value assertEquals(1, processResult.getRemarkSet().size()); processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next()); assertEquals( RemarkMessageStore.DECORATIVE_ELEMENT_WITH_NOT_EMPTY_ALT_MSG, processRemark.getMessageCode()); assertEquals(TestSolution.FAILED, processRemark.getIssue()); assertEquals(HtmlElementStore.AREA_ELEMENT, processRemark.getTarget()); assertNotNull(processRemark.getSnippet()); // check number of evidence elements and their value assertEquals(1, processRemark.getElementList().size()); iter = processRemark.getElementList().iterator(); ee = iter.next(); assertTrue(StringUtils.contains(ee.getValue(), "Not empty alt")); assertEquals(ALT_ATTR, ee.getEvidence().getCode()); // ---------------------------------------------------------------------- // ------------------------------3NMI-01--------------------------------- // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-3NMI-01"); // check number of elements in the page assertEquals(1, processResult.getElementCounter()); // check test result assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue()); // check number of remarks and their value assertEquals(1, processResult.getRemarkSet().size()); processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next()); assertEquals( RemarkMessageStore.CHECK_ELEMENT_WITH_NOT_EMPTY_ALT_MSG, processRemark.getMessageCode()); assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue()); assertEquals(HtmlElementStore.AREA_ELEMENT, processRemark.getTarget()); assertNotNull(processRemark.getSnippet()); // check number of evidence elements and their value assertEquals(1, processRemark.getElementList().size()); iter = processRemark.getElementList().iterator(); ee = iter.next(); assertTrue(StringUtils.contains(ee.getValue(), "")); assertEquals(ALT_ATTR, ee.getEvidence().getCode()); // ---------------------------------------------------------------------- // ------------------------------3NMI-02--------------------------------- // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-3NMI-02"); // check number of elements in the page assertEquals(1, processResult.getElementCounter()); // check test result assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue()); // check number of remarks and their value assertEquals(1, processResult.getRemarkSet().size()); processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next()); assertEquals( RemarkMessageStore.CHECK_ELEMENT_WITH_EMPTY_ALT_MSG, processRemark.getMessageCode()); assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue()); assertEquals(HtmlElementStore.AREA_ELEMENT, processRemark.getTarget()); assertNotNull(processRemark.getSnippet()); // check number of evidence elements and their value assertEquals(1, processRemark.getElementList().size()); iter = processRemark.getElementList().iterator(); ee = iter.next(); assertTrue(StringUtils.contains(ee.getValue(), "")); assertEquals(ALT_ATTR, ee.getEvidence().getCode()); // ---------------------------------------------------------------------- // ------------------------------3NMI-03--------------------------------- // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-3NMI-03"); // check number of elements in the page assertEquals(1, processResult.getElementCounter()); // check test result assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue()); // check number of remarks and their value assertEquals(1, processResult.getRemarkSet().size()); processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next()); assertEquals( RemarkMessageStore.CHECK_ELEMENT_WITH_NOT_EMPTY_ALT_MSG, processRemark.getMessageCode()); assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue()); assertEquals(HtmlElementStore.AREA_ELEMENT, processRemark.getTarget()); assertNotNull(processRemark.getSnippet()); // check number of evidence elements and their value assertEquals(1, processRemark.getElementList().size()); iter = processRemark.getElementList().iterator(); ee = iter.next(); assertTrue(StringUtils.contains(ee.getValue(), "")); assertEquals(ALT_ATTR, ee.getEvidence().getCode()); // ---------------------------------------------------------------------- // ------------------------------3NMI-04--------------------------------- // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-3NMI-04"); // check number of elements in the page assertEquals(1, processResult.getElementCounter()); // check test result assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue()); // check number of remarks and their value assertEquals(1, processResult.getRemarkSet().size()); processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next()); assertEquals( RemarkMessageStore.CHECK_ELEMENT_WITH_EMPTY_ALT_MSG, processRemark.getMessageCode()); assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue()); assertEquals(HtmlElementStore.AREA_ELEMENT, processRemark.getTarget()); assertNotNull(processRemark.getSnippet()); // check number of evidence elements and their value assertEquals(1, processRemark.getElementList().size()); iter = processRemark.getElementList().iterator(); ee = iter.next(); assertTrue(StringUtils.contains(ee.getValue(), "")); assertEquals(ALT_ATTR, ee.getEvidence().getCode()); // ---------------------------------------------------------------------- // ------------------------------3NMI-05--------------------------------- // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-3NMI-05"); // check number of elements in the page assertEquals(2, processResult.getElementCounter()); // check test result assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue()); // check number of remarks and their value assertEquals(1, processResult.getRemarkSet().size()); processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next()); assertEquals( RemarkMessageStore.CHECK_ELEMENT_WITH_NOT_EMPTY_ALT_MSG, processRemark.getMessageCode()); assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue()); assertEquals(HtmlElementStore.AREA_ELEMENT, processRemark.getTarget()); assertNotNull(processRemark.getSnippet()); // check number of evidence elements and their value assertEquals(1, processRemark.getElementList().size()); iter = processRemark.getElementList().iterator(); ee = iter.next(); assertTrue(StringUtils.contains(ee.getValue(), "")); assertEquals(ALT_ATTR, ee.getEvidence().getCode()); // ---------------------------------------------------------------------- // ------------------------------3NMI-06--------------------------------- // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-3NMI-06"); // check number of elements in the page assertEquals(2, processResult.getElementCounter()); // check test result assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue()); // check number of remarks and their value assertEquals(1, processResult.getRemarkSet().size()); processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next()); assertEquals( RemarkMessageStore.CHECK_ELEMENT_WITH_EMPTY_ALT_MSG, processRemark.getMessageCode()); assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue()); assertEquals(HtmlElementStore.AREA_ELEMENT, processRemark.getTarget()); assertNotNull(processRemark.getSnippet()); // check number of evidence elements and their value assertEquals(1, processRemark.getElementList().size()); iter = processRemark.getElementList().iterator(); ee = iter.next(); assertTrue(StringUtils.contains(ee.getValue(), "")); assertEquals(ALT_ATTR, ee.getEvidence().getCode()); // ---------------------------------------------------------------------- // ------------------------------4NA-01---------------------------------- // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-4NA-01"); // check test result assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue()); // check test has no remark assertNull(processResult.getRemarkSet()); // check number of elements in the page assertEquals(0, processResult.getElementCounter()); // ---------------------------------------------------------------------- // ------------------------------4NA-02---------------------------------- // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-4NA-02"); // check test result assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue()); // check test has no remark assertNull(processResult.getRemarkSet()); // check number of elements in the page assertEquals(0, processResult.getElementCounter()); // ---------------------------------------------------------------------- // ------------------------------4NA-03---------------------------------- // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-4NA-03"); // check test result assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue()); // check test has no remark assertNull(processResult.getRemarkSet()); // check number of elements in the page assertEquals(0, processResult.getElementCounter()); // ---------------------------------------------------------------------- // ------------------------------4NA-04---------------------------------- // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-4NA-04"); // check test result assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue()); // check test has no remark assertNull(processResult.getRemarkSet()); // check number of elements in the page assertEquals(0, processResult.getElementCounter()); // ---------------------------------------------------------------------- // ------------------------------4NA-05---------------------------------- // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-4NA-05"); // check test result assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue()); // check test has no remark assertNull(processResult.getRemarkSet()); // check number of elements in the page assertEquals(0, processResult.getElementCounter()); // ---------------------------------------------------------------------- // ------------------------------4NA-06---------------------------------- // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-4NA-06"); // check test result assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue()); // check test has no remark assertNull(processResult.getRemarkSet()); // check number of elements in the page assertEquals(0, processResult.getElementCounter()); // ---------------------------------------------------------------------- // ------------------------------4NA-07---------------------------------- // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-4NA-07"); // check test result assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue()); // check test has no remark assertNull(processResult.getRemarkSet()); // check number of elements in the page assertEquals(0, processResult.getElementCounter()); // ---------------------------------------------------------------------- // ------------------------------4NA-08---------------------------------- // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-4NA-08"); // check test result assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue()); // check test has no remark assertNull(processResult.getRemarkSet()); // check number of elements in the page assertEquals(0, processResult.getElementCounter()); // ---------------------------------------------------------------------- // ------------------------------4NA-09---------------------------------- // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-4NA-09"); // check test result assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue()); // check test has no remark assertNull(processResult.getRemarkSet()); // check number of elements in the page assertEquals(0, processResult.getElementCounter()); // ---------------------------------------------------------------------- // ------------------------------4NA-10---------------------------------- // ---------------------------------------------------------------------- processResult = processPageTest("AW22.Test.1.2.2-4NA-10"); // check test result assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue()); // check test has no remark assertNull(processResult.getRemarkSet()); // check number of elements in the page assertEquals(0, processResult.getElementCounter()); }
@Override protected void setProcess() { // ---------------------------------------------------------------------- // ------------------------------3NMI-01--------------------------------- // ---------------------------------------------------------------------- ProcessResult processResult = processPageTest("RGAA22.Test.6.1-3NMI-01"); // check number of elements in the page assertEquals(1, processResult.getElementCounter()); // check test result assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue()); // check number of remarks and their value assertEquals(1, processResult.getRemarkSet().size()); SourceCodeRemark processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next()); assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue()); assertEquals(RemarkMessageStore.MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode()); assertEquals(HtmlElementStore.IMG_ELEMENT, processRemark.getTarget()); assertNotNull(processRemark.getSnippet()); // check number of evidence elements and their value assertEquals(1, processRemark.getElementList().size()); EvidenceElement ee = processRemark.getElementList().iterator().next(); assertTrue(StringUtils.contains(ee.getValue(), "mock-image.jpg")); assertEquals(SRC_ATTR, ee.getEvidence().getCode()); // ---------------------------------------------------------------------- // ------------------------------3NMI-02--------------------------------- // ---------------------------------------------------------------------- processResult = processPageTest("RGAA22.Test.6.1-3NMI-02"); // check number of elements in the page assertEquals(1, processResult.getElementCounter()); // check test result assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue()); // check number of remarks and their value assertEquals(1, processResult.getRemarkSet().size()); processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next()); assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue()); assertEquals(RemarkMessageStore.MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode()); assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget()); assertNotNull(processRemark.getSnippet()); // check number of evidence elements and their value assertEquals(1, processRemark.getElementList().size()); ee = processRemark.getElementList().iterator().next(); assertTrue(StringUtils.contains(ee.getValue(), "mock-image.jpg")); assertEquals(SRC_ATTR, ee.getEvidence().getCode()); // ---------------------------------------------------------------------- // ------------------------------4NA-01--------------------------------- // ---------------------------------------------------------------------- processResult = processPageTest("RGAA22.Test.6.1-4NA-01"); // check test result assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue()); // check test has no remark assertNull(processResult.getRemarkSet()); // check number of elements in the page assertEquals(0, processResult.getElementCounter()); // ---------------------------------------------------------------------- // ------------------------------4NA-01---------------------------------- // ---------------------------------------------------------------------- processResult = processPageTest("RGAA22.Test.6.1-4NA-02"); // check test result assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue()); // check test has no remark assertNull(processResult.getRemarkSet()); // check number of elements in the page assertEquals(0, processResult.getElementCounter()); }