From 2004a48b4bcd6f16465ca977e8c4f76bba686a81 Mon Sep 17 00:00:00 2001 From: reinaortega <miguelangel.reinaortega@etsi.org> Date: Wed, 25 Jul 2018 16:00:15 +0200 Subject: [PATCH] Fixing and improving of f_AE_DMR_RET_002 Signed-off-by: reinaortega <miguelangel.reinaortega@etsi.org> --- OneM2M_Testcases_AE_Release_1.ttcn | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/OneM2M_Testcases_AE_Release_1.ttcn b/OneM2M_Testcases_AE_Release_1.ttcn index f3d80d5..e0a3c53 100644 --- a/OneM2M_Testcases_AE_Release_1.ttcn +++ b/OneM2M_Testcases_AE_Release_1.ttcn @@ -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))))); -- GitLab