use of org.asqatasun.entity.audit.ProcessRemark 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());
}
use of org.asqatasun.entity.audit.ProcessRemark in project Asqatasun by Asqatasun.
the class Rgaa22Rule08051Test method setProcess.
@Override
protected void setProcess() {
//----------------------------------------------------------------------
//------------------------------3NMI-01---------------------------------
//----------------------------------------------------------------------
ProcessResult processResult = processPageTest("RGAA22.Test.8.5-3NMI-01");
// check number of elements in the page
assertEquals(0, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
// check number of remarks and their value
assertEquals(1, processResult.getRemarkSet().size());
assertTrue(processResult.getRemarkSet().iterator().next() instanceof ProcessRemark);
assertEquals(getMessageKey(RemarkMessageStore.NO_PATTERN_DETECTED_MSG), processResult.getRemarkSet().iterator().next().getMessageCode());
//----------------------------------------------------------------------
//------------------------------3NMI-02---------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.8.5-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());
Iterator<ProcessRemark> iter = processResult.getRemarkSet().iterator();
SourceCodeRemark processRemark = (SourceCodeRemark) iter.next();
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(RemarkMessageStore.CONTEXT_CHANGED_SCRIPT_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.SELECT_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
//----------------------------------------------------------------------
//------------------------------3NMI-03---------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.8.5-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());
iter = processResult.getRemarkSet().iterator();
processRemark = (SourceCodeRemark) iter.next();
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(RemarkMessageStore.CONTEXT_CHANGED_SCRIPT_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.FORM_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
//----------------------------------------------------------------------
//------------------------------3NMI-04---------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.8.5-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());
iter = processResult.getRemarkSet().iterator();
processRemark = (SourceCodeRemark) iter.next();
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(RemarkMessageStore.CONTEXT_CHANGED_SCRIPT_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.SELECT_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
//----------------------------------------------------------------------
//------------------------------3NMI-05---------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.8.5-3NMI-05");
// check number of elements in the page
assertEquals(0, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
// check number of remarks and their value
assertEquals(1, processResult.getRemarkSet().size());
assertTrue(processResult.getRemarkSet().iterator().next() instanceof ProcessRemark);
assertEquals(getMessageKey(RemarkMessageStore.NO_PATTERN_DETECTED_MSG), processResult.getRemarkSet().iterator().next().getMessageCode());
//----------------------------------------------------------------------
//------------------------------3NMI-06---------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.8.5-3NMI-06");
// check number of elements in the page
assertEquals(0, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
// check number of remarks and their value
assertEquals(1, processResult.getRemarkSet().size());
assertTrue(processResult.getRemarkSet().iterator().next() instanceof ProcessRemark);
assertEquals(getMessageKey(RemarkMessageStore.NO_PATTERN_DETECTED_MSG), processResult.getRemarkSet().iterator().next().getMessageCode());
//----------------------------------------------------------------------
//------------------------------3NMI-07---------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.8.5-3NMI-07");
// check number of elements in the page
assertEquals(0, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
// check number of remarks and their value
assertEquals(1, processResult.getRemarkSet().size());
assertTrue(processResult.getRemarkSet().iterator().next() instanceof ProcessRemark);
assertEquals(getMessageKey(RemarkMessageStore.NO_PATTERN_DETECTED_MSG), processResult.getRemarkSet().iterator().next().getMessageCode());
//----------------------------------------------------------------------
//------------------------------3NMI-08---------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.8.5-3NMI-08");
// check number of elements in the page
assertEquals(0, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
// check number of remarks and their value
assertEquals(1, processResult.getRemarkSet().size());
assertTrue(processResult.getRemarkSet().iterator().next() instanceof ProcessRemark);
assertEquals(getMessageKey(RemarkMessageStore.NO_PATTERN_DETECTED_MSG), processResult.getRemarkSet().iterator().next().getMessageCode());
//----------------------------------------------------------------------
//------------------------------3NMI-09---------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.8.5-3NMI-09");
// 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());
iter = processResult.getRemarkSet().iterator();
processRemark = (SourceCodeRemark) iter.next();
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(RemarkMessageStore.CONTEXT_CHANGED_SCRIPT_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.FORM_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
processRemark = (SourceCodeRemark) iter.next();
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(RemarkMessageStore.CONTEXT_CHANGED_SCRIPT_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.SELECT_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
}
use of org.asqatasun.entity.audit.ProcessRemark in project Asqatasun by Asqatasun.
the class Rgaa22Rule07091Test method setProcess.
@Override
protected void setProcess() {
//----------------------------------------------------------------------
//---------------------------2Failed-01---------------------------------
//----------------------------------------------------------------------
ProcessResult processResult = processPageTest("RGAA22.Test.7.9-2Failed-01");
// check number of elements in the page
assertEquals(12, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.FAILED, processResult.getValue());
// check number of remarks and their value
assertEquals(1, processResult.getRemarkSet().size());
SourceCodeRemark sourceCodeRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
assertEquals(TestSolution.FAILED, sourceCodeRemark.getIssue());
assertEquals(RemarkMessageStore.LINK_WITHOUT_TARGET_MSG, sourceCodeRemark.getMessageCode());
assertEquals(HtmlElementStore.A_ELEMENT, sourceCodeRemark.getTarget());
assertNotNull(sourceCodeRemark.getSnippet());
assertNull(sourceCodeRemark.getElementList());
//----------------------------------------------------------------------
//---------------------------2Failed-02---------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.9-2Failed-02");
// check number of elements in the page
assertEquals(12, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.FAILED, processResult.getValue());
// check number of remarks and their value
assertEquals(1, processResult.getRemarkSet().size());
sourceCodeRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
assertEquals(TestSolution.FAILED, sourceCodeRemark.getIssue());
assertEquals(RemarkMessageStore.LINK_WITHOUT_TARGET_MSG, sourceCodeRemark.getMessageCode());
assertEquals(HtmlElementStore.A_ELEMENT, sourceCodeRemark.getTarget());
assertNotNull(sourceCodeRemark.getSnippet());
assertNull(sourceCodeRemark.getElementList());
//----------------------------------------------------------------------
//---------------------------2Failed-03---------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.9-2Failed-03");
// check number of elements in the page
assertEquals(12, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.FAILED, processResult.getValue());
// check number of remarks and their value
assertEquals(1, processResult.getRemarkSet().size());
sourceCodeRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
assertEquals(TestSolution.FAILED, sourceCodeRemark.getIssue());
assertEquals(RemarkMessageStore.FIELDSET_NOT_WITHIN_FORM_MSG, sourceCodeRemark.getMessageCode());
assertEquals(HtmlElementStore.FIELDSET_ELEMENT, sourceCodeRemark.getTarget());
assertNotNull(sourceCodeRemark.getSnippet());
assertNull(sourceCodeRemark.getElementList());
//----------------------------------------------------------------------
//---------------------------2Failed-04---------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.9-2Failed-04");
// check number of elements in the page
assertEquals(13, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.FAILED, processResult.getValue());
// check number of remarks and their value
assertEquals(1, processResult.getRemarkSet().size());
sourceCodeRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
assertEquals(TestSolution.FAILED, sourceCodeRemark.getIssue());
assertEquals(RemarkMessageStore.FIELDSET_NOT_WITHIN_FORM_MSG, sourceCodeRemark.getMessageCode());
assertEquals(HtmlElementStore.FIELDSET_ELEMENT, sourceCodeRemark.getTarget());
assertNotNull(sourceCodeRemark.getSnippet());
assertNull(sourceCodeRemark.getElementList());
//----------------------------------------------------------------------
//---------------------------3NMI-03---------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.9-3NMI-01");
// check number of elements in the page
assertEquals(11, 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 processRemark = processResult.getRemarkSet().iterator().next();
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(getMessageKey(RemarkMessageStore.NO_PATTERN_DETECTED_MSG), processRemark.getMessageCode());
assertNull(processRemark.getElementList());
//----------------------------------------------------------------------
//---------------------------3NMI-02------------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.9-3NMI-02");
// check number of elements in the page
assertEquals(12, 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 = processResult.getRemarkSet().iterator().next();
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(getMessageKey(RemarkMessageStore.NO_PATTERN_DETECTED_MSG), processRemark.getMessageCode());
assertNull(processRemark.getElementList());
//----------------------------------------------------------------------
//---------------------------3NMI-03------------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.9-3NMI-03");
// check number of elements in the page
assertEquals(12, 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 = processResult.getRemarkSet().iterator().next();
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(getMessageKey(RemarkMessageStore.NO_PATTERN_DETECTED_MSG), processRemark.getMessageCode());
assertNull(processRemark.getElementList());
//----------------------------------------------------------------------
//---------------------------3NMI-04------------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.9-3NMI-04");
// check number of elements in the page
assertEquals(12, 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 = processResult.getRemarkSet().iterator().next();
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(getMessageKey(RemarkMessageStore.NO_PATTERN_DETECTED_MSG), processRemark.getMessageCode());
assertNull(processRemark.getElementList());
//----------------------------------------------------------------------
//---------------------------3NMI-05------------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.9-3NMI-05");
// check number of elements in the page
assertEquals(13, 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 = processResult.getRemarkSet().iterator().next();
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(getMessageKey(RemarkMessageStore.NO_PATTERN_DETECTED_MSG), processRemark.getMessageCode());
assertNull(processRemark.getElementList());
//----------------------------------------------------------------------
//---------------------------3NMI-06------------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.9-3NMI-06");
// check number of elements in the page
assertEquals(13, 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 = processResult.getRemarkSet().iterator().next();
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(getMessageKey(RemarkMessageStore.NO_PATTERN_DETECTED_MSG), processRemark.getMessageCode());
assertNull(processRemark.getElementList());
//----------------------------------------------------------------------
//---------------------------3NMI-07------------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.9-3NMI-07");
// check number of elements in the page
assertEquals(13, 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 = processResult.getRemarkSet().iterator().next();
assertEquals(TestSolution.NEED_MORE_INFO, processRemark.getIssue());
assertEquals(getMessageKey(RemarkMessageStore.NO_PATTERN_DETECTED_MSG), processRemark.getMessageCode());
assertNull(processRemark.getElementList());
}
use of org.asqatasun.entity.audit.ProcessRemark in project Asqatasun by Asqatasun.
the class Rgaa22Rule07111Test method setProcess.
@Override
protected void setProcess() {
//----------------------------------------------------------------------
//------------------------------1Passed-01------------------------------
//----------------------------------------------------------------------
ProcessResult processResult = processPageTest("RGAA22.Test.7.11-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());
//----------------------------------------------------------------------
//------------------------------1Passed-02------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.11-1Passed-02");
// 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("RGAA22.Test.7.11-2Failed-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.INVISIBLE_OUTLINE_ON_FOCUS_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.A_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
//----------------------------------------------------------------------
//------------------------------2Failed-02------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.11-2Failed-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.INVISIBLE_OUTLINE_ON_FOCUS_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.A_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
//----------------------------------------------------------------------
//------------------------------2Failed-03------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.11-2Failed-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.INVISIBLE_OUTLINE_ON_FOCUS_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.A_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
//----------------------------------------------------------------------
//------------------------------2Failed-04------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.11-2Failed-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.INVISIBLE_OUTLINE_ON_FOCUS_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.DIV_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
//----------------------------------------------------------------------
//------------------------------2Failed-05------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.11-2Failed-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.INVISIBLE_OUTLINE_ON_FOCUS_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.A_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
//----------------------------------------------------------------------
//------------------------------2Failed-06------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.11-2Failed-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.INVISIBLE_OUTLINE_ON_FOCUS_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.A_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
//----------------------------------------------------------------------
//------------------------------2Failed-07------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.11-2Failed-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.INVISIBLE_OUTLINE_ON_FOCUS_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.SPAN_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertNull(processRemark.getElementList());
//----------------------------------------------------------------------
//------------------------------3NMI-01---------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.11-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 pr = processResult.getRemarkSet().iterator().next();
assertEquals(TestSolution.NEED_MORE_INFO, pr.getIssue());
assertEquals(RemarkMessageStore.CHECK_MANUALLY_OUTLINE_FOR_FORM_ELEMENT_AND_IFRAME_MSG, pr.getMessageCode());
// check number of evidence elements and their value
assertNull(pr.getElementList());
//----------------------------------------------------------------------
//---------------------------------3NMI-02------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.11-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());
pr = processResult.getRemarkSet().iterator().next();
assertEquals(TestSolution.NEED_MORE_INFO, pr.getIssue());
assertEquals(RemarkMessageStore.CHECK_MANUALLY_OUTLINE_FOR_FORM_ELEMENT_AND_IFRAME_MSG, pr.getMessageCode());
// check number of evidence elements and their value
assertNull(pr.getElementList());
//----------------------------------------------------------------------
//---------------------------------3NMI-03------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.11-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());
pr = processResult.getRemarkSet().iterator().next();
assertEquals(TestSolution.NEED_MORE_INFO, pr.getIssue());
assertEquals(RemarkMessageStore.CHECK_MANUALLY_OUTLINE_FOR_FORM_ELEMENT_AND_IFRAME_MSG, pr.getMessageCode());
// check number of evidence elements and their value
assertNull(pr.getElementList());
//----------------------------------------------------------------------
//---------------------------------3NMI-04------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.11-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());
pr = processResult.getRemarkSet().iterator().next();
assertEquals(TestSolution.NEED_MORE_INFO, pr.getIssue());
assertEquals(RemarkMessageStore.CHECK_MANUALLY_OUTLINE_FOR_FORM_ELEMENT_AND_IFRAME_MSG, pr.getMessageCode());
// check number of evidence elements and their value
assertNull(pr.getElementList());
//----------------------------------------------------------------------
//---------------------------------3NMI-05------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.11-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());
pr = processResult.getRemarkSet().iterator().next();
assertEquals(TestSolution.NEED_MORE_INFO, pr.getIssue());
assertEquals(RemarkMessageStore.CHECK_MANUALLY_OUTLINE_FOR_FORM_ELEMENT_AND_IFRAME_MSG, pr.getMessageCode());
// check number of evidence elements and their value
assertNull(pr.getElementList());
//----------------------------------------------------------------------
//---------------------------------3NMI-06------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.11-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());
pr = processResult.getRemarkSet().iterator().next();
assertEquals(TestSolution.NEED_MORE_INFO, pr.getIssue());
assertEquals(RemarkMessageStore.CHECK_MANUALLY_OUTLINE_FOR_FORM_ELEMENT_AND_IFRAME_MSG, pr.getMessageCode());
// check number of evidence elements and their value
assertNull(pr.getElementList());
//----------------------------------------------------------------------
//---------------------------------3NMI-07------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.11-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());
pr = processResult.getRemarkSet().iterator().next();
assertEquals(TestSolution.NEED_MORE_INFO, pr.getIssue());
assertEquals(RemarkMessageStore.CHECK_MANUALLY_OUTLINE_FOR_FORM_ELEMENT_AND_IFRAME_MSG, pr.getMessageCode());
// check number of evidence elements and their value
assertNull(pr.getElementList());
//----------------------------------------------------------------------
//---------------------------------3NMI-08------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.11-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());
pr = processResult.getRemarkSet().iterator().next();
assertEquals(TestSolution.NEED_MORE_INFO, pr.getIssue());
assertEquals(RemarkMessageStore.CHECK_MANUALLY_OUTLINE_FOR_FORM_ELEMENT_AND_IFRAME_MSG, pr.getMessageCode());
// check number of evidence elements and their value
assertNull(pr.getElementList());
//----------------------------------------------------------------------
//---------------------------------3NMI-09------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.11-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());
pr = processResult.getRemarkSet().iterator().next();
assertEquals(TestSolution.NEED_MORE_INFO, pr.getIssue());
assertEquals(RemarkMessageStore.CHECK_MANUALLY_OUTLINE_FOR_FORM_ELEMENT_AND_IFRAME_MSG, pr.getMessageCode());
// check number of evidence elements and their value
assertNull(pr.getElementList());
//----------------------------------------------------------------------
//---------------------------------3NMI-10------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.11-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());
pr = processResult.getRemarkSet().iterator().next();
assertEquals(TestSolution.NEED_MORE_INFO, pr.getIssue());
assertEquals(RemarkMessageStore.CHECK_MANUALLY_OUTLINE_FOR_FORM_ELEMENT_AND_IFRAME_MSG, pr.getMessageCode());
// check number of evidence elements and their value
assertNull(pr.getElementList());
//----------------------------------------------------------------------
//------------------------------4NA-01------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.11-4NA-01");
// check number of elements in the page
assertEquals(0, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
// check number of remarks and their value
assertNull(processResult.getRemarkSet());
//----------------------------------------------------------------------
//------------------------------4NA-02------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.11-4NA-02");
// check number of elements in the page
assertEquals(0, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
// check number of remarks and their value
assertNull(processResult.getRemarkSet());
//----------------------------------------------------------------------
//------------------------------4NA-03------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.11-4NA-03");
// check number of elements in the page
assertEquals(0, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
// check number of remarks and their value
assertNull(processResult.getRemarkSet());
//----------------------------------------------------------------------
//------------------------------4NA-04------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.11-4NA-04");
// check number of elements in the page
assertEquals(0, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
// check number of remarks and their value
assertNull(processResult.getRemarkSet());
//----------------------------------------------------------------------
//------------------------------4NA-05------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.11-4NA-05");
// check number of elements in the page
assertEquals(0, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
// check number of remarks and their value
assertNull(processResult.getRemarkSet());
//----------------------------------------------------------------------
//------------------------------4NA-06------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("RGAA22.Test.7.11-4NA-06");
// check number of elements in the page
assertEquals(0, processResult.getElementCounter());
// check test result
assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
// check number of remarks and their value
assertNull(processResult.getRemarkSet());
}
use of org.asqatasun.entity.audit.ProcessRemark in project Asqatasun by Asqatasun.
the class Rgaa22Rule05271Test method setProcess.
@Override
protected void setProcess() {
//----------------------------------------------------------------------
//------------------------------3NMI-01------------------------------
//----------------------------------------------------------------------
ProcessResult processResult = processPageTest("Rgaa22.Test.5.27-3NMI-01");
// check test result
assertEquals(TestSolution.NEED_MORE_INFO, processResult.getValue());
// check test has no remark
assertNotNull(processResult.getRemarkSet());
// check number of elements in the page
assertEquals(3, processResult.getElementCounter());
// check type of remarks and their value
assertNotNull(processResult.getRemarkSet());
SourceCodeRemark processRemark = ((SourceCodeRemark) ((LinkedHashSet) processResult.getRemarkSet()).iterator().next());
assertEquals(MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
// check number, type and value of remarks
assertNotNull(processResult.getRemarkSet());
assertEquals(3, processResult.getRemarkSet().size());
for (ProcessRemark remark : processResult.getRemarkSet()) {
processRemark = (SourceCodeRemark) remark;
assertEquals(MANUAL_CHECK_ON_ELEMENTS_MSG, processRemark.getMessageCode());
}
//----------------------------------------------------------------------
//------------------------------4NA-01------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("Rgaa22.Test.5.27-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());
}
Aggregations