use of org.asqatasun.entity.audit.SourceCodeRemark in project Asqatasun by Asqatasun.
the class Aw22Rule10083Test method setProcess.
@Override
protected void setProcess() {
// ----------------------------------------------------------------------
// ------------------------------3NMI-01---------------------------------
// ----------------------------------------------------------------------
ProcessResult processResult = processPageTest("AW22.Test.10.8.3-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.EMBED_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-02---------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.8.3-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.APPLET_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-03---------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.8.3-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.OBJECT_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------4NA-01----------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.8.3-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());
}
use of org.asqatasun.entity.audit.SourceCodeRemark in project Asqatasun by Asqatasun.
the class Aw22Rule10084Test method setProcess.
@Override
protected void setProcess() {
// ----------------------------------------------------------------------
// ------------------------------3NMI-01---------------------------------
// ----------------------------------------------------------------------
ProcessResult processResult = processPageTest("AW22.Test.10.8.4-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.EMBED_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-02---------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.8.4-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.APPLET_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-03---------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.8.4-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.OBJECT_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------4NA-01----------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.8.4-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());
}
use of org.asqatasun.entity.audit.SourceCodeRemark in project Asqatasun by Asqatasun.
the class Aw22Rule10131Test method setProcess.
@Override
protected void setProcess() {
// ----------------------------------------------------------------------
// ------------------------------3NMI-01------------------------------
// ----------------------------------------------------------------------
ProcessResult processResult = processPageTest("AW22.Test.10.13.1-3NMI-01");
// check number of elements in the page
assertEquals(1, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
// check number of remarks and their value
assertEquals(1, processResult.getRemarkSet().size());
SourceCodeRemark processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(RemarkMessageStore.HIDDEN_TEXT_DETECTED_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.SPAN_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-02------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.13.1-3NMI-02");
// check number of elements in the page
assertEquals(1, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
// check number of remarks and their value
assertEquals(1, processResult.getRemarkSet().size());
processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(RemarkMessageStore.HIDDEN_TEXT_DETECTED_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.SPAN_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-03------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.13.1-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.HIDDEN_TEXT_DETECTED_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.SPAN_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-04------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.13.1-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.HIDDEN_TEXT_DETECTED_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.SPAN_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-05------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.13.1-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(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(RemarkMessageStore.HIDDEN_TEXT_DETECTED_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.SPAN_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-06------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.13.1-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(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(RemarkMessageStore.HIDDEN_TEXT_DETECTED_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.SPAN_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-07------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.13.1-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(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(RemarkMessageStore.HIDDEN_TEXT_DETECTED_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.SPAN_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-08------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.13.1-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(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(RemarkMessageStore.HIDDEN_TEXT_DETECTED_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.SPAN_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-09------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.13.1-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(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(RemarkMessageStore.HIDDEN_TEXT_DETECTED_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.SPAN_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-10------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.13.1-3NMI-10");
// 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.HIDDEN_TEXT_DETECTED_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.SPAN_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-11------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.13.1-3NMI-11");
// 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.HIDDEN_TEXT_DETECTED_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.SPAN_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-12------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.13.1-3NMI-12");
// 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.HIDDEN_TEXT_DETECTED_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.SPAN_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-13------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.13.1-3NMI-13");
// 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.HIDDEN_TEXT_DETECTED_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.SPAN_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-14------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.13.1-3NMI-14");
// 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.HIDDEN_TEXT_DETECTED_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.SPAN_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-15------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.13.1-3NMI-15");
// 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.HIDDEN_TEXT_DETECTED_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.SPAN_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-16------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.13.1-3NMI-16");
// 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.HIDDEN_TEXT_DETECTED_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.SPAN_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-17------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.13.1-3NMI-17");
// 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.HIDDEN_TEXT_DETECTED_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.SPAN_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-18------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.13.1-3NMI-18");
// 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.HIDDEN_TEXT_DETECTED_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.SPAN_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-19------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.13.1-3NMI-19");
// 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.HIDDEN_TEXT_DETECTED_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.SPAN_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-20------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.13.1-3NMI-20");
// 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.HIDDEN_TEXT_DETECTED_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.SPAN_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------4NA-01------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.13.1-4NA-01");
// check test result
assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
// check test has no remark
assertNull(processResult.getRemarkSet());
// ----------------------------------------------------------------------
// ------------------------------4NA-01------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.13.1-4NA-02");
// check test result
assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
// check test has no remark
assertNull(processResult.getRemarkSet());
// ----------------------------------------------------------------------
// ------------------------------4NA-01------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.10.13.1-4NA-03");
// check test result
assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
// check test has no remark
assertNull(processResult.getRemarkSet());
}
use of org.asqatasun.entity.audit.SourceCodeRemark in project Asqatasun by Asqatasun.
the class Rgaa22Rule10121Test method setProcess.
@Override
protected void setProcess() {
// ----------------------------------------------------------------------
// ------------------------------3NMI-01------------------------------
// ----------------------------------------------------------------------
ProcessResult processResult = processPageTest("Rgaa22.Test.10.12-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(1, 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 evidence elements
assertEquals(2, processRemark.getElementList().size());
Iterator<EvidenceElement> iterator = processRemark.getElementList().iterator();
EvidenceElement ee = iterator.next();
assertEquals(TEXT_ELEMENT2, ee.getEvidence().getCode());
ee = iterator.next();
assertEquals(TITLE_ATTR, ee.getEvidence().getCode());
// ----------------------------------------------------------------------
// ------------------------------4NA-01------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("Rgaa22.Test.10.12-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());
// ----------------------------------------------------------------------
// ------------------------------4NA-02------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("Rgaa22.Test.10.12-4NA-02");
// check number of elements in the page
assertEquals(1, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
// check test has no remark
assertNull(processResult.getRemarkSet());
}
use of org.asqatasun.entity.audit.SourceCodeRemark in project Asqatasun by Asqatasun.
the class Rgaa22Rule11011Test method setProcess.
@Override
protected void setProcess() {
// ----------------------------------------------------------------------
// ----------------------------2Failed-01--------------------------------
// ----------------------------------------------------------------------
ProcessResult processResult = processPageTest("RGAA22.Test.11.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.DATA_TABLE_WITHOUT_HEADER_MSG, processRemark.getMessageCode());
assertTrue(processRemark.getTarget().equalsIgnoreCase(HtmlElementStore.TABLE_ELEMENT));
assertNotNull(processRemark.getSnippet());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-01--------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.11.1-3NMI-01");
// check number of elements in the page
assertEquals(1, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
// check number of remarks and their value
assertEquals(1, processResult.getRemarkSet().size());
processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(RemarkMessageStore.CHECK_TABLE_IS_PRESENTATION_TABLE_MSG, processRemark.getMessageCode());
assertTrue(processRemark.getTarget().equalsIgnoreCase(HtmlElementStore.TABLE_ELEMENT));
assertNotNull(processRemark.getSnippet());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-02--------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.11.1-3NMI-02");
// check number of elements in the page
assertEquals(1, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
// check number of remarks and their value
assertEquals(1, processResult.getRemarkSet().size());
processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(RemarkMessageStore.HEADER_DETECTED_CHECK_ALL_HEADERS_ARE_WELL_FORMED_MSG, processRemark.getMessageCode());
assertTrue(processRemark.getTarget().equalsIgnoreCase(HtmlElementStore.TABLE_ELEMENT));
assertNotNull(processRemark.getSnippet());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-03--------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.11.1-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());
Iterator<ProcessRemark> iter = processResult.getRemarkSet().iterator();
processRemark = (SourceCodeRemark) iter.next();
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(RemarkMessageStore.CHECK_TABLE_IS_DATA_TABLE_MSG, processRemark.getMessageCode());
assertTrue(processRemark.getTarget().equalsIgnoreCase(HtmlElementStore.TABLE_ELEMENT));
assertNotNull(processRemark.getSnippet());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------4NA-01------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.11.1-4NA-01");
// check test result
assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
// check test has no remark
assertNull(processResult.getRemarkSet());
// check number of elements in the page
assertEquals(0, processResult.getElementCounter());
// ----------------------------------------------------------------------
// ------------------------------4NA-01------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.11.1-4NA-02");
// check test result
assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
// check test has no remark
assertNull(processResult.getRemarkSet());
// check number of elements in the page
assertEquals(0, processResult.getElementCounter());
}
Aggregations