Search in sources :

Example 16 with ProcessResult

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

the class Rgaa22Rule11091Test method setProcess.

@Override
protected void setProcess() {
    //----------------------------------------------------------------------
    //------------------------------2Failed-01------------------------------
    //----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("Rgaa22.Test.11.9-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_CAPTION_MSG, processRemark.getMessageCode());
    assertTrue(processRemark.getTarget().equalsIgnoreCase(HtmlElementStore.CAPTION_ELEMENT));
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(1, processRemark.getElementList().size());
    EvidenceElement ee = processRemark.getElementList().iterator().next();
    assertEquals("", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-02------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa22.Test.11.9-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_CAPTION_MSG, processRemark.getMessageCode());
    assertTrue(processRemark.getTarget().equalsIgnoreCase(HtmlElementStore.CAPTION_ELEMENT));
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(1, processRemark.getElementList().size());
    ee = processRemark.getElementList().iterator().next();
    assertEquals("!:;,--><--", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------2Failed-03------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa22.Test.11.9-2Failed-03");
    // check number of elements in the page
    assertEquals(4, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(4, processResult.getRemarkSet().size());
    Iterator<ProcessRemark> iter = processResult.getRemarkSet().iterator();
    processRemark = (SourceCodeRemark) iter.next();
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(RemarkMessageStore.NOT_PERTINENT_CAPTION_MSG, processRemark.getMessageCode());
    assertTrue(processRemark.getTarget().equalsIgnoreCase(HtmlElementStore.CAPTION_ELEMENT));
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(1, processRemark.getElementList().size());
    ee = processRemark.getElementList().iterator().next();
    assertEquals("!:;,--><--", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    processRemark = (SourceCodeRemark) iter.next();
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(RemarkMessageStore.CHECK_CAPTION_PERTINENCE_FOR_DATA_TABLE_MSG, processRemark.getMessageCode());
    assertTrue(processRemark.getTarget().equalsIgnoreCase(HtmlElementStore.CAPTION_ELEMENT));
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(1, processRemark.getElementList().size());
    ee = processRemark.getElementList().iterator().next();
    assertEquals("Caption of data table", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    processRemark = (SourceCodeRemark) iter.next();
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(RemarkMessageStore.CHECK_NATURE_OF_TABLE_FOR_NOT_PERTINENT_CAPTION_MSG, processRemark.getMessageCode());
    assertTrue(processRemark.getTarget().equalsIgnoreCase(HtmlElementStore.CAPTION_ELEMENT));
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(1, processRemark.getElementList().size());
    ee = processRemark.getElementList().iterator().next();
    assertEquals("", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    processRemark = (SourceCodeRemark) iter.next();
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(RemarkMessageStore.CHECK_NATURE_OF_TABLE_AND_CAPTION_PERTINENCE_MSG, processRemark.getMessageCode());
    assertTrue(processRemark.getTarget().equalsIgnoreCase(HtmlElementStore.CAPTION_ELEMENT));
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(1, processRemark.getElementList().size());
    ee = processRemark.getElementList().iterator().next();
    assertEquals("Caption of unidentified table", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------3NMI-01--------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa22.Test.11.9-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_NATURE_OF_TABLE_AND_CAPTION_PERTINENCE_MSG, processRemark.getMessageCode());
    assertTrue(processRemark.getTarget().equalsIgnoreCase(HtmlElementStore.CAPTION_ELEMENT));
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(1, processRemark.getElementList().size());
    ee = processRemark.getElementList().iterator().next();
    assertEquals("Title of the test table", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------3NMI-02--------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa22.Test.11.9-3NMI-02");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(RemarkMessageStore.CHECK_CAPTION_PERTINENCE_FOR_DATA_TABLE_MSG, processRemark.getMessageCode());
    assertTrue(processRemark.getTarget().equalsIgnoreCase(HtmlElementStore.CAPTION_ELEMENT));
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(1, processRemark.getElementList().size());
    ee = processRemark.getElementList().iterator().next();
    assertEquals("Caption of data table", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------3NMI-03--------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa22.Test.11.9-3NMI-03");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(RemarkMessageStore.CHECK_NATURE_OF_TABLE_FOR_NOT_PERTINENT_CAPTION_MSG, processRemark.getMessageCode());
    assertTrue(processRemark.getTarget().equalsIgnoreCase(HtmlElementStore.CAPTION_ELEMENT));
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(1, processRemark.getElementList().size());
    ee = processRemark.getElementList().iterator().next();
    assertEquals("", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------3NMI-04---------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa22.Test.11.9-3NMI-04");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(RemarkMessageStore.CHECK_NATURE_OF_TABLE_AND_CAPTION_PERTINENCE_MSG, processRemark.getMessageCode());
    assertTrue(processRemark.getTarget().equalsIgnoreCase(HtmlElementStore.CAPTION_ELEMENT));
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(1, processRemark.getElementList().size());
    ee = processRemark.getElementList().iterator().next();
    assertEquals("Caption of unidentified table", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------3NMI-05------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa22.Test.11.9-3NMI-05");
    // check number of elements in the page
    assertEquals(3, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // check number of remarks and their value
    assertEquals(3, processResult.getRemarkSet().size());
    iter = processResult.getRemarkSet().iterator();
    processRemark = (SourceCodeRemark) iter.next();
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(RemarkMessageStore.CHECK_CAPTION_PERTINENCE_FOR_DATA_TABLE_MSG, processRemark.getMessageCode());
    assertTrue(processRemark.getTarget().equalsIgnoreCase(HtmlElementStore.CAPTION_ELEMENT));
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(1, processRemark.getElementList().size());
    ee = processRemark.getElementList().iterator().next();
    assertEquals("Caption of data table", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    processRemark = (SourceCodeRemark) iter.next();
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(RemarkMessageStore.CHECK_NATURE_OF_TABLE_FOR_NOT_PERTINENT_CAPTION_MSG, processRemark.getMessageCode());
    assertTrue(processRemark.getTarget().equalsIgnoreCase(HtmlElementStore.CAPTION_ELEMENT));
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(1, processRemark.getElementList().size());
    ee = processRemark.getElementList().iterator().next();
    assertEquals("", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    processRemark = (SourceCodeRemark) iter.next();
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(RemarkMessageStore.CHECK_NATURE_OF_TABLE_AND_CAPTION_PERTINENCE_MSG, processRemark.getMessageCode());
    assertTrue(processRemark.getTarget().equalsIgnoreCase(HtmlElementStore.CAPTION_ELEMENT));
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertEquals(1, processRemark.getElementList().size());
    ee = processRemark.getElementList().iterator().next();
    assertEquals("Caption of unidentified table", ee.getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, ee.getEvidence().getCode());
    //----------------------------------------------------------------------
    //------------------------------4NA-01------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa22.Test.11.9-4NA-01");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(0, processResult.getElementCounter());
    //----------------------------------------------------------------------
    //------------------------------4NA-02------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa22.Test.11.9-4NA-02");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(0, processResult.getElementCounter());
    //----------------------------------------------------------------------
    //------------------------------4NA-03----------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa22.Test.11.9-4NA-03");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(0, processResult.getElementCounter());
    //----------------------------------------------------------------------
    //------------------------------4NA-04----------------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa22.Test.11.9-4NA-04");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(0, processResult.getElementCounter());
}
Also used : LinkedHashSet(java.util.LinkedHashSet) EvidenceElement(org.asqatasun.entity.audit.EvidenceElement) ProcessResult(org.asqatasun.entity.audit.ProcessResult) SourceCodeRemark(org.asqatasun.entity.audit.SourceCodeRemark) ProcessRemark(org.asqatasun.entity.audit.ProcessRemark)

Example 17 with ProcessResult

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

the class Rgaa30Rule100401Test method setProcess.

@Override
protected void setProcess() {
    //----------------------------------------------------------------------
    //------------------------------1Passed-01------------------------------
    //----------------------------------------------------------------------
    checkResultIsPassed(processPageTest("Rgaa30.Test.10.04.01-1Passed-01"), 1);
    //----------------------------------------------------------------------
    //------------------------------1Passed-02------------------------------
    //----------------------------------------------------------------------
    checkResultIsPassed(processPageTest("Rgaa30.Test.10.04.01-1Passed-02"), 1);
    //----------------------------------------------------------------------
    //------------------------------1Passed-03------------------------------
    //----------------------------------------------------------------------
    checkResultIsPassed(processPageTest("Rgaa30.Test.10.04.01-1Passed-03"), 2);
    //----------------------------------------------------------------------
    //------------------------------1Passed-04------------------------------
    //----------------------------------------------------------------------
    checkResultIsPassed(processPageTest("Rgaa30.Test.10.04.01-1Passed-04"), 2);
    //----------------------------------------------------------------------
    //------------------------------1Passed-05------------------------------
    //----------------------------------------------------------------------
    checkResultIsPassed(processPageTest("Rgaa30.Test.10.04.01-1Passed-05"), 2);
    //----------------------------------------------------------------------
    //------------------------------1Passed-06------------------------------
    //----------------------------------------------------------------------
    checkResultIsPassed(processPageTest("Rgaa30.Test.10.04.01-1Passed-06"), 2);
    //----------------------------------------------------------------------
    //------------------------------1Passed-07------------------------------
    //----------------------------------------------------------------------
    checkResultIsPassed(processPageTest("Rgaa30.Test.10.04.01-1Passed-07"), 2);
    //----------------------------------------------------------------------
    //------------------------------1Passed-08------------------------------
    //----------------------------------------------------------------------
    checkResultIsPassed(processPageTest("Rgaa30.Test.10.04.01-1Passed-08"), 1);
    //----------------------------------------------------------------------
    //------------------------------1Passed-09------------------------------
    //----------------------------------------------------------------------
    checkResultIsPassed(processPageTest("Rgaa30.Test.10.04.01-1Passed-09"), 1);
    //----------------------------------------------------------------------
    //------------------------------1Passed-10------------------------------
    //----------------------------------------------------------------------
    checkResultIsPassed(processPageTest("Rgaa30.Test.10.04.01-1Passed-10"), 1);
    //----------------------------------------------------------------------
    //------------------------------2Failed-01_1----------------------------
    //----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-01_1");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pt", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "Rgaa30.Test.10.04.01-2Failed-01_1.css"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-01_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-01_2");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pt", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "Rgaa30.Test.10.04.01-2Failed-01_2_1.css"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-01_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-01_3");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pt", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "Rgaa30.Test.10.04.01-2Failed-01_3.css"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-01_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-01_4");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pt", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-01_5----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-01_5");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pt", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-02_1----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-02_1");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pc", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-02_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-02_2");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pc", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-02_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-02_3");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pc", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-02_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-02_4");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pc", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-02_5----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-02_5");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pc", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-03_1----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-03_1");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "mm", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-03_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-03_2");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "mm", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-03_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-03_3");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "mm", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-03_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-03_4");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "mm", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-03_5----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-03_5");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "mm", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-04_1----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-04_1");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "cm", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-04_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-04_2");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "cm", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-04_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-04_3");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "cm", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-04_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-04_4");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "cm", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-04_5----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-04_5");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "cm", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-05_1----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-05_1");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "in", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-05_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-05_2");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "in", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-05_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-05_3");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "in", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-05_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-05_4");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "in", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-05_5----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-05_5");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "in", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_1----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-06_1");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pt", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "Rgaa30.Test.10.04.01-2Failed-06_1.css"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-06_2");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pt", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "Rgaa30.Test.10.04.01-2Failed-06_2.css"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-06_3");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pt", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "Rgaa30.Test.10.04.01-2Failed-06_3.css"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-06_4");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pt", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "Rgaa30.Test.10.04.01-2Failed-06_4.css"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_5----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-06_5");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pt", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "Rgaa30.Test.10.04.01-2Failed-06_5.css"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_6----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-06_6");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pt", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "Rgaa30.Test.10.04.01-2Failed-06_6.css"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_7----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-06_7");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pt", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "Rgaa30.Test.10.04.01-2Failed-06_7.css"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_8----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-06_8");
    checkResultIsFailed(processResult, 1, 4);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "in", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "Rgaa30.Test.10.04.01-2Failed-06_8.css"));
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "mm", 2, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "Rgaa30.Test.10.04.01-2Failed-06_8.css"));
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "cm", 3, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "Rgaa30.Test.10.04.01-2Failed-06_8.css"));
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pt", 4, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "Rgaa30.Test.10.04.01-2Failed-06_8.css"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-07_1----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-07_1");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "in", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "div"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "inline"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-07_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-07_2");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pt", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "div"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "inline"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-07_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-07_3");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "mm", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "div"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "inline"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-07_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-07_4");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "cm", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "div"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "inline"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-07_5----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.01-2Failed-07_5");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pc", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "div"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "inline"));
    //----------------------------------------------------------------------
    //------------------------------4NA-1-----------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa30.Test.10.04.01-4NA-01"));
}
Also used : ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) ProcessResult(org.asqatasun.entity.audit.ProcessResult)

Example 18 with ProcessResult

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

the class Rgaa30Rule100402Test method setProcess.

@Override
protected void setProcess() {
    //----------------------------------------------------------------------
    //------------------------------1Passed-01------------------------------
    //----------------------------------------------------------------------
    checkResultIsPassed(processPageTest("Rgaa30.Test.10.04.02-1Passed-01"), 1);
    //----------------------------------------------------------------------
    //------------------------------1Passed-02------------------------------
    //----------------------------------------------------------------------
    checkResultIsPassed(processPageTest("Rgaa30.Test.10.04.02-1Passed-02"), 1);
    //----------------------------------------------------------------------
    //------------------------------1Passed-03------------------------------
    //----------------------------------------------------------------------
    checkResultIsPassed(processPageTest("Rgaa30.Test.10.04.02-1Passed-03"), 2);
    //----------------------------------------------------------------------
    //------------------------------1Passed-04------------------------------
    //----------------------------------------------------------------------
    checkResultIsPassed(processPageTest("Rgaa30.Test.10.04.02-1Passed-04"), 2);
    //----------------------------------------------------------------------
    //------------------------------1Passed-05------------------------------
    //----------------------------------------------------------------------
    checkResultIsPassed(processPageTest("Rgaa30.Test.10.04.02-1Passed-05"), 2);
    //----------------------------------------------------------------------
    //------------------------------1Passed-06------------------------------
    //----------------------------------------------------------------------
    checkResultIsPassed(processPageTest("Rgaa30.Test.10.04.02-1Passed-06"), 2);
    //----------------------------------------------------------------------
    //------------------------------1Passed-07------------------------------
    //----------------------------------------------------------------------
    checkResultIsPassed(processPageTest("Rgaa30.Test.10.04.02-1Passed-07"), 2);
    //----------------------------------------------------------------------
    //------------------------------1Passed-08------------------------------
    //----------------------------------------------------------------------
    checkResultIsPassed(processPageTest("Rgaa30.Test.10.04.02-1Passed-08"), 1);
    //----------------------------------------------------------------------
    //------------------------------1Passed-09------------------------------
    //----------------------------------------------------------------------
    checkResultIsPassed(processPageTest("Rgaa30.Test.10.04.02-1Passed-09"), 1);
    //----------------------------------------------------------------------
    //------------------------------1Passed-10------------------------------
    //----------------------------------------------------------------------
    checkResultIsPassed(processPageTest("Rgaa30.Test.10.04.02-1Passed-10"), 1);
    //----------------------------------------------------------------------
    //------------------------------2Failed-01_1----------------------------
    //----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-01_1");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pt", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "Rgaa30.Test.10.04.02-2Failed-01_1.css"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-01_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-01_2");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pt", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "Rgaa30.Test.10.04.02-2Failed-01_2_1.css"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-01_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-01_3");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pt", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "Rgaa30.Test.10.04.02-2Failed-01_3.css"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-01_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-01_4");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pt", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-02_1----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-02_1");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pc", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-02_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-02_2");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pc", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-02_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-02_3");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pc", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-02_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-02_4");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pc", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-02_5----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-02_5");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pc", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-03_1----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-03_1");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "mm", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-03_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-03_2");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "mm", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-03_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-03_3");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "mm", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-03_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-03_4");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "mm", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-04_1----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-04_1");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "cm", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-04_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-04_4");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "cm", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-05_1----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-05_1");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "in", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-05_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-05_2");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "in", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-05_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-05_3");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "in", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-05_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-05_4");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "in", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-05_5----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-05_5");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "in", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "h1"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "locale"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_1----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-06_1");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "in", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "div"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "inline"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_2----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-06_2");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pt", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "div"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "inline"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_3----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-06_3");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "mm", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "div"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "inline"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_4----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-06_4");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "cm", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "div"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "inline"));
    //----------------------------------------------------------------------
    //------------------------------2Failed-06_5----------------------------
    //----------------------------------------------------------------------
    processResult = processPageTest("Rgaa30.Test.10.04.02-2Failed-06_5");
    checkResultIsFailed(processResult, 1, 1);
    checkRemarkIsPresent(processResult, TestSolution.FAILED, RemarkMessageStore.BAD_UNIT_TYPE_MSG, "pc", 1, true, new ImmutablePair(EvidenceStore.CSS_SELECTOR_EE, "div"), new ImmutablePair(EvidenceStore.CSS_FILENAME_EE, "inline"));
    //----------------------------------------------------------------------
    //------------------------------4NA-1-----------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa30.Test.10.04.02-4NA-01"));
    //----------------------------------------------------------------------
    //------------------------------4NA-2-----------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa30.Test.10.04.02-4NA-02"));
    //----------------------------------------------------------------------
    //------------------------------4NA-3-----------------------------------
    //----------------------------------------------------------------------
    checkResultIsNotApplicable(processPageTest("Rgaa30.Test.10.04.02-4NA-03"));
}
Also used : ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) ProcessResult(org.asqatasun.entity.audit.ProcessResult)

