From fdf09bc482e79a147f48ec257a909354507ea929 Mon Sep 17 00:00:00 2001 From: reinaortega <miguelangel.reinaortega@etsi.org> Date: Sun, 8 Jul 2018 21:46:27 +0200 Subject: [PATCH] Review of f_CSE_ANNC_CRE_003 Signed-off-by: reinaortega <miguelangel.reinaortega@etsi.org> --- OneM2M_PermutationFunctions.ttcn | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/OneM2M_PermutationFunctions.ttcn b/OneM2M_PermutationFunctions.ttcn index cbbe063..89e04e7 100644 --- a/OneM2M_PermutationFunctions.ttcn +++ b/OneM2M_PermutationFunctions.ttcn @@ -7251,9 +7251,9 @@ module OneM2M_PermutationFunctions { var integer v_parentIndex := -1; var integer v_aeIndex := -1; var integer v_resourceIndex; - var integer v_CntAnncResourceIndex; - var template RequestPrimitive v_create := m_createAe(PX_APP_ID, omit, omit); - v_create.primitiveContent.container.announceTo := {PX_CSE1_ID}; + var integer v_containerAnncResourceIndex; + var template RequestPrimitive v_createContainer := m_createContainerBase; + v_createContainer.primitiveContent.container.announceTo := {PX_CSE1_ID}; // Test control @@ -7268,15 +7268,16 @@ module OneM2M_PermutationFunctions { vc_cse1.done; //Preamble + v_aeIndex := f_cse_preamble_registerAe(); vc_cse1.start(f_cse_announcementProcedure_createHandler(mw_createContainerAnncBase(-, -))); - v_aeIndex := f_cse_createResource(int2,v_create); + v_resourceIndex := f_cse_createResource(int3,v_createContainer, v_aeIndex); vc_cse1.done; // Test Body - //Retrieve the parent resource index - v_CntAnncResourceIndex := f_getLatestResourceIndex(vc_cse1); + //Retrieve the parent resource index where contentInstanceAnnc must be created + v_containerAnncResourceIndex := f_getLatestResourceIndex(vc_cse1); v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestCreatePrimitive, v_parentIndex); - vc_cse1.start(f_cse_announcementProcedure_createHandler(p_createRequestAnnc,int4000, v_CntAnncResourceIndex)); + vc_cse1.start(f_cse_announcementProcedure_createHandler(p_createRequestAnnc,int4000, v_containerAnncResourceIndex)); mcaPort.send(f_getMsgOutPrimitive(m_request(v_request))); tc_ac.start; @@ -7285,7 +7286,9 @@ module OneM2M_PermutationFunctions { tc_ac.stop; setverdict(pass, __SCOPE__, ": Resource " & int2str(enum2int(p_resourceType)) & " created successfully"); if(ispresent(v_response.primitive.responsePrimitive.primitiveContent.contentInstance.announceTo)) { - setverdict(fail, __SCOPE__, ": Resource " & int2str(enum2int(p_resourceType)) & " contains the attribute announceTo"); + if(v_response.primitive.responsePrimitive.primitiveContent.contentInstance.announceTo != {}) { + setverdict(fail, __SCOPE__, ": Resource " & int2str(enum2int(p_resourceType)) & " contains the attribute announceTo"); + } } } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { -- GitLab