use of org.asqatasun.entity.audit.EvidenceElement in project Asqatasun by Asqatasun.
the class Aw22Rule01073Test method setProcess.
@Override
protected void setProcess() {
//----------------------------------------------------------------------
//-------------------------------3NMI-01--------------------------------
//----------------------------------------------------------------------
ProcessResult processResult = processPageTest("AW22.Test.1.7.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.CHECK_NATURE_OF_IMAGE_AND_DESC_PERTINENCE_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.EMBED_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertEquals(1, processRemark.getElementList().size());
EvidenceElement ee = processRemark.getElementList().iterator().next();
assertTrue(ee.getValue().contains("mock_embed_object"));
assertEquals(SRC_ATTR, ee.getEvidence().getCode());
//----------------------------------------------------------------------
//------------------------------4NA-01------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.1.7.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());
//----------------------------------------------------------------------
//------------------------------4NA-02---------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.1.7.3-4NA-02");
// check test result
assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
// check test has no remark
assertNull(processResult.getRemarkSet());
// check number of elements in the page
assertEquals(0, processResult.getElementCounter());
//----------------------------------------------------------------------
//------------------------------4NA-03---------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.1.7.3-4NA-03");
// check test result
assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
// check test has no remark
assertNull(processResult.getRemarkSet());
// check number of elements in the page
assertEquals(0, processResult.getElementCounter());
}
use of org.asqatasun.entity.audit.EvidenceElement in project Asqatasun by Asqatasun.
the class Aw22Rule01092Test method setProcess.
@Override
protected void setProcess() {
//----------------------------------------------------------------------
//------------------------------3NMI-01------------------------------
//----------------------------------------------------------------------
ProcessResult processResult = processPageTest("AW22.Test.1.9.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.AREA_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertEquals(1, processRemark.getElementList().size());
EvidenceElement ee = processRemark.getElementList().iterator().next();
assertEquals(ABSENT_ATTRIBUTE_VALUE, ee.getValue());
assertEquals(HREF_ATTR, ee.getEvidence().getCode());
//----------------------------------------------------------------------
//------------------------------4NA-01------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.1.9.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());
//----------------------------------------------------------------------
//------------------------------4NA-02----------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.1.9.2-4NA-02");
// check test result
assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
// check test has no remark
assertNull(processResult.getRemarkSet());
// check number of elements in the page
assertEquals(0, processResult.getElementCounter());
//----------------------------------------------------------------------
//------------------------------4NA-03----------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.1.9.2-4NA-03");
// check test result
assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
// check test has no remark
assertNull(processResult.getRemarkSet());
// check number of elements in the page
assertEquals(0, processResult.getElementCounter());
}
use of org.asqatasun.entity.audit.EvidenceElement in project Asqatasun by Asqatasun.
the class Aw22Rule01094Test method setProcess.
@Override
protected void setProcess() {
//----------------------------------------------------------------------
//------------------------------3NMI-01------------------------------
//----------------------------------------------------------------------
ProcessResult processResult = processPageTest("AW22.Test.1.9.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.APPLET_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertEquals(1, processRemark.getElementList().size());
EvidenceElement ee = processRemark.getElementList().iterator().next();
assertTrue(StringUtils.contains(ee.getValue(), "mock.class"));
assertEquals(CODE_ATTR, ee.getEvidence().getCode());
//----------------------------------------------------------------------
//------------------------------4NA-01------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.1.9.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());
//----------------------------------------------------------------------
//------------------------------4NA-02----------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.1.9.4-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());
}
use of org.asqatasun.entity.audit.EvidenceElement in project Asqatasun by Asqatasun.
the class Aw22Rule01096Test method setProcess.
@Override
protected void setProcess() {
//----------------------------------------------------------------------
//------------------------------3NMI-01------------------------------
//----------------------------------------------------------------------
ProcessResult processResult = processPageTest("AW22.Test.1.9.6-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
assertEquals(1, processRemark.getElementList().size());
EvidenceElement ee = processRemark.getElementList().iterator().next();
assertTrue(StringUtils.contains(ee.getValue(), "mock_embed_object"));
assertEquals(SRC_ATTR, ee.getEvidence().getCode());
//----------------------------------------------------------------------
//------------------------------4NA-01----------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.1.9.6-4NA-01");
// check test result
assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
// check test has no remark
assertNull(processResult.getRemarkSet());
// check number of elements in the page
assertEquals(0, processResult.getElementCounter());
//----------------------------------------------------------------------
//------------------------------4NA-02----------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.1.9.6-4NA-02");
// check test result
assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
// check test has no remark
assertNull(processResult.getRemarkSet());
// check number of elements in the page
assertEquals(0, processResult.getElementCounter());
//----------------------------------------------------------------------
//------------------------------4NA-03----------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.1.9.6-4NA-03");
// check test result
assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
// check test has no remark
assertNull(processResult.getRemarkSet());
// check number of elements in the page
assertEquals(0, processResult.getElementCounter());
}
use of org.asqatasun.entity.audit.EvidenceElement in project Asqatasun by Asqatasun.
the class Aw22Rule02011Test method setProcess.
@Override
protected void setProcess() {
//----------------------------------------------------------------------
//------------------------------1Passed-01------------------------------
//----------------------------------------------------------------------
ProcessResult processResult = processPageTest("AW22.Test.2.1.1-1Passed-01");
// check test result
assertEquals(TestSolution.PASSED, processResult.getValue());
// check test has no remark
assertNull(processResult.getRemarkSet());
// check number of elements in the page
assertEquals(1, processResult.getElementCounter());
//----------------------------------------------------------------------
//------------------------------2Failed-01------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.2.1.1-2Failed-01");
// check number of elements in the page
assertEquals(2, 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.TITLE_ATTR_MISSING_MSG, processRemark.getMessageCode());
assertEquals(HtmlElementStore.FRAME_ELEMENT, processRemark.getTarget());
// check number of evidence elements and their value
assertEquals(1, processRemark.getElementList().size());
EvidenceElement ee = processRemark.getElementList().iterator().next();
assertTrue(StringUtils.contains(ee.getValue(), "mock-frame1.html"));
assertEquals(SRC_ATTR, ee.getEvidence().getCode());
//----------------------------------------------------------------------
//------------------------------4NA-01------------------------------
//----------------------------------------------------------------------
processResult = processPageTest("AW22.Test.2.1.1-4NA-01");
// check test result
assertEquals(TestSolution.NOT_APPLICABLE, processResult.getValue());
// check test has no remark
assertNull(processResult.getRemarkSet());
}
Aggregations