Search in sources :

Example 61 with SourceCodeRemark

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

the class Rgaa22Rule04101Test method setProcess.

@Override
protected void setProcess() {
    // ----------------------------------------------------------------------
    // ------------------------------3NMI-01---------------------------------
    // ----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("RGAA22.Test.4.10-3NMI-01");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    SourceCodeRemark processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.CHECK_CAPTCHA_ALTERNATIVE_ACCES_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.IMG_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------3NMI-02---------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("RGAA22.Test.4.10-3NMI-02");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.CHECK_CAPTCHA_ALTERNATIVE_ACCES_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.IMG_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------3NMI-03---------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("RGAA22.Test.4.10-3NMI-03");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.CHECK_CAPTCHA_ALTERNATIVE_ACCES_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.AREA_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------3NMI-04---------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("RGAA22.Test.4.10-3NMI-04");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.CHECK_CAPTCHA_ALTERNATIVE_ACCES_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.AREA_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------3NMI-05---------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("RGAA22.Test.4.10-3NMI-05");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.CHECK_CAPTCHA_ALTERNATIVE_ACCES_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.APPLET_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------3NMI-06---------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("RGAA22.Test.4.10-3NMI-06");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.CHECK_CAPTCHA_ALTERNATIVE_ACCES_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.APPLET_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------3NMI-07---------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("RGAA22.Test.4.10-3NMI-07");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.CHECK_CAPTCHA_ALTERNATIVE_ACCES_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.OBJECT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------3NMI-08---------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("RGAA22.Test.4.10-3NMI-08");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.CHECK_CAPTCHA_ALTERNATIVE_ACCES_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.OBJECT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------3NMI-09---------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("RGAA22.Test.4.10-3NMI-09");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.CHECK_CAPTCHA_ALTERNATIVE_ACCES_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.EMBED_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------4NA-01----------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("RGAA22.Test.4.10-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.4.10-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.4.10-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.4.10-4NA-04");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(0, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------4NA-05----------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("RGAA22.Test.4.10-4NA-05");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(0, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------4NA-06----------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("RGAA22.Test.4.10-4NA-06");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(0, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------4NA-07----------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("RGAA22.Test.4.10-4NA-07");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(0, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------4NA-08----------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("RGAA22.Test.4.10-4NA-08");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(0, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------4NA-09----------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("RGAA22.Test.4.10-4NA-09");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(0, processResult.getElementCounter());
}
Also used : LinkedHashSet(java.util.LinkedHashSet) ProcessResult(org.asqatasun.entity.audit.ProcessResult) SourceCodeRemark(org.asqatasun.entity.audit.SourceCodeRemark)

Example 62 with SourceCodeRemark

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

the class Rgaa22Rule05281Test method setProcess.

@Override
protected void setProcess() {
    // ----------------------------------------------------------------------
    // ------------------------------3NMI-01------------------------------
    // ----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("Rgaa22.Test.5.28-3NMI-01");
    // check test result
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // check test has no remark
    assertNotNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(3, processResult.getElementCounter());
    // check type of remarks and their value
    assertNotNull(processResult.getRemarkSet());
    SourceCodeRemark processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
    // check number, type and value of remarks
    assertNotNull(processResult.getRemarkSet());
    assertEquals(3, processResult.getRemarkSet().size());
    for (ProcessRemark remark : processResult.getRemarkSet()) {
        processRemark = (SourceCodeRemark) remark;
        assertEquals(MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
    }
    // ----------------------------------------------------------------------
    // ------------------------------4NA-01------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("Rgaa22.Test.5.28-4NA-01");
    // check number of elements in the page
    assertEquals(0, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
}
Also used : ProcessResult(org.asqatasun.entity.audit.ProcessResult) SourceCodeRemark(org.asqatasun.entity.audit.SourceCodeRemark) ProcessRemark(org.asqatasun.entity.audit.ProcessRemark)

Example 63 with SourceCodeRemark

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

the class Rgaa22Rule05191Test method setProcess.

@Override
protected void setProcess() {
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-01------------------------------
    // ----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("Rgaa22.Test.5.19-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(0, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------2Failed-01------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("Rgaa22.Test.5.19-2Failed-01");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    SourceCodeRemark processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.DETECTED_TAG_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.BLINK_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
}
Also used : ProcessResult(org.asqatasun.entity.audit.ProcessResult) SourceCodeRemark(org.asqatasun.entity.audit.SourceCodeRemark)

Example 64 with SourceCodeRemark

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

the class Rgaa22Rule05291Test method setProcess.

@Override
protected void setProcess() {
    // ----------------------------------------------------------------------
    // ------------------------------3NMI-01------------------------------
    // ----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("RGAA22.Test.5.29-3NMI-01");
    // check test result
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // check test has no remark
    assertNotNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(3, processResult.getElementCounter());
    // check type of remarks and their value
    assertNotNull(processResult.getRemarkSet());
    SourceCodeRemark processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
    // check number, type and value of remarks
    assertNotNull(processResult.getRemarkSet());
    assertEquals(3, processResult.getRemarkSet().size());
    for (ProcessRemark remark : processResult.getRemarkSet()) {
        processRemark = (SourceCodeRemark) remark;
        assertEquals(MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
    }
    // ----------------------------------------------------------------------
    // ------------------------------4NA-01------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("RGAA22.Test.5.29-4NA-01");
    // check number of elements in the page
    assertEquals(0, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
}
Also used : ProcessResult(org.asqatasun.entity.audit.ProcessResult) SourceCodeRemark(org.asqatasun.entity.audit.SourceCodeRemark) ProcessRemark(org.asqatasun.entity.audit.ProcessRemark)

Example 65 with SourceCodeRemark

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

the class Rgaa22Rule03021Test method setProcess.

@Override
protected void setProcess() {
    // ----------------------------------------------------------------------
    // ------------------------------3NMI-01------------------------------
    // ----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("Rgaa22.Test.3.2-3NMI-01");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    SourceCodeRemark processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------3NMI-02---------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("Rgaa22.Test.3.2-3NMI-02");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------3NMI-03---------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("Rgaa22.Test.3.2-3NMI-03");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------3NMI-04---------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("Rgaa22.Test.3.2-3NMI-04");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------3NMI-05---------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("Rgaa22.Test.3.2-3NMI-05");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------3NMI-06---------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("Rgaa22.Test.3.2-3NMI-06");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.SELECT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------3NMI-07---------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("Rgaa22.Test.3.2-3NMI-07");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(HtmlElementStore.TEXTAREA_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------4NA-01----------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("Rgaa22.Test.3.2-4NA-01");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // ----------------------------------------------------------------------
    // ------------------------------4NA-02----------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("Rgaa22.Test.3.2-4NA-02");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
}
Also used : LinkedHashSet(java.util.LinkedHashSet) ProcessResult(org.asqatasun.entity.audit.ProcessResult) SourceCodeRemark(org.asqatasun.entity.audit.SourceCodeRemark)

Aggregations

SourceCodeRemark (org.asqatasun.entity.audit.SourceCodeRemark)148 ProcessResult (org.asqatasun.entity.audit.ProcessResult)143 LinkedHashSet (java.util.LinkedHashSet)73 EvidenceElement (org.asqatasun.entity.audit.EvidenceElement)53 ProcessRemark (org.asqatasun.entity.audit.ProcessRemark)31