Search in sources :

Example 51 with EvidenceElement

use of org.asqatasun.entity.audit.EvidenceElement in project Asqatasun by Asqatasun.

the class Aw22Rule10041Test method setProcess.

@Override
protected void setProcess() {
    //----------------------------------------------------------------------
    //------------------------------1Passed-01------------------------------
    //----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("AW22.Test.10.4.1-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.10.4.1-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.10.4.1-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(2, processResult.getElementCounter());
    //----------------------------------------------------------------------
    //------------------------------1Passed-04------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-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(2, processResult.getElementCounter());
    //----------------------------------------------------------------------
    //------------------------------1Passed-05------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-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(2, processResult.getElementCounter());
    //----------------------------------------------------------------------
    //------------------------------1Passed-06------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-1Passed-06");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(2, processResult.getElementCounter());
    //----------------------------------------------------------------------
    //------------------------------1Passed-07------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-1Passed-07");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(2, processResult.getElementCounter());
    //----------------------------------------------------------------------
    //------------------------------1Passed-08------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-1Passed-08");
    // 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-09------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-1Passed-09");
    // 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-10------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-1Passed-10");
    // 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_1----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-01_1");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pt", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    Iterator<EvidenceElement> iter = processRemark.getElementList().iterator();
    EvidenceElement ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "AW22.Test.10.4.1-2Failed-01_1.css"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-01_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-01_2");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pt", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "AW22.Test.10.4.1-2Failed-01_2_1.css"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-01_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-01_3");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pt", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "AW22.Test.10.4.1-2Failed-01_3.css"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-01_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-01_4");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pt", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-01_5----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-01_5");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pt", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-02_1----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-02_1");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pc", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-02_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-02_2");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pc", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-02_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-02_3");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pc", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-02_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-02_4");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pc", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-02_5----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-02_5");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pc", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-03_1----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-03_1");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("mm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-03_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-03_2");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("mm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-03_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-03_3");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("mm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-03_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-03_4");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("mm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-03_5----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-03_5");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("mm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-04_1----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-04_1");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("cm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-04_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-04_2");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("cm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-04_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-04_3");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("cm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-04_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-04_4");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("cm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-04_5----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-04_5");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("cm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-05_1----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-05_1");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("in", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-05_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-05_2");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("in", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-05_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-05_3");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("in", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-05_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-05_4");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("in", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-05_5----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-05_5");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("in", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_1----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-06_1");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pt", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "AW22.Test.10.4.1-2Failed-06_1.css"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-06_2");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pt", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "AW22.Test.10.4.1-2Failed-06_2.css"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-06_3");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pt", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "AW22.Test.10.4.1-2Failed-06_3.css"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-06_4");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pt", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "AW22.Test.10.4.1-2Failed-06_4.css"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_5----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-06_5");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pt", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "AW22.Test.10.4.1-2Failed-06_5.css"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_6----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-06_6");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pt", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "AW22.Test.10.4.1-2Failed-06_6.css"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_7----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-06_7");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pt", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "AW22.Test.10.4.1-2Failed-06_7.css"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_8----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-06_8");
    // 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(4, processResult.getRemarkSet().size());
    Iterator<SourceCodeRemark> pIter = ((LinkedHashSet) processResult.getRemarkSet()).iterator();
    processRemark = pIter.next();
    assertEquals(RemarkMessageStore.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("in", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "AW22.Test.10.4.1-2Failed-06_8.css"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    processRemark = pIter.next();
    assertEquals(RemarkMessageStore.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("mm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "AW22.Test.10.4.1-2Failed-06_8.css"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    processRemark = pIter.next();
    assertEquals(RemarkMessageStore.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("cm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "AW22.Test.10.4.1-2Failed-06_8.css"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    processRemark = pIter.next();
    assertEquals(RemarkMessageStore.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pt", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "AW22.Test.10.4.1-2Failed-06_8.css"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-07_1----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-07_1");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("in", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("div", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "inline"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-07_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-07_2");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pt", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("div", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "inline"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-07_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-07_3");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("mm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("div", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "inline"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-07_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-07_4");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("cm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("div", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "inline"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-07_5----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.1-2Failed-07_5");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pc", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("div", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "inline"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------4NA-1-----------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.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());
}
Also used : LinkedHashSet(java.util.LinkedHashSet) EvidenceElement(org.asqatasun.entity.audit.EvidenceElement) ProcessResult(org.asqatasun.entity.audit.ProcessResult) SourceCodeRemark(org.asqatasun.entity.audit.SourceCodeRemark)

Example 52 with EvidenceElement

use of org.asqatasun.entity.audit.EvidenceElement in project Asqatasun by Asqatasun.

the class Aw22Rule10042Test method setProcess.

@Override
protected void setProcess() {
    //----------------------------------------------------------------------
    //------------------------------1Passed-01------------------------------
    //----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("AW22.Test.10.4.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.10.4.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.10.4.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(2, processResult.getElementCounter());
    //----------------------------------------------------------------------
    //------------------------------1Passed-04------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.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(2, processResult.getElementCounter());
    //----------------------------------------------------------------------
    //------------------------------1Passed-05------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.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(2, processResult.getElementCounter());
    //----------------------------------------------------------------------
    //------------------------------1Passed-06------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-1Passed-06");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(2, processResult.getElementCounter());
    //----------------------------------------------------------------------
    //------------------------------1Passed-07------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-1Passed-07");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(2, processResult.getElementCounter());
    //----------------------------------------------------------------------
    //------------------------------1Passed-08------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-1Passed-08");
    // 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-09------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-1Passed-09");
    // 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-10------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-1Passed-10");
    // 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_1----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-01_1");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pt", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    Iterator<EvidenceElement> iter = processRemark.getElementList().iterator();
    EvidenceElement ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "AW22.Test.10.4.2-2Failed-01_1.css"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-01_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-01_2");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pt", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "AW22.Test.10.4.2-2Failed-01_2_1.css"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-01_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-01_3");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pt", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "AW22.Test.10.4.2-2Failed-01_3.css"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-01_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-01_4");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pt", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-01_5----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-01_5");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pt", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-02_1----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-02_1");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pc", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-02_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-02_2");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pc", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-02_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-02_3");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pc", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-02_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-02_4");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pc", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-02_5----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-02_5");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pc", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-03_1----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-03_1");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("mm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-03_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-03_2");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("mm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-03_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-03_3");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("mm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-03_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-03_4");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("mm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-03_5----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-03_5");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("mm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-04_1----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-04_1");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("cm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-04_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-04_2");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("cm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-04_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-04_3");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("cm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-04_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-04_4");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("cm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-04_5----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-04_5");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("cm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-05_1----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-05_1");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("in", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-05_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-05_2");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("in", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-05_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-05_3");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("in", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-05_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-05_4");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("in", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-05_5----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-05_5");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("in", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("h1", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "locale"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_1----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-06_1");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("in", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("div", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "inline"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-06_2");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pt", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("div", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "inline"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-06_3");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("mm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("div", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "inline"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-06_4");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("cm", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("div", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "inline"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_5----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.2-2Failed-06_5");
    // 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.BAD_UNIT_TYPE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals("pc", processRemark.getTarget());
    assertNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    iter = processRemark.getElementList().iterator();
    ee = iter.next();
    assertEquals("div", ee.getValue());
    assertEquals(EvidenceStore.CSS_SELECTOR_EE, ee.getEvidence().getCode());
    ee = iter.next();
    assertTrue(StringUtils.contains(ee.getValue(), "inline"));
    assertEquals(EvidenceStore.CSS_FILENAME_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------4NA-1-----------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.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-2-----------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.10.4.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());
}
Also used : LinkedHashSet(java.util.LinkedHashSet) EvidenceElement(org.asqatasun.entity.audit.EvidenceElement) ProcessResult(org.asqatasun.entity.audit.ProcessResult) SourceCodeRemark(org.asqatasun.entity.audit.SourceCodeRemark)

Example 53 with EvidenceElement

use of org.asqatasun.entity.audit.EvidenceElement in project Asqatasun by Asqatasun.

the class Aw22Rule08041Test method setProcess.

@Override
protected void setProcess() {
    //----------------------------------------------------------------------
    //---------------------------1Passed-01---------------------------------
    //----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("AW22.Test.8.4.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.4.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.4.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());
    //----------------------------------------------------------------------
    //---------------------------2Failed-01---------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.8.4.1-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(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(RemarkMessageStore.WRONG_LANGUAGE_DECLARATION_MSG, processRemark.getMessageCode());
    assertEquals(HtmlElementStore.HTML_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("aq", ee.getValue());
    assertEquals(EvidenceStore.LANGUAGE_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //---------------------------2Failed-02---------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.8.4.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.HTML_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.4.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.HTML_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("en-U", ee.getValue());
    assertEquals(EvidenceStore.LANGUAGE_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //---------------------------2Failed-04---------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.8.4.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.HTML_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("english", ee.getValue());
    assertEquals(EvidenceStore.LANGUAGE_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //---------------------------2Failed-05---------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.8.4.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.IRRELEVANT_LANG_DECL_MSG, processRemark.getMessageCode());
    assertEquals(HtmlElementStore.HTML_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(3, processRemark.getElementList().size());
    pIter = processRemark.getElementList().iterator();
    ee = pIter.next();
    assertEquals("ro", ee.getValue());
    assertEquals(EvidenceStore.LANGUAGE_EE, ee.getEvidence().getCode());
    ee = pIter.next();
    assertEquals("en", ee.getValue());
    assertEquals(EvidenceStore.DETECTED_LANGUAGE_EE, ee.getEvidence().getCode());
    ee = pIter.next();
    assertTrue(ee.getValue().contains("AW22 Test.8.4.1 Failed 05 AW22 Test.8.4.1 Failed 05 Failed : the default language is defined on the html tag but its"));
    assertEquals(EvidenceStore.EXTRACTED_TEXT_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //---------------------------2Failed-06---------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.8.4.1-2Failed-06");
    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.HTML_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("en;US", ee.getValue());
    assertEquals(EvidenceStore.LANGUAGE_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //---------------------------3NMI-01------------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.8.4.1-3NMI-01");
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // 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.SUSPECTED_IRRELEVANT_LANG_DECL_MSG, processRemark.getMessageCode());
    assertEquals(HtmlElementStore.HTML_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    // check number of evidence elements and their value
    assertEquals(3, processRemark.getElementList().size());
    pIter = processRemark.getElementList().iterator();
    ee = pIter.next();
    assertEquals("de", ee.getValue());
    assertEquals(EvidenceStore.LANGUAGE_EE, ee.getEvidence().getCode());
    ee = pIter.next();
    assertEquals("en", ee.getValue());
    assertEquals(EvidenceStore.DETECTED_LANGUAGE_EE, ee.getEvidence().getCode());
    ee = pIter.next();
    assertTrue(ee.getValue().contains("AW22 Test.8.4.1 NMI 01 AW22 Test.8.4.1 NMI 01"));
    assertEquals(EvidenceStore.EXTRACTED_TEXT_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //---------------------------3NMI-02------------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.8.4.1-3NMI-02");
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // 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.SUSPECTED_RELEVANT_LANG_DECL_MSG, processRemark.getMessageCode());
    assertEquals(HtmlElementStore.HTML_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(3, processRemark.getElementList().size());
    pIter = processRemark.getElementList().iterator();
    ee = pIter.next();
    assertEquals("en", ee.getValue());
    assertEquals(EvidenceStore.LANGUAGE_EE, ee.getEvidence().getCode());
    ee = pIter.next();
    assertEquals("en", ee.getValue());
    assertEquals(EvidenceStore.DETECTED_LANGUAGE_EE, ee.getEvidence().getCode());
    ee = pIter.next();
    assertTrue(ee.getValue().contains("Some short text in english"));
    assertEquals(EvidenceStore.EXTRACTED_TEXT_EE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //---------------------------4NA-01-------------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.8.4.1-4NA-01");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
}
Also used : LinkedHashSet(java.util.LinkedHashSet) EvidenceElement(org.asqatasun.entity.audit.EvidenceElement) ProcessResult(org.asqatasun.entity.audit.ProcessResult) SourceCodeRemark(org.asqatasun.entity.audit.SourceCodeRemark)

Example 54 with EvidenceElement

use of org.asqatasun.entity.audit.EvidenceElement in project Asqatasun by Asqatasun.

the class Aw22Rule08061Test method setProcess.

@Override
protected void setProcess() {
    //----------------------------------------------------------------------
    //------------------------------2Failed-01------------------------------
    //----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("AW22.Test.8.6.1-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(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(RemarkMessageStore.NOT_PERTINENT_TITLE_MSG, processRemark.getMessageCode());
    assertEquals(HtmlElementStore.TITLE_ELEMENT, processRemark.getTarget());
    // check number of evidence elements and their value
    assertEquals(1, processRemark.getElementList().size());
    Iterator<EvidenceElement> pIter = processRemark.getElementList().iterator();
    EvidenceElement ee = pIter.next();
    assertEquals("Page title", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-02------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.8.6.1-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(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(RemarkMessageStore.NOT_PERTINENT_TITLE_MSG, processRemark.getMessageCode());
    assertEquals(HtmlElementStore.TITLE_ELEMENT, processRemark.getTarget());
    // check number of evidence elements and their value
    assertEquals(1, processRemark.getElementList().size());
    pIter = processRemark.getElementList().iterator();
    ee = pIter.next();
    assertEquals("", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-03------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.8.6.1-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(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(RemarkMessageStore.NOT_PERTINENT_TITLE_MSG, processRemark.getMessageCode());
    assertEquals(HtmlElementStore.TITLE_ELEMENT, processRemark.getTarget());
    // check number of evidence elements and their value
    assertEquals(1, processRemark.getElementList().size());
    pIter = processRemark.getElementList().iterator();
    ee = pIter.next();
    assertEquals("Bienvenue dans Adobe GoLive 6", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------3NMI-01------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.8.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());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(RemarkMessageStore.CHECK_TITLE_PERTINENCE_MSG, processRemark.getMessageCode());
    assertEquals(HtmlElementStore.TITLE_ELEMENT, processRemark.getTarget());
    // check number of evidence elements and their value
    assertEquals(1, processRemark.getElementList().size());
    pIter = processRemark.getElementList().iterator();
    ee = pIter.next();
    assertEquals("AW22 Test.8.6.1 NMI 01", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------4NA-01----------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.8.6.1-4NA-01");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
}
Also used : LinkedHashSet(java.util.LinkedHashSet) EvidenceElement(org.asqatasun.entity.audit.EvidenceElement) ProcessResult(org.asqatasun.entity.audit.ProcessResult) SourceCodeRemark(org.asqatasun.entity.audit.SourceCodeRemark)

Example 55 with EvidenceElement

use of org.asqatasun.entity.audit.EvidenceElement in project Asqatasun by Asqatasun.

the class Aw22Rule09014Test method setProcess.

@Override
protected void setProcess() {
    //----------------------------------------------------------------------
    //------------------------------2Failed-01------------------------------
    //----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("AW22.Test.9.1.4-2Failed-01");
    // check number of elements in the page
    assertEquals(19, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(19, processResult.getRemarkSet().size());
    Iterator<SourceCodeRemark> iter = ((LinkedHashSet) processResult.getRemarkSet()).iterator();
    //----------------------------------------------------------------------
    SourceCodeRemark processRemark = iter.next();
    assertEquals(RemarkMessageStore.CHECK_HEADING_PERTINENCE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.H1_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    Iterator<EvidenceElement> eIter = processRemark.getElementList().iterator();
    EvidenceElement ee = eIter.next();
    assertEquals("Aw22 Test.9.1.4 Failed 01", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.NOT_PERTINENT_HEADING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.H1_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertTrue(StringUtils.isEmpty(ee.getValue()));
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.NOT_PERTINENT_HEADING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.H1_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertEquals("!:;,&~$*/-*/-*", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.NOT_PERTINENT_HEADING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.H1_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertTrue(StringUtils.isEmpty(ee.getValue()));
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.NOT_PERTINENT_HEADING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.H2_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertTrue(StringUtils.isEmpty(ee.getValue()));
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.NOT_PERTINENT_HEADING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.H2_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertEquals("!:;,&~$*/-*/-*", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.NOT_PERTINENT_HEADING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.H2_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertTrue(StringUtils.isEmpty(ee.getValue()));
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.NOT_PERTINENT_HEADING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.H3_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertTrue(StringUtils.isEmpty(ee.getValue()));
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.NOT_PERTINENT_HEADING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.H3_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertEquals("!:;,&~$*/-*/-*", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.NOT_PERTINENT_HEADING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.H3_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertTrue(StringUtils.isEmpty(ee.getValue()));
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.NOT_PERTINENT_HEADING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.H4_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertTrue(StringUtils.isEmpty(ee.getValue()));
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.NOT_PERTINENT_HEADING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.H4_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertEquals("!:;,&~$*/-*/-*", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.NOT_PERTINENT_HEADING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.H4_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertTrue(StringUtils.isEmpty(ee.getValue()));
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.NOT_PERTINENT_HEADING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.H5_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertTrue(StringUtils.isEmpty(ee.getValue()));
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.NOT_PERTINENT_HEADING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.H5_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertEquals("!:;,&~$*/-*/-*", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.NOT_PERTINENT_HEADING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.H5_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertTrue(StringUtils.isEmpty(ee.getValue()));
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.NOT_PERTINENT_HEADING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.H6_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertTrue(StringUtils.isEmpty(ee.getValue()));
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.NOT_PERTINENT_HEADING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.H6_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertEquals("!:;,&~$*/-*/-*", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.NOT_PERTINENT_HEADING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.H6_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertTrue(StringUtils.isEmpty(ee.getValue()));
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------3NMI-01---------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.9.1.4-3NMI-01");
    // check number of elements in the page
    assertEquals(13, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // check number of remarks and their value
    assertEquals(13, processResult.getRemarkSet().size());
    iter = ((LinkedHashSet) processResult.getRemarkSet()).iterator();
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.CHECK_HEADING_PERTINENCE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.H1_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertEquals("Aw22 Test.9.1.4 NMI 01", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.CHECK_HEADING_PERTINENCE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.H1_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertEquals("Title level 1-1", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.CHECK_HEADING_PERTINENCE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.H1_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertEquals("Title level 1-2", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.CHECK_HEADING_PERTINENCE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.H2_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertEquals("Title level 2-1", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.CHECK_HEADING_PERTINENCE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.H2_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertEquals("Title level 2-2", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.CHECK_HEADING_PERTINENCE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.H3_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertEquals("Title level 3-1", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.CHECK_HEADING_PERTINENCE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.H3_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertEquals("Title level 3-2", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.CHECK_HEADING_PERTINENCE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.H4_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertEquals("Title level 4-1", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.CHECK_HEADING_PERTINENCE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.H4_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertEquals("Title level 4-2", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.CHECK_HEADING_PERTINENCE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.H5_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertEquals("Title level 5-1", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.CHECK_HEADING_PERTINENCE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.H5_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertEquals("Title level 5-2", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.CHECK_HEADING_PERTINENCE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.H6_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertEquals("Title level 6-1", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    processRemark = iter.next();
    assertEquals(RemarkMessageStore.CHECK_HEADING_PERTINENCE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.H6_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(2, processRemark.getElementList().size());
    eIter = processRemark.getElementList().iterator();
    ee = eIter.next();
    assertEquals("Title level 6-2", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    ee = eIter.next();
    assertEquals("headings", ee.getValue());
    assertEquals(ProcessRemarkService.DEFAULT_EVIDENCE, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------4NA-01----------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.9.1.4-4NA-01");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
}
Also used : LinkedHashSet(java.util.LinkedHashSet) EvidenceElement(org.asqatasun.entity.audit.EvidenceElement) ProcessResult(org.asqatasun.entity.audit.ProcessResult) SourceCodeRemark(org.asqatasun.entity.audit.SourceCodeRemark)

Aggregations

EvidenceElement (org.asqatasun.entity.audit.EvidenceElement)68 ProcessResult (org.asqatasun.entity.audit.ProcessResult)53 SourceCodeRemark (org.asqatasun.entity.audit.SourceCodeRemark)53 LinkedHashSet (java.util.LinkedHashSet)22 ProcessRemark (org.asqatasun.entity.audit.ProcessRemark)4 ArrayList (java.util.ArrayList)3 DomElement (org.asqatasun.rules.domelement.DomElement)2 Element (org.jsoup.nodes.Element)2 CascadingStyleSheet (com.phloc.css.decl.CascadingStyleSheet)1 File (java.io.File)1 IOException (java.io.IOException)1 CSSParserExceptionHandlerImpl (org.asqatasun.contentadapter.css.CSSParserExceptionHandlerImpl)1 StylesheetContent (org.asqatasun.entity.audit.StylesheetContent)1 TestSolution (org.asqatasun.entity.audit.TestSolution)1 ContrastCheckerParseResultException (org.asqatasun.rules.elementchecker.contrast.exception.ContrastCheckerParseResultException)1