diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn index 40bf9075a2127ada0a72b42e3d675960c62c2136..4c82245310548a0cd5dc5b47ce4ff3fdff7f33d4 100644 --- a/LibOneM2M/OneM2M_Functions.ttcn +++ b/LibOneM2M/OneM2M_Functions.ttcn @@ -418,6 +418,7 @@ module OneM2M_Functions { if(p_resourceType == int23){ p_ae2 := AeSimu.create("AE2") alive; p_ae2.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", {f_getAnnouncementTargetPoA("HTTP", PX_AE2_ADDRESS, "")}), -1)); // AE2 is registred + p_ae2.done; p_ae2Index := f_getResource(p_ae2); if(ischosen(p_createRequestPrimitive.primitiveContent.subscription)){ //this condition is necessary for Subscription TCs where notification URI is set in m_createSubscriptionAdvanced p_createRequestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(p_ae2Index)}; @@ -578,7 +579,7 @@ module OneM2M_Functions { p_cse.start(f_sendRemoteCseResource()); alt { []infoPort.receive(mw_resource) -> value v_resource { - v_resourceIndex := f_setResource(v_resource.resource, v_resource.resourceType, v_resource.parentIndex); + v_resourceIndex := f_setResource(v_resource.resource, v_resource.resourceType, v_resource.parentIndex, false); } } @@ -600,7 +601,7 @@ module OneM2M_Functions { p_ae.start(f_sendResource(p_resourceIndex)); alt { []infoPort.receive(mw_resource) -> value v_resource { - v_resourceIndex := f_setResource(v_resource.resource, v_resource.resourceType, v_resource.parentIndex); + v_resourceIndex := f_setResource(v_resource.resource, v_resource.resourceType, v_resource.parentIndex, false); } } @@ -1163,7 +1164,7 @@ module OneM2M_Functions { [] mcaPortIn.receive(mw_request(mw_notify(v_notificationRequest))) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__ & ":INFO: Notification received"); - v_responsePrimitive.requestIdentifier := v_request.primitive.requestPrimitive.requestIdentifier; + // if(f_isHierarchical(v_request.primitive.requestPrimitive.primitiveContent.notification.creator)) { // setverdict(fail, __SCOPE__ & ": Creator cannot contain a hierarchical address"); // v_responsePrimitive.responseStatusCode := int4000; @@ -1174,7 +1175,6 @@ module OneM2M_Functions { // setverdict(fail, __SCOPE__ & ": Creator not set to originator of the subscription creation primitive"); // v_responsePrimitive.responseStatusCode := int4000; // } - mcaPortIn.send(m_httpResponse(v_responsePrimitive)); } [] mcaPortIn.receive(mw_request(mw_notify(mw_contentNotification(?)))) -> value v_request { tc_ac.stop; @@ -1186,9 +1186,18 @@ module OneM2M_Functions { } [] tc_ac.timeout { setverdict(fail, __SCOPE__ & ":ERROR: No notification received"); + stop; } } - + + v_responsePrimitive.requestIdentifier := v_request.primitive.requestPrimitive.requestIdentifier; + if(getverdict() == pass) { + mcaPortIn.send(m_httpResponse(v_responsePrimitive)); + } else { + v_responsePrimitive.responseStatusCode := int4000; + mcaPortIn.send(m_httpResponse(v_responsePrimitive)); + } + //mcaPort.send(m_response(v_responsePrimitive)); // TODO have to be deleted } //end f_subscriptionVerificationHandler @@ -1533,7 +1542,7 @@ module OneM2M_Functions { } p_myResource.remoteCSE.nodeLink := omit; - return f_setResource(p_myResource, p_resourceType, p_parentIndex); + return f_setResource(p_myResource, p_resourceType, p_parentIndex, false); } } @@ -1695,7 +1704,7 @@ module OneM2M_Functions { p_resource.aE := v_ae; p_modifiedResource.aE := v_aeModified; - return f_setResource(p_resource, p_resourceType, p_parentIndex); + return f_setResource(p_resource, p_resourceType, p_parentIndex, false); } @@ -2185,7 +2194,7 @@ module OneM2M_Functions { * @return Internal resource index of the saved resource * @verdict */ - function f_setResource(PrimitiveContent p_resource, ResourceType p_resourceType, integer p_parentIndex := -1) runs on Tester return integer { + function f_setResource(PrimitiveContent p_resource, ResourceType p_resourceType, integer p_parentIndex := -1, in boolean p_resourceToBeDeleted := true) runs on Tester return integer { var integer v_newIndex := -1; if(isbound(vc_resourcesList)) { vc_resourcesList[lengthof(vc_resourcesList)] := {p_parentIndex, p_resourceType, p_resource}; @@ -2194,8 +2203,10 @@ module OneM2M_Functions { } v_newIndex := lengthof(vc_resourcesList)-1; - if(match(int2, p_resourceType) or match(-1, p_parentIndex)) {//If created resource is an AE or created under CSEBase, it needs to be added to the resourceToBeDeleted list - vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_newIndex}; + if(p_resourceToBeDeleted) { + if(match(int2, p_resourceType) or match(-1, p_parentIndex)) {//If created resource is an AE or created under CSEBase, it needs to be added to the resourceToBeDeleted list + vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_newIndex}; + } } return v_newIndex; diff --git a/OneM2M_Testcases.ttcn b/OneM2M_Testcases.ttcn index b21238c43952f8670a62405777df91b541d7e5c8..0f1f32445bdd409436d3404a5232dcb5dd45d64c 100644 --- a/OneM2M_Testcases.ttcn +++ b/OneM2M_Testcases.ttcn @@ -920,7 +920,6 @@ module OneM2M_Testcases { f_cf01Up(); //Preambule - v_cseBaseIndex := f_cse_preamble_createServiceSubscribedProfile({"C-AE-ID-STEM"});//c_CRUDNDi); //Test Body v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM")); @@ -955,7 +954,7 @@ module OneM2M_Testcases { * @desc Check that the IUT rejects an AE registration (allowed App-ID, not allowed C-AE-ID-STEM provided by AE) * */ - testcase TC_CSE_REG_CRE_004() runs on InCseSimu system CseSystem { + testcase TC_CSE_REG_CRE_004() runs on AeSimu system CseSystem { var MsgIn v_response; var RequestPrimitive v_request; @@ -963,25 +962,25 @@ module OneM2M_Testcases { var ResourceType v_resourceType := int2; // Test component configuration - f_cf01UpCseSimuMaster(); + f_cf01Up(); //Preambule //vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSEBase); //TODO: create serviceSubscribedProfile, Node, and serviceSubscribedAppRule - //v_cseBaseIndex := f_cse_preamble_createServiceSubscribedProfile(-);//c_CRUDNDi); - + //v_cseBaseIndex := f_cse_preamble_createServiceSubscribedProfile({"C*"}); //c_CRUDNDi); + //Test Body //v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM")); - vc_aeSimu.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, "C"))); + f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, "C")); tc_ac.start; alt { - [] mccPort.receive(mw_response(mw_responsePrimitive(int4005))) { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) { tc_ac.stop; setverdict(pass, __SCOPE__ & ": AE creation rejected."); } - [] mccPort.receive(mw_response(mw_responsePrimitiveInverse(int4005))) -> value v_response{ + [] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int4005))) -> value v_response{ tc_ac.stop; setverdict(fail, __SCOPE__ & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))); } @@ -991,10 +990,10 @@ module OneM2M_Testcases { } // Postamble - f_cse_postamble_deleteResourcesCSE(); + f_cse_postamble_deleteResources(); // Tear down - f_cf01DownCseSimuMaster(); + f_cf01Down(); } @@ -1173,10 +1172,13 @@ module OneM2M_Testcases { f_cf02Up(); //Preambule + vc_cseSimu.start(f_cse_registrationRemoteCse(mw_createRemoteCSEBase)); + vc_cseSimu.done; + v_aeIndex := f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, "S-AE-ID-STEM")); vc_cseSimu.start(f_cse_resourceAnnouncementHandler()); - + vc_cseSimu.done; //TODO Deregister //f_cse_deleteResource(v_aeIndex); @@ -1220,9 +1222,9 @@ module OneM2M_Testcases { // Tear down f_cf02Down(); - } //end TC_CSE_REG_CRE_010 + }; //end TC_CSE_REG_CRE_010 - group g_CSE_REG_CRE_016{ + group g_CSE_REG_CRE_016 { /** * @desc Check that the IUT accepts a create request of <remoteCSE> resource with OPTIONAL_ATTRIBUTE. @@ -1539,7 +1541,7 @@ module OneM2M_Testcases { * @desc Check that the IUT rejects the create request of <CSEBase> resource. * */ - testcase TC_CSE_REG_CRE_027() runs on InCseSimu system CseSystem { + testcase TC_CSE_REG_CRE_027() runs on AeSimu system CseSystem { // Local variables var RequestPrimitive v_request; @@ -1549,23 +1551,23 @@ module OneM2M_Testcases { // Test control // Test component configuration - f_cf01UpCseSimuMaster(); + f_cf02Up(); // Test adapter configuration // Preamble - vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSEBase); + vc_cseSimu.start(f_cse_registrationRemoteCse(mw_createRemoteCSEBase)); // Test Body - vc_aeSimu.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, omit))); + f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, omit)); tc_ac.start; alt { - [] mccPort.receive(mw_response(mw_responsePrimitive(int2001))) { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) { tc_ac.stop; setverdict(pass, __SCOPE__ & ": AE creation successful."); } - [] mccPort.receive { + [] mcaPort.receive { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Error while creating AE"); } @@ -1575,10 +1577,10 @@ module OneM2M_Testcases { } // Postamble - f_cse_postamble_deleteResourcesCSE(); + f_cse_postamble_deleteResources(); // Tear down - f_cf01DownCseSimuMaster(); + f_cf02Down(); }//end TC_CSE_REG_CRE_027 @@ -1632,50 +1634,47 @@ module OneM2M_Testcases { } - /** - * @desc Check that IUT sends a CSE registration request with attributes multiplicity equals to 1 - * - */ testcase TC_CSE_REG_CRE_029() runs on CseSimu system CseSystem { - //var MsgIn v_response; - var RequestPrimitive v_request; - var RequestPrimitive v_createRequestPrimitive := valueof(m_createRemoteCSEBase); - var ResourceType v_resourceType := int16; - - // Test control - - // Test component configuration - f_cf04Up(); - - // Test adapter configuration - - // Preamble - v_request := f_getCreateRequestPrimitive(v_resourceType, v_createRequestPrimitive, -1); + //var MsgIn v_response; + var RequestPrimitive v_request; + var RequestPrimitive v_createRequestPrimitive := valueof(m_createRemoteCSEBase); + var ResourceType v_resourceType := int16; - mccPort.send(m_request(v_request)); - tc_ac.start; - alt { - [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Resource type remoteCSE created successfully"); - } - [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating resource type remoteCSE"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource type remoteCSE"); - } - } - - // Postamble - f_cse_postamble_deleteResourcesCSE(); - - // Tear down - f_cf04Down(); + // Test control - } + // Test component configuration + f_cf04Up(); + + // Test adapter configuration + + // Preamble + v_request := f_getCreateRequestPrimitive(v_resourceType, v_createRequestPrimitive, -1); + + mccPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Resource type remoteCSE created successfully"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating resource type remoteCSE"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource type remoteCSE"); + } + } + + // Postamble + f_cse_postamble_deleteResourcesCSE(); + + // Tear down + f_cf04Down(); + + } + } //end group Create @@ -2571,16 +2570,17 @@ module OneM2M_Testcases { mcaPort.send(m_request(v_request)); tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value vc_response { tc_ac.stop; setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfully"); - v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_parentIndex); + f_checkAttributesToBeSaved(p_resourceType, v_request, vc_response.primitive.responsePrimitive); + v_resourceIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_parentIndex); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Wrong response status code"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(p_resourceType))); } @@ -2600,14 +2600,14 @@ module OneM2M_Testcases { // Postamble f_cse_postamble_deleteResources(); - vc_resourcesIndexToBeDeleted := {}; - + v_ae2.start(f_cse_postamble_deleteResources()); + // Tear down //ae2.stop; f_cf01Down(); unmap(v_ae2:mcaPort, system:mcaPort); - return v_response.primitive.responsePrimitive; + return vc_response.primitive.responsePrimitive; }//end f_CSE_DMR_CRE_001 @@ -2774,16 +2774,17 @@ module OneM2M_Testcases { mcaPort.send(m_request(v_request)); tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value vc_response { tc_ac.stop; setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfully"); - v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_aeIndex); + f_checkAttributesToBeSaved(p_resourceType, v_request, vc_response.primitive.responsePrimitive); + v_resourceIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_aeIndex); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Wrong response status code"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(p_resourceType))); } @@ -2806,7 +2807,7 @@ module OneM2M_Testcases { // Tear down f_cf01Down(); - return v_response.primitive.responsePrimitive; + return vc_response.primitive.responsePrimitive; }//end f_CSE_DMR_CRE_002 @@ -3252,16 +3253,17 @@ module OneM2M_Testcases { mcaPort.send(m_request(v_request)); tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value vc_response { tc_ac.stop; setverdict(pass, __SCOPE__ & ": Accepted creation rejected for resource type " & int2str(enum2int(p_resourceType))); - v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_aeIndex); + f_checkAttributesToBeSaved(p_resourceType, v_request, vc_response.primitive.responsePrimitive); + v_resourceIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_aeIndex); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Wrong response status code"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Creation rejected of resource type " & int2str(enum2int(p_resourceType))); } @@ -3285,7 +3287,7 @@ module OneM2M_Testcases { // Tear down f_cf01Down(); - return v_response.primitive.responsePrimitive; + return vc_response.primitive.responsePrimitive; }//end f_CSE_DMR_CRE_006 @@ -4492,6 +4494,7 @@ module OneM2M_Testcases { [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { tc_ac.stop; setverdict(pass, __SCOPE__ & ": Accepted creation for resource type " & int2str(enum2int(p_resourceType)) & " containing attribute " & p_optionalAttribute.name); + f_checkAttributesToBeSaved(p_resourceType, v_request, v_response.primitive.responsePrimitive); v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_parentIndex); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { @@ -8525,15 +8528,15 @@ module OneM2M_Testcases { mcaPort.send(m_request(v_request)); tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value vc_response { tc_ac.stop; setverdict(pass, __SCOPE__ & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Wrong response status code"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Error while updating resource type " & int2str(enum2int(p_resourceType))); } @@ -8553,7 +8556,7 @@ module OneM2M_Testcases { // Tear down f_cf01Down(); - return v_response.primitive.responsePrimitive; + return vc_response.primitive.responsePrimitive; }//end f_CSE_DMR_UPD_001 @@ -8805,15 +8808,15 @@ module OneM2M_Testcases { mcaPort.send(m_request(v_request)); tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value vc_response { tc_ac.stop; setverdict(pass, __SCOPE__ & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Wrong response status code"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Error while updating resource type " & int2str(enum2int(p_resourceType))); } @@ -8831,7 +8834,7 @@ module OneM2M_Testcases { // Tear down f_cf01Down(); - return v_response.primitive.responsePrimitive; + return vc_response.primitive.responsePrimitive; }//end f_CSE_DMR_UPD_002 @@ -9129,15 +9132,15 @@ module OneM2M_Testcases { mcaPort.send(m_request(v_request, p_nullFields)); tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value vc_response { tc_ac.stop; setverdict(pass, __SCOPE__ & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Wrong response status code"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Error while updating resource type " & int2str(enum2int(p_resourceType))); } @@ -9154,7 +9157,7 @@ module OneM2M_Testcases { // Tear down f_cf01Down(); - return v_response.primitive.responsePrimitive; + return vc_response.primitive.responsePrimitive; }//end f_CSE_DMR_UPD_003 @@ -9540,15 +9543,15 @@ module OneM2M_Testcases { mcaPort.send(m_request(v_request, p_nullFields)); tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value vc_response { tc_ac.stop; setverdict(pass, __SCOPE__ & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Wrong response status code"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Error while updating resource type " & int2str(enum2int(p_resourceType))); } @@ -9565,7 +9568,7 @@ module OneM2M_Testcases { // Tear down f_cf01Down(); - return v_response.primitive.responsePrimitive; + return vc_response.primitive.responsePrimitive; }//end f_CSE_DMR_UPD_004 @@ -11461,11 +11464,11 @@ module OneM2M_Testcases { mcaPort.send(m_request(v_request)); tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value vc_response { tc_ac.stop; setverdict(pass, __SCOPE__ & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Error while updating resource type " & int2str(enum2int(p_resourceType))); } @@ -12716,15 +12719,15 @@ module OneM2M_Testcases { mcaPort.send(m_request(v_request)); //CSEBase tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value vc_response { tc_ac.stop; setverdict(pass, __SCOPE__, ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { tc_ac.stop; setverdict(fail, __SCOPE__, ": Wrong response status code"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { tc_ac.stop; setverdict(fail, __SCOPE__, ": Error while updating optional attribute"); } @@ -13335,15 +13338,15 @@ module OneM2M_Testcases { mcaPort.send(m_request(v_request)); //CSEBase tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value vc_response { tc_ac.stop; setverdict(pass, __SCOPE__, ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { tc_ac.stop; setverdict(fail, __SCOPE__, ": Wrong response status code"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { tc_ac.stop; setverdict(fail, __SCOPE__, ": Error while updating mandatory attribute"); } @@ -14353,6 +14356,7 @@ module OneM2M_Testcases { [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { tc_ac.stop; setverdict(pass, __SCOPE__ & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!"); + f_checkAttributesToBeSaved(int10, v_request, v_response.primitive.responsePrimitive); v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, v_aeAuxIndex); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { @@ -14676,6 +14680,7 @@ module OneM2M_Testcases { [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { tc_ac.stop; setverdict(pass, __SCOPE__ & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!"); + f_checkAttributesToBeSaved(int10, v_request, v_response.primitive.responsePrimitive); v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, v_aeAuxIndex); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { @@ -14740,6 +14745,7 @@ module OneM2M_Testcases { [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { tc_ac.stop; setverdict(pass, __SCOPE__ & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!"); + f_checkAttributesToBeSaved(int10, v_request, v_response.primitive.responsePrimitive); v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, v_aeAuxIndex); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { @@ -19059,6 +19065,7 @@ module OneM2M_Testcases { [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { tc_ac.stop; setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(c_accessControlPolicyType)) & " created successfully"); + f_checkAttributesToBeSaved(c_accessControlPolicyType, v_createRequest, v_response.primitive.responsePrimitive); v_acpIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int1, v_aeIndex); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {