Fixing and improving of f_AE_DMR_RET_002

Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 6d9c9e06
......@@ -1441,23 +1441,26 @@ module OneM2M_Testcases_AE_Release_1 {
function f_AE_DMR_RET_002() 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 'oldest' attribute from Container";
var universal charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for retrieving the 'oldest' child resource of 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_resourceShortNameOldest;
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_resourceShortNameOldest;
f_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_containerResourceIndex));
//Test behavior
tc_ac.start;
......@@ -1465,11 +1468,10 @@ 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 oldest 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 !");
mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
......
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