Search in sources :

Example 86 with SourceCodeRemark

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

the class Aw22Rule11011Test method setProcess.

@Override
protected void setProcess() {
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-01------------------------------
    // ----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("AW22.Test.11.1.1-1Passed-01");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-02------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.1-1Passed-02");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-03------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.1-1Passed-03");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-04------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.1-1Passed-04");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-05------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.1-1Passed-05");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-06------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.1-1Passed-06");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-07------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.1-1Passed-07");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-08------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.1-1Passed-08");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-09------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.1-1Passed-09");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-10------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.1-1Passed-10");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-11------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.1-1Passed-11");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-12------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.1-1Passed-12");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-13------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.1-1Passed-13");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-14------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.1-1Passed-14");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-15------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.1-1Passed-15");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-16------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.1-1Passed-16");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------2Failed-01------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.1-2Failed-01");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    SourceCodeRemark processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.INVALID_FORM_FIELD_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------2Failed-02------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.1-2Failed-02");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.INVALID_FORM_FIELD_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------2Failed-03------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.1-2Failed-03");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.INVALID_FORM_FIELD_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------2Failed-04------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.1-2Failed-04");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.INVALID_FORM_FIELD_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------2Failed-05------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.1-2Failed-05");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.INVALID_FORM_FIELD_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------2Failed-06------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.1-2Failed-06");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.INVALID_FORM_FIELD_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.TEXTAREA_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------2Failed-07------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.1-2Failed-07");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.INVALID_FORM_FIELD_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.SELECT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------4NA-01----------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.1-4NA-01");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
}
Also used : LinkedHashSet(java.util.LinkedHashSet) ProcessResult(org.asqatasun.entity.audit.ProcessResult) SourceCodeRemark(org.asqatasun.entity.audit.SourceCodeRemark)

Example 87 with SourceCodeRemark

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

the class Aw22Rule11012Test method setProcess.

