Fixing and improving of f_AE_DMR_RET_003

Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 2004a48b
......@@ -1473,7 +1473,7 @@ module OneM2M_Testcases_AE_Release_1 {
}
[] mcaPortIn.receive(mw_request(mw_retrieve(?))) {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : error while retrieving attribute !");
setverdict(fail, __SCOPE__, " : Retrieve Request for unexpected target");
mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
}
[] tc_ac.timeout{
......@@ -1502,23 +1502,27 @@ module OneM2M_Testcases_AE_Release_1 {
function f_AE_DMR_RET_003() runs on CseSimu {
var integer v_resourceIndex := -1;
var integer v_resourceIndex, v_containerResourceIndex := -1;
var PrimitiveContent v_localResource;
//variables
var template UtTriggerPrimitive v_utRequest := m_utRetrieve("NotInitialized");
var MsgIn v_request;
var ResponsePrimitive v_responsePrimitive;
var universal charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for retrieving the 'latest' attribute from Container";
var universal charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for retrieving the 'latest' attribute from Container at ";
//Test component configuration
f_cf03Up();
//send triggering primitive to SUT
v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex) & "/" & c_resourceShortNameLatest;
f_sendUtPrimitive(v_utRequest,v_action);
v_containerResourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
v_localResource := f_generateLocalResource(valueof(m_primitiveContentContentInstance(m_contentCreateContentInstance)), vc_cSEBaseIndex, int4);
v_resourceIndex := f_setLocalResource(v_localResource, int4, v_containerResourceIndex);
v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_containerResourceIndex) & "/" & c_resourceShortNameLatest;
f_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_containerResourceIndex));
//Test behavior
tc_ac.start;
......@@ -1526,13 +1530,12 @@ module OneM2M_Testcases_AE_Release_1 {
[] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_))) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : retrieve attribute latest request is accepted!!");
v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
mcaPortIn.send(f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
}
[] mcaPortIn.receive {
[] mcaPortIn.receive(mw_request(mw_retrieve(?))) {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : error while retrieving attribute !");
setverdict(fail, __SCOPE__, " : Retrieve Request for unexpected target");
mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
}
[] tc_ac.timeout{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment