use of org.asqatasun.entity.audit.SourceCodeRemark in project Asqatasun by Asqatasun.
the class Aw22Rule11122Test method setProcess.
@Override
protected void setProcess() {
// ----------------------------------------------------------------------
// ------------------------------3NMI-01---------------------------------
// ----------------------------------------------------------------------
ProcessResult processResult = processPageTest("AW22.Test.11.12.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());
// ----------------------------------------------------------------------
// ------------------------------4NA-01----------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.11.12.2-4NA-01");
// 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 Aw22Rule11021Test method setProcess.
@Override
protected void setProcess() {
// ----------------------------------------------------------------------
// ------------------------------3NMI-01------------------------------
// ----------------------------------------------------------------------
ProcessResult processResult = processPageTest("AW22.Test.11.2.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.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());
// ----------------------------------------------------------------------
// ------------------------------3NMI-02------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.11.2.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.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());
// ----------------------------------------------------------------------
// ------------------------------3NMI-03------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.11.2.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.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());
// ----------------------------------------------------------------------
// ------------------------------3NMI-04------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.11.2.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.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());
// ----------------------------------------------------------------------
// ------------------------------4NA-01------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.11.2.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.2.1-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.2.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 Aw22Rule13022Test method setProcess.
@Override
protected void setProcess() {
// ----------------------------------------------------------------------
// ------------------------------3NMI-01---------------------------------
// ----------------------------------------------------------------------
ProcessResult processResult = processPageTest("AW22.Test.13.2.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.CHECK_USER_IS_WARNED_IN_CASE_OF_NEW_WINDOW_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.13.2.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.CHECK_USER_IS_WARNED_IN_CASE_OF_NEW_WINDOW_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.13.2.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.CHECK_USER_IS_WARNED_IN_CASE_OF_NEW_WINDOW_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.13.2.2-4NA-01");
// check test result
assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
// check test has no remark
assertNull(processResult.getRemarkSet());
// check number of elements in the page
assertEquals(0, processResult.getElementCounter());
}
use of org.asqatasun.entity.audit.SourceCodeRemark in project Asqatasun by Asqatasun.
the class Rgaa22Rule01021Test method setProcess.
@Override
protected void setProcess() {
// ----------------------------------------------------------------------
// ------------------------------2Failed-01------------------------------
// ----------------------------------------------------------------------
ProcessResult processResult = processPageTest("Rgaa22.Test.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.NOT_PERTINENT_TITLE_OF_FRAME_MSG, processRemark.getMessageCode());
assertEquals(TestSolution.FAILED, processRemark.getIssue());
assertEquals(HtmlElementStore.FRAME_ELEMENT, processRemark.getTarget());
assertNotNull(processRemark.getSnippet());
// check number of evidence elements and their value
assertEquals(1, processRemark.getElementList().size());
EvidenceElement ee = processRemark.getElementList().iterator().next();
assertTrue(StringUtils.contains(ee.getValue(), "!§:;.,?%*\\~/@()[]^_°=+-"));
assertEquals(TITLE_ATTR, ee.getEvidence().getCode());
// ----------------------------------------------------------------------
// ------------------------------2Failed-02------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("Rgaa22.Test.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.NOT_PERTINENT_TITLE_OF_FRAME_MSG, processRemark.getMessageCode());
assertEquals(TestSolution.FAILED, processRemark.getIssue());
assertEquals(HtmlElementStore.IFRAME_ELEMENT, processRemark.getTarget());
assertNotNull(processRemark.getSnippet());
// check number of evidence elements and their value
assertEquals(1, processRemark.getElementList().size());
ee = processRemark.getElementList().iterator().next();
assertTrue(StringUtils.contains(ee.getValue(), "!§:;.,?%*\\~/@()[]^_°=+-"));
assertEquals(TITLE_ATTR, ee.getEvidence().getCode());
// ----------------------------------------------------------------------
// ------------------------------2Failed-03------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("Rgaa22.Test.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.NOT_PERTINENT_TITLE_OF_FRAME_MSG, processRemark.getMessageCode());
assertEquals(TestSolution.FAILED, processRemark.getIssue());
assertEquals(HtmlElementStore.FRAME_ELEMENT, processRemark.getTarget());
assertNotNull(processRemark.getSnippet());
// check number of evidence elements and their value
assertEquals(1, processRemark.getElementList().size());
ee = processRemark.getElementList().iterator().next();
assertTrue(StringUtils.contains(ee.getValue(), "!§:;.,?%*\\~/@()[]^_°=+-"));
assertEquals(TITLE_ATTR, ee.getEvidence().getCode());
// ----------------------------------------------------------------------
// ------------------------------2Failed-04------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("Rgaa22.Test.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.NOT_PERTINENT_TITLE_OF_FRAME_MSG, processRemark.getMessageCode());
assertEquals(TestSolution.FAILED, processRemark.getIssue());
assertEquals(HtmlElementStore.FRAME_ELEMENT, processRemark.getTarget());
assertNotNull(processRemark.getSnippet());
// check number of evidence elements and their value
assertEquals(1, processRemark.getElementList().size());
ee = processRemark.getElementList().iterator().next();
assertTrue(StringUtils.contains(ee.getValue(), "mock-frame1.html"));
assertEquals(TITLE_ATTR, ee.getEvidence().getCode());
// ----------------------------------------------------------------------
// ------------------------------2Failed-05------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("Rgaa22.Test.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.NOT_PERTINENT_TITLE_OF_FRAME_MSG, processRemark.getMessageCode());
assertEquals(TestSolution.FAILED, processRemark.getIssue());
assertEquals(HtmlElementStore.IFRAME_ELEMENT, processRemark.getTarget());
assertNotNull(processRemark.getSnippet());
// check number of evidence elements and their value
assertEquals(1, processRemark.getElementList().size());
ee = processRemark.getElementList().iterator().next();
assertTrue(StringUtils.contains(ee.getValue(), "mock-iframe1.html"));
assertEquals(TITLE_ATTR, ee.getEvidence().getCode());
// ----------------------------------------------------------------------
// ------------------------------2Failed-06------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("Rgaa22.Test.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.NOT_PERTINENT_TITLE_OF_FRAME_MSG, processRemark.getMessageCode());
assertEquals(TestSolution.FAILED, processRemark.getIssue());
assertEquals(HtmlElementStore.FRAME_ELEMENT, processRemark.getTarget());
assertNotNull(processRemark.getSnippet());
// check number of evidence elements and their value
assertEquals(1, processRemark.getElementList().size());
ee = processRemark.getElementList().iterator().next();
assertTrue(StringUtils.contains(ee.getValue(), "mock-frame1.html"));
assertEquals(TITLE_ATTR, ee.getEvidence().getCode());
// ----------------------------------------------------------------------
// ------------------------------3NMI-01---------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("Rgaa22.Test.1.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());
processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
assertEquals(RemarkMessageStore.CHECK_TITLE_OF_FRAME_PERTINENCE_MSG, processRemark.getMessageCode());
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(HtmlElementStore.FRAME_ELEMENT, processRemark.getTarget());
assertNotNull(processRemark.getSnippet());
// check number of evidence elements and their value
assertEquals(1, processRemark.getElementList().size());
ee = processRemark.getElementList().iterator().next();
assertTrue(StringUtils.contains(ee.getValue(), "title of mock-frame1"));
assertEquals(TITLE_ATTR, ee.getEvidence().getCode());
// ----------------------------------------------------------------------
// ------------------------------3NMI-02---------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("Rgaa22.Test.1.2-3NMI-02");
// check number of elements in the page
assertEquals(1, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
// check number of remarks and their value
assertEquals(1, processResult.getRemarkSet().size());
processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
assertEquals(RemarkMessageStore.CHECK_TITLE_OF_FRAME_PERTINENCE_MSG, processRemark.getMessageCode());
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(HtmlElementStore.IFRAME_ELEMENT, processRemark.getTarget());
assertNotNull(processRemark.getSnippet());
// check number of evidence elements and their value
assertEquals(1, processRemark.getElementList().size());
ee = processRemark.getElementList().iterator().next();
assertTrue(StringUtils.contains(ee.getValue(), "Title of mock-iframe1"));
assertEquals(TITLE_ATTR, ee.getEvidence().getCode());
// ----------------------------------------------------------------------
// ------------------------------3NMI-03---------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("Rgaa22.Test.1.2-3NMI-03");
// check number of elements in the page
assertEquals(1, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
// check number of remarks and their value
assertEquals(1, processResult.getRemarkSet().size());
processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
assertEquals(RemarkMessageStore.CHECK_TITLE_OF_FRAME_PERTINENCE_MSG, processRemark.getMessageCode());
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(HtmlElementStore.FRAME_ELEMENT, processRemark.getTarget());
assertNotNull(processRemark.getSnippet());
// check number of evidence elements and their value
assertEquals(1, processRemark.getElementList().size());
ee = processRemark.getElementList().iterator().next();
assertTrue(StringUtils.contains(ee.getValue(), "Title of mock-frame1"));
assertEquals(TITLE_ATTR, ee.getEvidence().getCode());
// ----------------------------------------------------------------------
// ------------------------------4NA-01----------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("Rgaa22.Test.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("Rgaa22.Test.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("Rgaa22.Test.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("Rgaa22.Test.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("Rgaa22.Test.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("Rgaa22.Test.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("Rgaa22.Test.1.2-4NA-07");
// 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 Rgaa22Rule03031Test method setProcess.
@Override
protected void setProcess() {
// ----------------------------------------------------------------------
// ------------------------------3NMI-01------------------------------
// ----------------------------------------------------------------------
ProcessResult processResult = processPageTest("Rgaa22.Test.3.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(RemarkMessageStore.MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
assertNotNull(processRemark.getSnippet());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-02---------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("Rgaa22.Test.3.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(RemarkMessageStore.MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
assertNotNull(processRemark.getSnippet());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-03---------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("Rgaa22.Test.3.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(RemarkMessageStore.MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
assertNotNull(processRemark.getSnippet());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-04---------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("Rgaa22.Test.3.3-3NMI-04");
// check number of elements in the page
assertEquals(1, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
// check number of remarks and their value
assertEquals(1, processResult.getRemarkSet().size());
processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
assertEquals(RemarkMessageStore.MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
assertNotNull(processRemark.getSnippet());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-05---------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("Rgaa22.Test.3.3-3NMI-05");
// check number of elements in the page
assertEquals(1, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
// check number of remarks and their value
assertEquals(1, processResult.getRemarkSet().size());
processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
assertEquals(RemarkMessageStore.MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(HtmlElementStore.INPUT_ELEMENT, processRemark.getTarget());
assertNotNull(processRemark.getSnippet());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-06---------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("Rgaa22.Test.3.3-3NMI-06");
// check number of elements in the page
assertEquals(1, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
// check number of remarks and their value
assertEquals(1, processResult.getRemarkSet().size());
processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
assertEquals(RemarkMessageStore.MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(HtmlElementStore.SELECT_ELEMENT, processRemark.getTarget());
assertNotNull(processRemark.getSnippet());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------3NMI-07---------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("Rgaa22.Test.3.3-3NMI-07");
// check number of elements in the page
assertEquals(1, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
// check number of remarks and their value
assertEquals(1, processResult.getRemarkSet().size());
processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
assertEquals(RemarkMessageStore.MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(HtmlElementStore.TEXTAREA_ELEMENT, processRemark.getTarget());
assertNotNull(processRemark.getSnippet());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
// ----------------------------------------------------------------------
// ------------------------------4NA-01----------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("Rgaa22.Test.3.3-4NA-01");
// check test result
assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
// check test has no remark
assertNull(processResult.getRemarkSet());
// ----------------------------------------------------------------------
// ------------------------------4NA-02----------------------------------
// ----------------------------------------------------------------------
processResult = processPageTest("Rgaa22.Test.3.3-4NA-02");
// check test result
assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
// check test has no remark
assertNull(processResult.getRemarkSet());
}
Aggregations