@Override
protected void setProcess() {
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-01------------------------------
    // ----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("AW22.Test.11.1.2-1Passed-01");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-02------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-1Passed-02");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-03------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-1Passed-03");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-04------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-1Passed-04");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-05------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-1Passed-05");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-06------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-1Passed-06");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-07------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-1Passed-07");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-08------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-1Passed-08");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-09------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-1Passed-09");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-10------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-1Passed-10");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-11------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-1Passed-11");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-12------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-1Passed-12");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-13------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-1Passed-13");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-14------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-1Passed-14");
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // ----------------------------------------------------------------------
    // ------------------------------2Failed-01------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-2Failed-01");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    SourceCodeRemark processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.ID_MISSING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------2Failed-02------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-2Failed-02");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.ID_MISSING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------2Failed-03------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-2Failed-03");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.ID_MISSING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------2Failed-04------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-2Failed-04");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.ID_MISSING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------2Failed-05------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-2Failed-05");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.ID_MISSING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------2Failed-06------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-2Failed-06");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.ID_MISSING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.TEXTAREA_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------2Failed-07------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-2Failed-07");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.ID_MISSING_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.SELECT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------2Failed-08------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-2Failed-08");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.ID_NOT_UNIQUE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------2Failed-09------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-2Failed-09");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.ID_NOT_UNIQUE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------2Failed-10------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-2Failed-10");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.ID_NOT_UNIQUE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------2Failed-11------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-2Failed-11");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.ID_NOT_UNIQUE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------2Failed-12------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-2Failed-12");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.ID_NOT_UNIQUE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------2Failed-13------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-2Failed-13");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.ID_NOT_UNIQUE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.TEXTAREA_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------2Failed-14------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-2Failed-14");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(RemarkMessageStore.ID_NOT_UNIQUE_MSG, processRemark.getMessageCode());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(HtmlElementStore.SELECT_ELEMENT, processRemark.getTarget());
    assertNotNull(processRemark.getSnippet());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------4NA-01----------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-4NA-01");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // ----------------------------------------------------------------------
    // ------------------------------4NA-02----------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-4NA-02");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // ----------------------------------------------------------------------
    // ------------------------------4NA-03----------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-4NA-03");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // ----------------------------------------------------------------------
    // ------------------------------4NA-04----------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-4NA-04");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // ----------------------------------------------------------------------
    // ------------------------------4NA-05----------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-4NA-05");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // ----------------------------------------------------------------------
    // ------------------------------4NA-06----------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-4NA-06");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // ----------------------------------------------------------------------
    // ------------------------------4NA-07----------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-4NA-07");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // ----------------------------------------------------------------------
    // ------------------------------4NA-08----------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.1.2-4NA-08");
    // 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)

Example 88 with SourceCodeRemark

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

the class Aw22Rule11031Test method setProcess.

@Override
protected void setProcess() {
    // ----------------------------------------------------------------------
    // ------------------------------3NMI-01---------------------------------
    // ----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("AW22.Test.11.3.1-3NMI-01");
    // check number of elements in the page
    assertEquals(2, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
    // check number of remarks and their value
    assertEquals(2, processResult.getRemarkSet().size());
    Iterator<ProcessRemark> iter = processResult.getRemarkSet().iterator();
    SourceCodeRemark processRemark = (SourceCodeRemark) iter.next();
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(RemarkMessageStore.MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
    assertEquals(HtmlElementStore.LABEL_ELEMENT, processRemark.getTarget());
    // check number of evidence elements and their value
    assertEquals(1, processRemark.getElementList().size());
    assertEquals("Field1", processRemark.getElementList().iterator().next().getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, processRemark.getElementList().iterator().next().getEvidence().getCode());
    processRemark = (SourceCodeRemark) iter.next();
    assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(RemarkMessageStore.MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
    assertEquals(HtmlElementStore.LABEL_ELEMENT, processRemark.getTarget());
    // check number of evidence elements and their value
    assertEquals(1, processRemark.getElementList().size());
    assertEquals("Field2", processRemark.getElementList().iterator().next().getValue());
    assertEquals(HtmlElementStore.TEXT_ELEMENT2, processRemark.getElementList().iterator().next().getEvidence().getCode());
    // ----------------------------------------------------------------------
    // ------------------------------4NA-01----------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.3.1-4NA-01");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // ----------------------------------------------------------------------
    // ------------------------------4NA-02----------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.3.1-4NA-02");
    // 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 89 with SourceCodeRemark

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

the class Aw22Rule11142Test method setProcess.

@Override
protected void setProcess() {
    // ----------------------------------------------------------------------
    // ------------------------------3NMI-01---------------------------------
    // ----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("AW22.Test.11.14.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(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(RemarkMessageStore.MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
    assertEquals(HtmlElementStore.FORM_ELEMENT, processRemark.getTarget());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------3NMI-02---------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.14.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(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(RemarkMessageStore.MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
    assertEquals(HtmlElementStore.FORM_ELEMENT, processRemark.getTarget());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------3NMI-03---------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.14.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(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
    assertEquals(RemarkMessageStore.MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
    assertEquals(HtmlElementStore.FORM_ELEMENT, processRemark.getTarget());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------4NA-01----------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.14.2-4NA-01");
    // check test result
    assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
    // check test has no remark
    assertNull(processResult.getRemarkSet());
    // ----------------------------------------------------------------------
    // ------------------------------4NA-02----------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.14.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)

Example 90 with SourceCodeRemark

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

the class Aw22Rule11061Test method setProcess.

@Override
protected void setProcess() {
    // ----------------------------------------------------------------------
    // ------------------------------1Passed-01------------------------------
    // ----------------------------------------------------------------------
    ProcessResult processResult = processPageTest("AW22.Test.11.6.1-1Passed-01");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.PASSED, processResult.getValue());
    // check number of remarks and their value
    assertNull(processResult.getRemarkSet());
    // ----------------------------------------------------------------------
    // ------------------------------2Failed-01------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.6.1-2Failed-01");
    // check number of elements in the page
    assertEquals(1, processResult.getElementCounter());
    // check test result
    assertEquals(TestSolution.FAILED, processResult.getValue());
    // check number of remarks and their value
    assertEquals(1, processResult.getRemarkSet().size());
    SourceCodeRemark processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
    assertEquals(TestSolution.FAILED, processRemark.getIssue());
    assertEquals(RemarkMessageStore.FIELDSET_WITHOUT_LEGEND_MSG, processRemark.getMessageCode());
    assertEquals(HtmlElementStore.FIELDSET_ELEMENT, processRemark.getTarget());
    // check number of evidence elements and their value
    assertNull(processRemark.getElementList());
    // ----------------------------------------------------------------------
    // ------------------------------4NA-01----------------------------------
    // ----------------------------------------------------------------------
    processResult = processPageTest("AW22.Test.11.6.1-4NA-01");
    // 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)

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