Example 19 with ProcessResult

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

the class Rgaa30Rule100403Test method setProcess.

@Override
protected void setProcess() {
    //----------------------------------------------------------------------
    //------------------------------1Passed-01------------------------------
    //----------------------------------------------------------------------
    //        checkResultIsPassed(processPageTest("Rgaa30.Test.10.4.3-1Passed-01"), 1);
    //----------------------------------------------------------------------
    //------------------------------2Failed-01------------------------------
    //----------------------------------------------------------------------
    //        ProcessResult processResult = processPageTest("Rgaa30.Test.10.4.3-2Failed-01");
    //        checkResultIsFailed(processResult, 1, 1);
    //        checkRemarkIsPresent(
    //                processResult,
    //                TestSolution.FAILED,
    //                "#MessageHere",
    //                "#CurrentElementHere",
    //                1,
    //                new ImmutablePair("#ExtractedAttributeAsEvidence", "#ExtractedAttributeValue"));
    //----------------------------------------------------------------------
    //------------------------------3NMI-01---------------------------------
    //----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("Rgaa30.Test.10.4.3-3NMI-01");
    // temporary result to make the result buildable before implementation
    checkResultIsNotTested(processResult);
//        checkResultIsPreQualified(processResult, 2, 1);
//        checkRemarkIsPresent(
//                processResult,
//                TestSolution.NEED_MORE_INFO,
//                "#MessageHere",
//                "#CurrentElementHere",
//                1,
//                new ImmutablePair("#ExtractedAttributeAsEvidence", "#ExtractedAttributeValue"));
//----------------------------------------------------------------------
//------------------------------4NA-01------------------------------
//----------------------------------------------------------------------
//        checkResultIsNotApplicable(processPageTest("Rgaa30.Test.10.4.3-4NA-01"));
}
Also used : ProcessResult(org.asqatasun.entity.audit.ProcessResult)

Example 20 with ProcessResult

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

the class Rgaa30Rule101202Test method setProcess.

@Override
protected void setProcess() {
    //----------------------------------------------------------------------
    //------------------------------1Passed-01------------------------------
    //----------------------------------------------------------------------
    //        checkResultIsPassed(processPageTest("Rgaa30.Test.10.12.2-1Passed-01"), 1);
    //----------------------------------------------------------------------
    //------------------------------2Failed-01------------------------------
    //----------------------------------------------------------------------
    //        ProcessResult processResult = processPageTest("Rgaa30.Test.10.12.2-2Failed-01");
    //        checkResultIsFailed(processResult, 1, 1);
    //        checkRemarkIsPresent(
    //                processResult,
    //                TestSolution.FAILED,
    //                "#MessageHere",
    //                "#CurrentElementHere",
    //                1,
    //                new ImmutablePair("#ExtractedAttributeAsEvidence", "#ExtractedAttributeValue"));
    //----------------------------------------------------------------------
    //------------------------------3NMI-01---------------------------------
    //----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("Rgaa30.Test.10.12.2-3NMI-01");
    // temporary result to make the result buildable before implementation
    checkResultIsNotTested(processResult);
//        checkResultIsPreQualified(processResult, 2, 1);
//        checkRemarkIsPresent(
//                processResult,
//                TestSolution.NEED_MORE_INFO,
//                "#MessageHere",
//                "#CurrentElementHere",
//                1,
//                new ImmutablePair("#ExtractedAttributeAsEvidence", "#ExtractedAttributeValue"));
//----------------------------------------------------------------------
//------------------------------4NA-01------------------------------
//----------------------------------------------------------------------
//        checkResultIsNotApplicable(processPageTest("Rgaa30.Test.10.12.2-4NA-01"));
}
Also used : ProcessResult(org.asqatasun.entity.audit.ProcessResult)

Aggregations

ProcessResult (org.asqatasun.entity.audit.ProcessResult)856 SourceCodeRemark (org.asqatasun.entity.audit.SourceCodeRemark)143 ImmutablePair (org.apache.commons.lang3.tuple.ImmutablePair)109 LinkedHashSet (java.util.LinkedHashSet)77 EvidenceElement (org.asqatasun.entity.audit.EvidenceElement)53 IndefiniteResult (org.asqatasun.entity.audit.IndefiniteResult)41 ProcessRemark (org.asqatasun.entity.audit.ProcessRemark)41 WebResource (org.asqatasun.entity.subject.WebResource)8 ArrayList (java.util.ArrayList)4 Audit (org.asqatasun.entity.audit.Audit)4 DefiniteResult (org.asqatasun.entity.audit.DefiniteResult)4 Page (org.asqatasun.entity.subject.Page)4 Site (org.asqatasun.entity.subject.Site)4 List (java.util.List)3 SourceCodeRemarkImpl (org.asqatasun.entity.audit.SourceCodeRemarkImpl)3 Test (org.asqatasun.entity.reference.Test)3 Map (java.util.Map)2 Content (org.asqatasun.entity.audit.Content)2 TestSolution (org.asqatasun.entity.audit.TestSolution)2 CriterionStatistics (org.asqatasun.entity.statistics.CriterionStatistics)2