diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn index 49a412784b86b0e4f287bbda7e6a2df53bce8e0f..f05ad5572d25f6b7fa3c667253fc51691e553b16 100644 --- a/LibOneM2M/OneM2M_Functions.ttcn +++ b/LibOneM2M/OneM2M_Functions.ttcn @@ -15,13 +15,11 @@ module OneM2M_Functions { import from XSD all; import from OneM2M_Templates all; - import from OneM2M_Types all;//{type XSD.ID}; + import from OneM2M_Types all; import from OneM2M_TypesAndValues all; import from OneM2M_TestSystem all; import from OneM2M_Pixits all; import from OneM2M_Pics all; -// import from OneM2M_AdditionalTypes all; - group ConfigFunctions { @@ -31,7 +29,8 @@ module OneM2M_Functions { function f_cf01Up(in boolean p_auxiliaryAe2Required := false) runs on AeSimu { // Variables - vc_config := e_cf01; + vc_config := e_cf01; + vc_testSystemRole := e_ae; // Map map(self:mcaPort, system:mcaPort); @@ -45,6 +44,7 @@ module OneM2M_Functions { vc_auxiliaryAe2Up := p_auxiliaryAe2Required; vc_ae2 := AeSimu.create("AE2") alive; vc_ae2.start(f_cf01UpAe2()); + vc_ae2.done; } //Initialze the IUT @@ -57,7 +57,8 @@ module OneM2M_Functions { function f_cf01UpAe2() runs on AeSimu { // Variables - vc_config := e_cf01; + vc_config := e_cf01; + vc_testSystemRole := e_ae; // Map map(self:mcaPort, system:mcaPort); @@ -79,20 +80,47 @@ module OneM2M_Functions { // Variables vc_config := e_cf02; - vc_cseSimu := CseSimu.create("CSE1") alive; + vc_testSystemRole := e_ae; + vc_cse1 := CseSimu.create("CSE1") alive; // Map map(self:mcaPort, system:mcaPort); - map(vc_cseSimu:mccPort, system:mccPort); map(self:acPort, system:acPort); activate(a_default()); - activate(a_cse_aeSimu()); + activate(a_cse_cf02_ae1()); + vc_cse1.start(f_cf02UpCse1()); + vc_cse1.done; // Connect - f_connectInfoPort(vc_cseSimu); + //Initialze the IUT } // end f_cf02Up + + /** + @desc Ports mapping and default behaviour activation for Config 2 on the CSE1 + */ + function f_cf02UpCse1() runs on CseSimu { + + // Variables + var PrimitiveContent v_cSEBaseResource; + vc_config := e_cf02; + vc_testSystemRole := e_cse; + + // Map + map(self:mccPort, system:mccPort); + map(self:mccPortIn, system:mccPortIn); + map(self:acPort, system:acPort); + + activate(a_default()); + activate(a_cse_cf02_cse1()); + + v_cSEBaseResource := f_cse_generateLocalResource(-, -1, int5); + vc_cSEBaseIndex := f_setLocalResource(v_cSEBaseResource, int5, -1); + + //Initialze the IUT + + } // end f_cf02UpCse1 /** * @desc Ports mapping and default behaviour activation for Config 02 @@ -100,22 +128,50 @@ module OneM2M_Functions { function f_cf02UpCseSimuMaster() runs on CseSimu { // Variables - vc_config := e_cf02; - vc_aeSimu := AeSimu.create("AE1") alive; + var PrimitiveContent v_cSEBaseResource; + vc_config := e_cf02CseSimuMaster; + vc_testSystemRole := e_cse; + vc_ae1 := AeSimu.create("AE1") alive; // Map map(self:mccPort, system:mccPort); - map(vc_aeSimu:mcaPort, system:mcaPort); + map(self:mccPortIn, system:mccPortIn); map(self:acPort, system:acPort); activate(a_default()); - activate(a_cse_cseSimu()); + activate(a_cse_cf02_cse1()); + vc_ae1.start(f_cf02UpAe1()); + vc_ae1.done; + + v_cSEBaseResource := f_cse_generateLocalResource(-, -1, int5); + vc_cSEBaseIndex := f_setLocalResource(v_cSEBaseResource, int5, -1); // Connect - f_connectInfoPort(vc_aeSimu); + //Initialze the IUT } // end f_cf02UpCseSimuMaster + /** + @desc Ports mapping and default behaviour activation for Config 2 on the AE1 + */ + function f_cf02UpAe1() runs on AeSimu { + + // Variables + vc_config := e_cf02CseSimuMaster; + vc_testSystemRole := e_ae; + + // Map + map(self:mcaPort, system:mcaPort); + map(self:mcaPortIn, system:mcaPortIn); + map(self:acPort, system:acPort); + + activate(a_default()); + activate(a_cse_cf02_ae1()); + + //Initialze the IUT + + } // end f_cf02UpAe1 + /** * @desc Ports mapping and default behaviour activation for Config 03 */ @@ -123,10 +179,12 @@ module OneM2M_Functions { // Variables vc_config := e_cf03; + vc_testSystemRole := e_cse; // Map - map(self:mcaPort, system:mcaPort); + map(self:mcaPortIn, system:mcaPortIn);//TODO To be consistent, we should use mcaPortIn for AE testing map(self:acPort, system:acPort); + map(self:utPort, system:utPort); activate(a_default()); activate(a_ae_cf03()); @@ -142,45 +200,31 @@ module OneM2M_Functions { function f_cf04Up() runs on CseSimu { // Variables + var PrimitiveContent v_cSEBaseResource; vc_config := e_cf04; + vc_testSystemRole := e_cse; + // Map map(self:mccPort, system:mccPort); + map(self:mccPortIn, system:mccPortIn); map(self:acPort, system:acPort); activate(a_default()); activate(a_cse_cf04()); + + //Creation of CSEBase + + v_cSEBaseResource := f_cse_generateLocalResource(-, -1, int5); + vc_cSEBaseIndex := f_setLocalResource(v_cSEBaseResource, int5, -1); // Connect - //Initialze the IUT + //Initialize the IUT } // end f_cf03Up /** * @desc Ports unmapping - * @verdict - */ - /*function f_cfCseTesterDown() runs on Tester { - - if(vc_config == e_cf01) { - f_cf01Down() - } else if (vc_config == e_cf02){ - f_cf02Down() - } - } - /** - * @desc Ports unmapping - * @verdict - */ - /*function f_cfAeTesterDown() runs on AeSimu { - - if(vc_config == e_cf03) { - f_cf03Down() - } - } - /** - * @desc Ports unmapping - * @verdict */ function f_cf01Down() runs on AeSimu { @@ -188,12 +232,12 @@ module OneM2M_Functions { unmap(self:acPort, system:acPort); if(vc_auxiliaryAe2Up) { vc_ae2.start(f_cf01DownAe2()); + vc_ae2.done; } } /** * @desc Ports unmapping - * @verdict */ function f_cf01DownAe2() runs on AeSimu { @@ -204,32 +248,33 @@ module OneM2M_Functions { /** * @desc Ports unmapping - * @verdict */ function f_cf02Down() runs on AeSimu { unmap(self:mcaPort, system:mcaPort); - unmap(vc_cseSimu:mccPort, system:mccPort); unmap(self:acPort, system:acPort); - unmap(vc_cseSimu:acPort, system:acPort); + unmap(vc_cse1:mccPort, system:mccPort); + unmap(vc_cse1:mccPortIn, system:mccPortIn); + unmap(vc_cse1:acPort, system:acPort); } /** * @desc Ports unmapping - * @verdict */ function f_cf02DownCseSimuMaster() runs on CseSimu { unmap(self:mccPort, system:mccPort); - unmap(vc_aeSimu:mcaPort, system:mcaPort); + unmap(self:mccPortIn, system:mccPortIn); unmap(self:acPort, system:acPort); - unmap(vc_aeSimu:acPort, system:acPort); + unmap(vc_ae1:mcaPort, system:mcaPort); + unmap(vc_ae1:acPort, system:acPort); } /** * @desc Ports unmapping for Config 03 */ function f_cf03Down() runs on CseSimu { - unmap(self:mcaPort, system:mcaPort); + unmap(self:mcaPortIn, system:mcaPortIn); + unmap(self:utPort, system:utPort); unmap(self:acPort, system:acPort); } @@ -239,20 +284,202 @@ module OneM2M_Functions { function f_cf04Down() runs on CseSimu { unmap(self:mccPort, system:mccPort); + unmap(self:mccPortIn, system:mccPortIn); unmap(self:acPort, system:acPort); } - + + }//end group configFunctions + + group InfoPortCommunication { + + /** + * @desc Connection of InfoPort of two components + * @param p_tester PTC where InfoPort is to be connected + */ function f_connectInfoPort(in Tester p_tester) runs on Tester { // Connect connect(self:infoPort, p_tester:infoPort); } + /** + * @desc Disconnection of InfoPort of two components + * @param p_tester PTC where InfoPort is to be connected + */ function f_disconnectInfoPort(in Tester p_tester) runs on Tester { // Disconnect disconnect(self:infoPort, p_tester:infoPort); } + + /** + * @desc Getting last responsePrimitive saved in a component + * @param p_tester Given component + */ + function f_getResponsePrimitive(in Tester p_component) runs on Tester return ResponsePrimitive { + var ResponsePrimitive v_response; + + f_connectInfoPort(p_component); + + p_component.start(f_sendResponsePrimitive()); + alt { + []infoPort.receive(mw_responsePrimitiveforInfoPort) -> value v_response { + } + } + + f_disconnectInfoPort(p_component); + + return v_response; + + } - }//end group configFunctions + /** + * @desc Getting last requestPrimitive saved in an AeSimu component + * @param p_tester Given component + */ + function f_getRequestPrimitive(in Tester p_component) runs on Tester return RequestPrimitive { + var RequestPrimitive v_request; + + f_connectInfoPort(p_component); + + p_component.start(f_sendRequestPrimitive()); + alt { + []infoPort.receive(mw_requestPrimitiveforInfoPort) -> value v_request { + } + } + + f_disconnectInfoPort(p_component); + + return v_request; + + } + + /** + * @desc Getting primitiveContent retrieved in an AeSimu component + * @param p_tester AeSimu component + */ + function f_getPrimitiveContentRetrievedResource(in AeSimu p_ae) runs on Tester return PrimitiveContent { + var PrimitiveContent v_primitiveContent; + + f_connectInfoPort(p_ae); + + p_ae.start(f_sendPrimitiveContentRetrievedResource()); + alt { + []infoPort.receive(mw_primitiveContent) -> value v_primitiveContent { + } + } + + f_disconnectInfoPort(p_ae); + + return v_primitiveContent; + + } + + /** + * @desc Getting remoteCSE resource from a CseSimu component + * @param p_tester CseSimu component + */ + function f_getRemoteCseResource(in CseSimu p_cse) runs on Tester return integer { + var MyResource v_resource; + var integer v_resourceIndex := -1; + + f_connectInfoPort(p_cse); + + 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, false); + } + } + + f_disconnectInfoPort(p_cse); + + return v_resourceIndex; + + } + + /** + * @desc Getting a specific resource from an AeSimu component + * @param p_tester AeSimu component + * @param p_resourceIndex Index of resource to be retrieved + */ + function f_getResource(in Tester p_component, in integer p_resourceIndex := -1) runs on Tester return integer { + var MyResource v_resource; + var integer v_resourceIndex := -1; + + f_connectInfoPort(p_component); + + p_component.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, false); + } + } + + f_disconnectInfoPort(p_component); + + return v_resourceIndex; + + } + + /** + * @desc Sending of last responsePrimitive (vc_response) through InfoPort + */ + function f_sendResponsePrimitive() runs on Tester { + + infoPort.send(vc_response.primitive.responsePrimitive); + + } + + /** + * @desc Sending of last requestPrimitive (vc_request) through InfoPort + */ + function f_sendRequestPrimitive() runs on Tester { + + infoPort.send(vc_request.primitive.requestPrimitive); + + } + + /** + * @desc Sending of last primitiveContent retrieved (vc_primitiveContentRetrievedResource) through InfoPort + */ + function f_sendPrimitiveContentRetrievedResource() runs on AeSimu { + + infoPort.send(vc_primitiveContentRetrievedResource); + + } + + /** + * @desc Sending of remoteCSE resource through InfoPort + */ + function f_sendRemoteCseResource() runs on CseSimu { + + infoPort.send(vc_resourcesList[vc_remoteCseIndex]); + + } + + /** + * @desc Sending of Ae resource through InfoPort + */ + function f_sendAeResource() runs on AeSimu { + + infoPort.send(vc_resourcesList[vc_aeAuxIndex]); + + } + + /** + * @desc Sending of a specific resource through InfoPort + * @param p_resourceIndex Index of resource to be sent + */ + function f_sendResource(in integer p_resourceIndex) runs on Tester { + + if(p_resourceIndex == -1) { + infoPort.send(vc_resourcesList[vc_aeAuxIndex]); //TODO To send Ae or RemoteCSE depending on the component type + } else { + infoPort.send(vc_resourcesList[p_resourceIndex]); + } + + } + + }// end of gropu InfoPortCommunication group CseFunctions { @@ -272,8 +499,9 @@ module OneM2M_Functions { /** - * @desc Creation of auxiliar resources ACP and AE for correct execution of the test case - * @param p_allowedOperations Allowed operations for the auxiliar AE resource + * @desc Creation of auxiliar resource AE for correct execution of the test case + * @param p_accessControlPolicyIDs AccessControlPolicyIDs for the auxiliar AE resource + * @param p_poaList Point of contact of the auxiliar AE resource * @return Internal AE resource index * @verdict */ @@ -281,7 +509,6 @@ module OneM2M_Functions { var RequestPrimitive v_request; var MsgIn v_response; - var integer v_aeAuxIndex := -1; v_request := valueof(m_createAeAux(p_accessControlPolicyIDs, p_poaList)); @@ -325,29 +552,26 @@ module OneM2M_Functions { f_checkAeSimuStatus(); return vc_aeAuxIndex; - } /** * @desc Creation of auxiliar resources ACP and AE for correct execution of the test case * @param p_allowedOperations Allowed operations for the auxiliar AE resource + * @param p_appId AppID of the AE resource to be created * @return Internal AE resource index * @verdict */ function f_cse_preamble_registerAeWithId(XSD.ID p_appId, in template (value) AccessControlOperations p_allowedOperations := int63) runs on AeSimu return integer {//c_CRUDNDi var RequestPrimitive v_request; - var integer v_aeAuxIndex := -1; - var integer v_acpAuxIndex := -1; - + if(PICS_ACP_SUPPORT){ - v_acpAuxIndex := f_cse_createAccessControlPolicyAux(p_allowedOperations := p_allowedOperations); - vc_acpAuxIndex := v_acpAuxIndex; + vc_acpAuxIndex := f_cse_createAccessControlPolicyAux(p_allowedOperations := p_allowedOperations); } - if(v_acpAuxIndex != -1) { - vc_resourcesIndexToBeDeleted := {v_acpAuxIndex}; - v_request := valueof(m_createAe(p_appId, {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -)); + if(vc_acpAuxIndex != -1) { + vc_resourcesIndexToBeDeleted := {vc_acpAuxIndex}; + v_request := valueof(m_createAe(p_appId, {f_getResourceId(vc_resourcesList[vc_acpAuxIndex].resource)}, -)); //TODO Test, to be removed v_request.to_ := f_getResourceAddress(); @@ -395,6 +619,12 @@ module OneM2M_Functions { } + /** + * @desc Creation of ServiceSubscribedAppRule resource + * @param p_allowedAEs Allowed AEs + * @return Internal resource index + * @verdict + */ function f_cse_preamble_createServiceSubscribedAppRule(in template ListOfM2MID p_allowedAEs := {""}) runs on AeSimu return integer {//c_CRUDNDi var integer v_serviceSubscribedAppRuleIndex := -1; @@ -405,6 +635,12 @@ module OneM2M_Functions { } + /** + * @desc Creation of SubscribedProfile resource + * @param p_allowedAEs Allowed AEs + * @return Internal resource index + * @verdict + */ function f_cse_preamble_createServiceSubscribedProfile(in template ListOfM2MID p_allowedAEs := {""}) runs on AeSimu return integer {//c_CRUDNDi var integer v_serviceSubscribedAppRuleIndex := -1; @@ -420,6 +656,14 @@ module OneM2M_Functions { } + /** + * @desc Registration of AE2 for handling of notifications and handling of subscription verification started if subscription resource is to be created + * @param p_ae2Index Internal AE2 resource index + * @param p_createRequestPrimitive CREATE Request for the resource to be created + * @param p_resourceType ResourceType of the resource to be created + * @param p_responseStatusCode Response Status Code to be sent in response to the subscription verification request + * @verdict + */ function f_cse_preamble_subscriptionVerification(inout integer p_ae2Index, inout template RequestPrimitive p_createRequestPrimitive,in ResourceType p_resourceType, in ResponseStatusCode p_responseStatusCode := int2001) runs on AeSimu { if(p_resourceType == int23){ @@ -440,7 +684,7 @@ module OneM2M_Functions { group PostambleFunctions { /** - * @desc Deletion of all resources created during the test case execution. IUT gets clean and ready for next execution + * @desc Deletion of all resources created during the test case execution. It deals also with AE2 created resources if any. IUT gets clean and ready for next execution * @verdict */ function f_cse_postamble_deleteResources() runs on AeSimu { @@ -485,7 +729,7 @@ module OneM2M_Functions { } /** - * @desc Calls to postamble for AE2 entity + * @desc Calls to postamble for AeSimu components (i.e. AE2) * @verdict */ function f_cse_postamble_aeSimu(in AeSimu p_ae) runs on AeSimu { @@ -522,184 +766,19 @@ module OneM2M_Functions { tc_ac.stop; log(__SCOPE__&" INFO: Resource " & v_request.to_ & " deleted"); } - [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - log(__SCOPE__&" INFO: Error while deleting resource " & v_request.to_); - } - [] tc_ac.timeout { - log(__SCOPE__&" INFO: No answer while deleting resource " & v_request.to_); - } - } - - } - } - - } - - /** - @desc - */ - function f_getResponsePrimitive(in AeSimu p_ae) runs on Tester return ResponsePrimitive { - var ResponsePrimitive v_response; - - f_connectInfoPort(p_ae); - - p_ae.start(f_sendResponsePrimitive()); - alt { - []infoPort.receive(mw_responsePrimitiveforInfoPort) -> value v_response { - } - } - - f_disconnectInfoPort(p_ae); - - return v_response; - - } - - /** - @desc - */ - function f_getRequestPrimitive(in AeSimu p_ae) runs on Tester return RequestPrimitive { - var RequestPrimitive v_request; - - f_connectInfoPort(p_ae); - - p_ae.start(f_sendRequestPrimitive()); - alt { - []infoPort.receive(mw_requestPrimitiveforInfoPort) -> value v_request { - } - } - - f_disconnectInfoPort(p_ae); - - return v_request; - - } - - function f_getRemoteCseRequestPrimitive(in CseSimu p_cse) runs on Tester return RequestPrimitive { - var RequestPrimitive v_request; - - f_connectInfoPort(p_cse); - - p_cse.start(f_sendRemoteCseRequestPrimitive()); - alt { - []infoPort.receive(mw_requestPrimitiveforInfoPort) -> value v_request { - } - } - - f_disconnectInfoPort(p_cse); - - return v_request; - - } - - - /** - @desc - */ - function f_getPrimitiveContentRetrievedResource(in AeSimu p_ae) runs on Tester return PrimitiveContent { - var PrimitiveContent v_primitiveContent; - - f_connectInfoPort(p_ae); - - p_ae.start(f_sendPrimitiveContentRetrievedResource()); - alt { - []infoPort.receive(mw_primitiveContent) -> value v_primitiveContent { - } - } - - f_disconnectInfoPort(p_ae); - - return v_primitiveContent; - - } - - /** - @desc - */ - function f_getRemoteCseResource(in CseSimu p_cse) runs on AeSimu return integer { - var MyResource v_resource; - var integer v_resourceIndex := -1; - - f_connectInfoPort(p_cse); - - 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, false); - } - } - - f_disconnectInfoPort(p_cse); - - return v_resourceIndex; - - } - - /** - @desc - */ - function f_getResource(in AeSimu p_ae, in integer p_resourceIndex := -1) runs on AeSimu return integer { - var MyResource v_resource; - var integer v_resourceIndex := -1; - - f_connectInfoPort(p_ae); - - 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, false); - } - } - - f_disconnectInfoPort(p_ae); - - p_ae.done; - - return v_resourceIndex; - - } - - function f_sendResponsePrimitive() runs on AeSimu { - - infoPort.send(vc_response.primitive.responsePrimitive); - - } - - function f_sendRequestPrimitive() runs on AeSimu { - - infoPort.send(vc_request.primitive.requestPrimitive); - - } - - function f_sendRemoteCseRequestPrimitive() runs on CseSimu { - - infoPort.send(vc_request.primitive.requestPrimitive); - - } - - function f_sendPrimitiveContentRetrievedResource() runs on AeSimu { - - infoPort.send(vc_primitiveContentRetrievedResource); - - } - - function f_sendRemoteCseResource() runs on CseSimu { - - infoPort.send(vc_resourcesList[vc_remoteCseIndex]); - - } + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + log(__SCOPE__&" INFO: Error while deleting resource " & v_request.to_); + } + [] tc_ac.timeout { + log(__SCOPE__&" INFO: No answer while deleting resource " & v_request.to_); + } + } - function f_sendResource(in integer p_resourceIndex) runs on AeSimu { - - if(p_resourceIndex == -1) { - infoPort.send(vc_resourcesList[vc_aeAuxIndex]); - } else { - infoPort.send(vc_resourcesList[p_resourceIndex]); + } } - - } + } }//end group postambleFunctions @@ -708,7 +787,7 @@ module OneM2M_Functions { /** * @desc Creation of a resource * @param p_resourceType Resource type of the resource to be created - * @param p_requestPrimitive Template request primitive + * @param p_requestPrimitive CREATE request primitive for the resource to be created * @param p_parentIndex Internal resource index which indicates the parent of the resource to be created * @return Internal resource index of the created resource * @verdict @@ -793,35 +872,10 @@ module OneM2M_Functions { return v_acpAuxIndex; } - - - /** - * @desc Creation of the auxiliar Container resource - * @param p_parentIndex Internal resource index which indicates the parent of the Container resource to be created - * @return Internal resource index of the created Container resource - * @verdict - */ - function f_cse_createContainerResourceAux (integer p_parentIndex := -1) runs on AeSimu return integer { - - var RequestPrimitive v_request; - var integer v_acpAuxIndex := -1; - var integer v_containerResourceIndex := -1; - - v_acpAuxIndex := f_cse_createAccessControlPolicyAux(p_acpName := c_acpAuxName);//"MyAcp_2" - - v_request := valueof(m_createContainerBase); - v_request.primitiveContent.container.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}; - v_request.primitiveContent.container.resourceName := "MyContainerAux"; - - v_containerResourceIndex := f_cse_createResource(int3, v_request, p_parentIndex); - - return v_containerResourceIndex; - - } - + /** - * @desc - * @param p_requestPrimitive + * @desc Message exchange for the update of a resource + * @param p_requestPrimitive UPDATE request primitive to be used * @verdict */ function f_cse_updateResource(in RequestPrimitive p_requestPrimitive) runs on AeSimu { @@ -851,8 +905,9 @@ module OneM2M_Functions { }// end f_cse_updateResource /** - * @desc - * @param p_resourceIndex + * @desc Message exchange for the retrieval of a resource + * @param p_resourceIndex Resource index of the resource to be retrieved + * @return PrimitiveContent parameter of the RETRIEVE response * @verdict */ function f_cse_retrieveResource(integer p_resourceIndex) runs on AeSimu return PrimitiveContent{ @@ -881,11 +936,12 @@ module OneM2M_Functions { return vc_response.primitive.responsePrimitive.primitiveContent; - }// end f_cse_retrievingResource + }// end f_cse_retrieveResource /** - * @desc - * @param p_requestPrimitive + * @desc Message exchange for the deletion of a resource + * @param p_index Resource index of the resource to be deleted + * @param p_requestPrimitive DELETE request to be used. If not present default DELETE request will be used * @verdict */ function f_cse_deleteResource(in integer p_index, in template (omit) RequestPrimitive p_requestPrimitive := omit) runs on AeSimu { @@ -921,8 +977,8 @@ module OneM2M_Functions { }// end f_cse_deleteResource /** - * @desc Check that a resource is present in the IUT (resourceId is known) - * @param p_resourceIndex Resource index + * @desc Check that a resource is present in the IUT (resourceId is known) by using RETRIEVE operation + * @param p_resourceIndex Resource index of the resource to be checked * @return boolean */ function f_isResourcePresent (integer p_resourceIndex) runs on AeSimu return boolean { @@ -949,10 +1005,39 @@ module OneM2M_Functions { return false; } + /** + * @desc Check that a resource is present in the IUT (resourceId is known) by using RETRIEVE operation + * @param p_resourceIndex Resource index of the resource to be checked + * @return boolean + */ + function f_isResourcePresentCseSimu (integer p_resourceIndex) runs on CseSimu return boolean { + + //Check to see if the resource is present or not + mccPort.send(m_request(m_retrieveResource(f_getResourceAddress(p_resourceIndex), f_getOriginator(p_resourceIndex)))); + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitive(int2000))) { + tc_ac.stop; + setverdict(pass, testcasename() & ": Resource present: " & f_getResourceAddress(p_resourceIndex)); + return true; + } + [] mccPort.receive(mw_response(mw_responsePrimitive(?, -))) { + tc_ac.stop; + setverdict(inconc, testcasename() & ": Wrong response status code in the response"); + return false; + } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": No answer while retrieving resource"); + return false; + } + } + return false; + } + /** * @desc Check that a resource is not present in the IUT (resourceId is NOT known) - * @param p_parentIndex Index of the parent resource - * @param p_resourceName Resource name (Hierarchical method is used) + * @param p_parentIndex Index of the parent resource of the resource to be checked + * @param p_resourceName Resource name (Hierarchical method is used) of the resource to be checked * @return boolean */ function f_isResourceNotPresent (integer p_parentIndex, XSD.String p_resourceName) runs on AeSimu return boolean { @@ -982,7 +1067,7 @@ module OneM2M_Functions { } /** - * @desc Update of the auxiliar ACP resource + * @desc Message exchange for the update of the auxiliar ACP resource * @param p_allowedOperations New allowed operations * @verdict */ @@ -1001,6 +1086,7 @@ module OneM2M_Functions { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { tc_ac.stop; setverdict(pass, __SCOPE__&":INFO: " & v_request.to_ & " resource updated successfuly"); + //TODO To save new values } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { tc_ac.stop; @@ -1015,9 +1101,9 @@ module OneM2M_Functions { } /** - * @desc Function to handle announcement of resources - * @param p_from - * @param p_to + * @desc Handling of announcement of resources + * @param p_from Expected originator of the request primitive + * @param p_to Expected receiver of the request primitive * @verdict */ //TODO To finalize this function @@ -1028,16 +1114,16 @@ module OneM2M_Functions { tc_ac.start; alt { - [] mccPort.receive(mw_request(mw_create(p_from, p_to))) -> value v_request { + [] mccPortIn.receive(mw_request(mw_create(p_from, p_to))) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__ & ":INFO: Announcement received"); //TODO Save resource and generate required attributes v_responsePrimitive := f_getCreateResponsePrimitive(v_request.primitive.requestPrimitive.resourceType, v_request.primitive.requestPrimitive); - mccPort.send(m_response(v_responsePrimitive)); + mccPortIn.send(m_response(v_responsePrimitive)); f_checkAttributesToBeSaved(v_request.primitive.requestPrimitive.resourceType, v_request.primitive.requestPrimitive, vc_response.primitive.responsePrimitive); f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, v_request.primitive.requestPrimitive.resourceType, vc_remoteCseIndex); } - [] mccPort.receive{ + [] mccPortIn.receive{ tc_ac.stop; setverdict(fail, __SCOPE__ & ":ERROR: Unexpected message received"); } @@ -1051,9 +1137,9 @@ module OneM2M_Functions { } //end f_cse_resourceAnnouncementHandler /** - * @desc Function for announcement of resources - * @param p_from - * @param p_to + * @desc Message exchange for the announcement of resources + * @param p_resourceType ResourceType of the resource to be announced + * @param p_requestPrimitive CREATE request to be used for the announcement * @verdict */ //TODO To finalize this function @@ -1068,17 +1154,17 @@ module OneM2M_Functions { mccPort.send(m_request(v_request)); tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { tc_ac.stop; setverdict(pass, __SCOPE__&":INFO: Resource type " & int2str(enum2int(p_resourceType)) & " created successfuly"); f_checkAttributesToBeSaved(p_resourceType, v_request, vc_response.primitive.responsePrimitive); v_resourceIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, p_resourceType, vc_remoteCseIndex); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) { tc_ac.stop; setverdict(inconc, __SCOPE__&":INFO: Error while creating resource type " & int2str(enum2int(p_resourceType))); } - [] mcaPort.receive { + [] mccPort.receive { tc_ac.stop; setverdict(inconc, __SCOPE__&":INFO: Unexpected message received"); } @@ -1091,8 +1177,16 @@ module OneM2M_Functions { return v_resourceIndex; - } //end f_cse_resourceAnnouncementHandler + } //end f_cse_announceResource + /** + * @desc Checking of returned important attributed (in response) in order to save properly internally + * @param p_resourceType ResourceType of the resource to be checked + * @param p_request Request primitive used for the CRU operation + * @param p_response Response primitive received + * @verdict + */ + //Note: This function will be continously extended with necessary attributes/resources function f_checkAttributesToBeSaved (ResourceType p_resourceType, RequestPrimitive p_request, inout ResponsePrimitive p_response) { select (p_resourceType) { case (int1) { @@ -1166,6 +1260,13 @@ module OneM2M_Functions { // TODO test that if the resource name is returned is the same resource name as used in the create message } + /** + * @desc Comparison of two URIs + * @param p_expectedURIIndex Resource index of the resource for which its URI is to be compared + * @param p_receivedURI URI to be compared + * @param p_response Response primitive received + * @verdict + */ function f_compareURIs(in integer p_expectedURIIndex, in XSD.ID p_receivedURI) runs on Tester return boolean{ // Local variables var boolean v_matchResult := false; @@ -1203,6 +1304,11 @@ module OneM2M_Functions { group NotificationFunctions { + /** + * @desc Handling message exchange for the subscription verification + * @param p_responseStatusCode Response Status Code to be used for the response to the verification request + * @verdict + */ function f_cse_notifyProcedure_subscriptionVerificationHandler(in ResponseStatusCode p_responseStatusCode := int2001) runs on AeSimu { // Local variables var ResponsePrimitive v_responsePrimitive; @@ -1250,6 +1356,11 @@ module OneM2M_Functions { } //end f_subscriptionVerificationHandler + /** + * @desc Handling message exchange for the notification procedure + * @param p_primitiveContent Expected primitiveContent in the notification + * @verdict + */ function f_cse_notifyProcedure_representationHandler(template PrimitiveContent p_primitiveContent) runs on AeSimu { // Local variables var ResponsePrimitive v_responsePrimitive; @@ -1280,6 +1391,11 @@ module OneM2M_Functions { } //end f_cse_notifyProcedure_representationHandler + /** + * @desc Handling message exchange for the notification procedure (aggregatedNotification) + * @param p_primitiveContent Expected primitiveContent in the notification + * @verdict + */ function f_cse_notifyProcedure_aggregatedNoficationHandler(template PrimitiveContent p_primitiveContent,in integer p_numberOfAggregatedNotification) runs on AeSimu { // Local variables var ResponsePrimitive v_responsePrimitive; @@ -1334,6 +1450,11 @@ module OneM2M_Functions { } //end f_cse_notifyProcedure_aggregatedNotificationHandler + /** + * @desc Handling message exchange for the notification procedure (deletion of subscription resource) + * @param p_notification Expected notification + * @verdict + */ function f_cse_notifyProcedure_subscriptionDeletionHandler( template Notification p_notification) runs on AeSimu { var ResponsePrimitive v_responsePrimitive; tc_ac.start; @@ -1358,6 +1479,10 @@ module OneM2M_Functions { } //end f_cse_notifyProcedure_subscriptionDeletionHandler + /** + * @desc Handling message exchange for the notification procedure (no notification expected) + * @verdict + */ function f_cse_notifyProcedure_noNotificationHandler() runs on AeSimu { // Local variables @@ -1374,6 +1499,12 @@ module OneM2M_Functions { } //end f_cse_notifyProcedure_noNotification Handler + /** + * @desc Checking of notification primitiveContent + * @param p_requestPrimitive Received Notification request + * @param p_primitiveContent Expected primitiveContent in the notification + * @verdict + */ function f_check_notificationContent(in RequestPrimitive p_requestPrimitive, template PrimitiveContent p_primitiveContent) runs on Tester return boolean{ // Local variables var boolean v_matchResult := false; @@ -1422,42 +1553,118 @@ module OneM2M_Functions { return v_matchResult; - } //end f_check_notificationContent + } //end f_check_notificationContent + + /** + * @desc Handling message exchange for the AE Annc update + * @param p_responseStatusCode Response Status Code to be used for the response to the AE Annc request + * @verdict + */ + //TODO TO BE FINALIZED + function f_cse_notifyProcedure_updateHandler() runs on CseSimu { + // Local variables + var ResponsePrimitive v_responsePrimitive; + var template Notification v_notificationRequest := mw_contentNotification_any; + + + //Preparation of Notification response to be sent + v_responsePrimitive := valueof(m_responseNotification(int2004, omit)); + + tc_ac.start; + alt { + [] mccPortIn.receive(mw_request(mw_notify(v_notificationRequest))) -> value vc_request { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ":INFO: Notification received"); + } + [] mccPortIn.receive{ + tc_ac.stop; + setverdict(fail, __SCOPE__ & ":ERROR: unexpected message received"); + stop; + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ":ERROR: No notification received"); + stop; + } + } + + v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier; + if(getverdict == pass) { + mccPortIn.send(m_httpResponse(v_responsePrimitive)); + } else { + v_responsePrimitive.responseStatusCode := int4000; + mccPortIn.send(m_httpResponse(v_responsePrimitive)); + } + + } //end f_cse_notifyProcedure_updateHandler - }// end of group NotificationFunctions + }// end of group NotificationFunctions + + /** + * @desc Check that a resource is present in the IUT (resourceId is known) + * @param p_resourceIndex Resource index + * @return boolean + */ + function f_cse_isResourcePresent (integer p_resourceIndex) runs on CseSimu return boolean { + + //Check to see if the resource is present or not + mccPort.send(m_request(m_retrieveResource(f_getResourceAddress(p_resourceIndex), f_getOriginator(p_resourceIndex)))); + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitive(int2000))) { + tc_ac.stop; + setverdict(pass, testcasename() & ": Resource present: " & f_getResourceAddress(p_resourceIndex)); + return true; + } + [] mccPort.receive(mw_response(mw_responsePrimitive(?, -))) { + tc_ac.stop; + setverdict(inconc, testcasename() & ": Wrong response status code in the response"); + return false; + } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": No answer while retrieving resource"); + return false; + } + } + return false; + } /** * @desc Registration of Test System (simulating a CSE) to the CSE IUT (creation of remoteCSE) * @param p_requestPrimitive Template request primitive + * @param p_primitiveContent Expected primitiveContent in the CREATE response primitive * @return Internal resource index of the created resource */ - function f_cse_registerRemoteCse(in template RequestPrimitive p_requestPrimitive) runs on CseSimu return integer { + function f_cse_registerRemoteCse(in template RequestPrimitive p_requestPrimitive, in template PrimitiveContent p_contentResponse := ?) runs on CseSimu return integer { var MsgIn v_response; var RequestPrimitive v_request; var integer v_resourceIndex := -1; + var integer v_localResourceIndex := -1; + var PrimitiveContent v_remoteCSEResource; v_request := f_getCreateRequestPrimitive(int16, p_requestPrimitive, -1); mccPort.send(m_request(v_request)); tc_ac.start; alt { - [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + [] mccPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { tc_ac.stop; - setverdict(pass, __SCOPE__&":INFO: Resource type RemoteCSE created successfuly"); + setverdict(pass, __SCOPE__&":INFO: Resource type remoteCSE created successfuly"); f_checkAttributesToBeSaved(int16, v_request, v_response.primitive.responsePrimitive); v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int16, -1); + v_remoteCSEResource := f_cse_generateLocalResource(v_response.primitive.responsePrimitive.primitiveContent, vc_cSEBaseIndex, int16); + v_localResourceIndex := f_setLocalResource(v_remoteCSEResource, int16, vc_cSEBaseIndex); } [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) { tc_ac.stop; - setverdict(inconc, __SCOPE__&":INFO: Error while creating resource type RemoteCSE"); + setverdict(inconc, __SCOPE__&":INFO: Error while creating resource type remoteCSE"); } [] mccPort.receive { tc_ac.stop; setverdict(inconc, __SCOPE__&":INFO: Unexpected message received"); } [] tc_ac.timeout { - setverdict(inconc, __SCOPE__&":INFO: No answer while creating resource type RemoteCSE"); + setverdict(inconc, __SCOPE__&":INFO: No answer while creating resource type remoteCSE"); } } @@ -1477,21 +1684,36 @@ module OneM2M_Functions { var MsgIn v_request; var ResponsePrimitive v_response; var PrimitiveContent v_remoteCSEResource; + var integer v_localResourceIndex := -1; var integer v_resourceIndex := -1; + var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE; + var charstring v_action := "Please, send a CSE registration request"; + + //send triggering primitive to SUT + f_sendUtPrimitive(v_utRequest,v_action); tc_ac.start; alt { [] mccPortIn.receive(mw_request(p_requestPrimitive)) -> value v_request { tc_ac.stop; - setverdict(pass, __SCOPE__&":INFO: Resource type RemoteCSE created successfuly"); - v_resourceIndex := f_cse_createLocalResource(v_request.primitive.requestPrimitive.primitiveContent, 1, int16, v_remoteCSEResource);//TODO Get index from v_request.primitive.requestPrimitive.to_ + setverdict(pass, __SCOPE__&":INFO: Resource type remoteCSE created successfuly"); + v_remoteCSEResource := f_cse_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, vc_cSEBaseIndex, int16);//TODO Get index from v_request.primitive.requestPrimitive.to_ + v_localResourceIndex := f_setLocalResource(v_remoteCSEResource, int16, vc_cSEBaseIndex); + + v_response := valueof(m_responsePrimitive(int2001,v_request.primitive.requestPrimitive.requestIdentifier)); + v_response.from_ := PX_CSE1_ID; + v_response.to_ := v_request.primitive.requestPrimitive.from_; + v_response.primitiveContent.remoteCSE := vc_localResourcesList[v_localResourceIndex].resource.remoteCSE; + mccPortIn.send(m_response(v_response)); + + v_resourceIndex := f_setResource(v_request.primitive.requestPrimitive.primitiveContent, int16, -1); } [] mccPortIn.receive { tc_ac.stop; setverdict(inconc, __SCOPE__&":INFO: Unexpected message received"); } [] tc_ac.timeout { - setverdict(inconc, __SCOPE__&":INFO: No answer while creating resource type RemoteCSE"); + setverdict(inconc, __SCOPE__&":INFO: No request received for creating resource type remoteCSE"); } } @@ -1500,41 +1722,24 @@ module OneM2M_Functions { return v_resourceIndex; } - - /** - * @desc Send a request to the CSE IUT from the Test System (simulating a CSE) - * @param p_requestPrimitive Template request primitive - * @return Internal resource index of the created resource - */ - function f_cse_sendCreateRequest(in template RequestPrimitive p_requestPrimitive) runs on CseSimu { - -//TODO: To be completed -// var RequestPrimitive v_request; -// -// v_request := f_getCreateRequestPrimitive(p_requestPrimitive); -// -// mccPort.send(m_request(v_request)); - - } - + /** * @desc Receive a request from the CSE IUT to the Test System (simulating a CSE) - * @param p_requestPrimitive Template request primitive - * @return Internal resource index of the created resource + * @param p_requestPrimitive Expected CREATE request primitive */ function f_cse_receiveCreateRequest(in template RequestPrimitive p_requestPrimitive := ?) runs on CseSimu { tc_ac.start; alt { - [] mccPort.receive(mw_request(p_requestPrimitive)) -> value vc_request { + [] mccPortIn.receive(mw_request(p_requestPrimitive)) -> value vc_request { tc_ac.stop; setverdict(pass, __SCOPE__&":INFO: CREATE Request received successfuly"); } - [] mccPort.receive(mw_request(?)) { + [] mccPortIn.receive(mw_request(?)) { tc_ac.stop; setverdict(fail, __SCOPE__&":INFO: Unexpected CREATE Request received"); } - [] mccPort.receive { + [] mccPortIn.receive { tc_ac.stop; setverdict(fail, __SCOPE__&":INFO: Unexpected message received"); } @@ -1548,51 +1753,67 @@ module OneM2M_Functions { } /** - * @desc Creates specified resource + * @desc Creation of a local resource (Test System simulating a CSE) * @param p_resource Resource to be created - * @param p_parentIndex Parent index of resource to be saved + * @param p_parentIndex Parent resource index of resource to be saved * @param p_resourceType Type of the resource to be created - * @param p_modifiedResource Assigned and/or modified fields - * @return Internal resource index of the saved resource or -1 + * @return Internal created resource */ - function f_cse_createLocalResource(in PrimitiveContent p_resource, in integer p_parentIndex, in ResourceType p_resourceType, out PrimitiveContent p_myResource) runs on CseSimu return integer { + function f_cse_generateLocalResource(in template(omit) PrimitiveContent p_resource := omit, in integer p_parentIndex, in ResourceType p_resourceType) runs on CseSimu return PrimitiveContent { - var integer v_resourceIndex := lengthof(vc_resourcesList); + var integer v_resourceIndex := lengthof(vc_localResourcesList); + var PrimitiveContent v_myResource; // TODO To review the code (use of indexes, generation of value for certain attributes, etc..) - if(p_resourceType == int16 and ispresent(p_resource)) { + if(p_resourceType == int5) { //CSEBase + v_myResource.cSEBase.resourceName := "CSEBase" & int2str(v_resourceIndex); + v_myResource.cSEBase.resourceType := p_resourceType; + v_myResource.cSEBase.resourceID := "CSEBase" & int2str(v_resourceIndex); + v_myResource.cSEBase.parentID := omit; //Following TS-0001, it must be NULL + v_myResource.cSEBase.creationTime := fx_generateTimestamp(); + v_myResource.cSEBase.creationTime := "20171231T012345"; + v_myResource.cSEBase.lastModifiedTime := v_myResource.cSEBase.creationTime; + v_myResource.cSEBase.cSE_ID := PX_CSE1_ID; + v_myResource.cSEBase.supportedResourceType := PX_CSE1_SRT; + v_myResource.cSEBase.pointOfAccess := {f_getAnnouncementTargetPoA(PX_PROTOCOL_BINDING, PX_CSE1_ADDRESS, "")}; + if (PX_MN_CSE){ + v_myResource.cSEBase.cseType := int1; //Tester is an IN-CSE + }else if (PX_IN_CSE){ + v_myResource.cSEBase.cseType := int2; //Tester is a MN-CSE + } + + }else if(p_resourceType == int16 and ispresent(p_resource)) { //RemoteCSE if(ischosen(p_resource.remoteCSE)){ - p_myResource.remoteCSE := p_resource.remoteCSE; + v_myResource.remoteCSE := valueof(p_resource.remoteCSE); if(not(ispresent(p_resource.remoteCSE.resourceName))) { - p_myResource.remoteCSE.resourceName := "remoteCSE" & int2char(v_resourceIndex); + v_myResource.remoteCSE.resourceName := "remoteCSE" & int2str(v_resourceIndex); } - p_myResource.remoteCSE.resourceType := p_resourceType; - p_myResource.remoteCSE.resourceID := "remoteCSE" & int2char(v_resourceIndex); - p_myResource.remoteCSE.parentID := f_getResourceId(vc_resourcesList[p_parentIndex].resource); - p_myResource.remoteCSE.creationTime := fx_generateTimestamp(); + v_myResource.remoteCSE.resourceType := p_resourceType; + v_myResource.remoteCSE.resourceID := "remoteCSE" & int2str(v_resourceIndex); + v_myResource.remoteCSE.parentID := f_getResourceId(vc_localResourcesList[p_parentIndex].resource); + v_myResource.remoteCSE.creationTime := fx_generateTimestamp(); + v_myResource.remoteCSE.creationTime := "20171231T012345"; if(not(ispresent(p_resource.remoteCSE.expirationTime))) { - p_myResource.remoteCSE.expirationTime := "20301231T012345"; + v_myResource.remoteCSE.expirationTime := "20301231T012345"; } - p_myResource.remoteCSE.lastModifiedTime := p_myResource.remoteCSE. creationTime; - p_myResource.remoteCSE.announceTo := omit; - p_myResource.remoteCSE.announcedAttribute := omit; + v_myResource.remoteCSE.lastModifiedTime := v_myResource.remoteCSE. creationTime; + v_myResource.remoteCSE.announceTo := omit; + v_myResource.remoteCSE.announcedAttribute := omit; if(not(ispresent(p_resource.remoteCSE.pointOfAccess))) { //TODO Create a pollingChannel resource - p_myResource.remoteCSE.pointOfAccess := omit; + v_myResource.remoteCSE.pointOfAccess := omit; } - if(vc_resourcesList[v_resourceIndex].resourceType == int5) { - p_myResource.remoteCSE.m2M_Ext_ID := omit; - p_myResource.remoteCSE.trigger_Recipient_ID:= omit; - } - p_myResource.remoteCSE.nodeLink := omit; - - return f_setResource(p_myResource, p_resourceType, p_parentIndex, false); + /*if(vc_localResourcesList[v_resourceIndex].resourceType == int5) { + v_myResource.remoteCSE.m2M_Ext_ID := omit; + v_myResource.remoteCSE.trigger_Recipient_ID:= omit; + }*/ + v_myResource.remoteCSE.nodeLink := omit; } } - return v_resourceIndex; + return v_myResource; }//End of function @@ -1631,11 +1852,11 @@ module OneM2M_Functions { } /** - * @desc Cse altstep for config 02 + * @desc Cse altstep for config 02 on CSE1 (AE1 as master) */ - altstep a_cse_cf02() runs on CseSimu { + altstep a_cse_cf02_cse1() runs on CseSimu { - [] mcaPort.receive { + [] mccPortIn.receive { log(__SCOPE__&": WARNING: Unexpected message received"); repeat; } @@ -1645,28 +1866,17 @@ module OneM2M_Functions { } } - /** - * @desc CseSimu altstep - */ - altstep a_cse_cseSimu() runs on CseSimu { - - [] mccPort.receive { - log(__SCOPE__&": WARNING: Unexpected message received"); - repeat; - } - } - - /** - * @desc Cse altstep for config 02 + /** + * @desc Cse altstep for config 02 on AE1 (CSE1 as master) */ - altstep a_cse_aeSimu() runs on AeSimu { - + altstep a_cse_cf02_ae1() runs on AeSimu + { [] mcaPort.receive { log(__SCOPE__&": WARNING: Unexpected message received"); repeat; } } - + /** * @desc Cse altstep for config 04 */ @@ -1688,6 +1898,7 @@ module OneM2M_Functions { /** * @desc Waits for AE registration request and process it + * @param p_utRequest UpperTester request primitive to be sent to the IUT * @return Internal resource index of AE or -1 in case of failure * @verdict inconc if no AE registration request is received */ @@ -1697,12 +1908,13 @@ module OneM2M_Functions { var PrimitiveContent v_modifiedResource; var integer v_resourceIndex, v_parentIndex; var RequestPrimitive v_rp; + var charstring v_action := "Please, register the AE on the Tester"; if(not(ispresent(p_utRequest.primitiveContent))) { p_utRequest.primitiveContent.aE := m_contentCreateAe(omit, omit, omit, omit); } - f_sendUtPrimitive(p_utRequest); + f_sendUtPrimitive(p_utRequest, v_action); tc_ac.start; alt { @@ -1736,6 +1948,7 @@ module OneM2M_Functions { /** * @desc Waits for Container create request and process it + * @param p_utRequest UpperTester request primitive to be sent to the IUT * @return Internal resource index of Container or -1 in case of failure * @verdict inconc if no Container create request is received */ @@ -1745,12 +1958,13 @@ module OneM2M_Functions { var PrimitiveContent v_modifiedResource; var integer v_resourceIndex, v_parentIndex; var RequestPrimitive v_rp; + var charstring v_action := "Please, create a Container resource on the Tester"; if(not(ispresent(p_utRequest.primitiveContent))) { p_utRequest.primitiveContent.container := m_contentCreateContainer; } - f_sendUtPrimitive(p_utRequest); + f_sendUtPrimitive(p_utRequest, v_action); tc_ac.start; alt { @@ -1908,9 +2122,13 @@ module OneM2M_Functions { if(p_resourceType != int2) { if(p_resourceType == int16) { - p_request.from_ := f_getOriginator(p_parentIndex, false); - } else { - p_request.from_ := f_getOriginator(p_parentIndex); + p_request.from_ := PX_CSE1_ID; + } else { + if(vc_testSystemRole == e_ae) { + p_request.from_ := f_getOriginator(p_parentIndex); + } else {//vc_testSystemRole == e_cse + p_request.from_ := f_getOriginator(p_parentIndex, false); + } } } p_request.to_ := f_getResourceAddress(p_parentIndex); @@ -2096,6 +2314,10 @@ module OneM2M_Functions { if(ischosen(p_contentResource.serviceSubscribedAppRule)) { return f_resourceIdCleaner(p_contentResource.serviceSubscribedAppRule.resourceID); } + if(ischosen(p_contentResource.remoteCSE)) { + return f_resourceIdCleaner(p_contentResource.remoteCSE.resourceID); + } + log(__SCOPE__&":WARNING: Primitive Content Kind not implemented"); return "resourceIDNotFound"; @@ -2309,6 +2531,71 @@ module OneM2M_Functions { } } + + /** + * @desc Resolution of the resource address field (to) for a given resource depending on addressing and hierarchical format + * @param p_targetResourceIndex Internal resource index of the given resource + * @return Resource address for the given resource + * @verdict + */ + function f_getLocalResourceAddress(integer p_targetResourceIndex := -1, AddressingMethod p_addressingMethod := PX_ADDRESSING_METHOD, PrimitiveScope p_primitiveScope := PX_PRIMITIVE_SCOPE) runs on CseSimu return XSD.ID { + var XSD.ID v_resourceAddress; + + if(p_primitiveScope == e_cseRelative) { + + if(p_addressingMethod == e_nonHierarchical) { + if(p_targetResourceIndex == -1) { + return PX_CSE1_RESOURCE_ID; + } else { + return f_getResourceId(vc_localResourcesList[p_targetResourceIndex].resource); + } + } else { + if(p_targetResourceIndex == -1) { + return PX_CSE1_NAME; + } else { + v_resourceAddress := f_getResourceAddress(vc_localResourcesList[p_targetResourceIndex].parentIndex, p_addressingMethod, p_primitiveScope) & "/" & f_getResourceName(vc_localResourcesList[p_targetResourceIndex].resource); + return v_resourceAddress; + } + } + + } else if (p_primitiveScope == e_spRelative) { + if(p_addressingMethod == e_nonHierarchical) { + if(p_targetResourceIndex == -1) { + return PX_CSE1_ID & "/" & PX_CSE1_RESOURCE_ID; + } else { + v_resourceAddress := PX_CSE_ID & "/" & f_getResourceId(vc_localResourcesList[p_targetResourceIndex].resource); + return v_resourceAddress; + } + } else { + if(p_targetResourceIndex == -1) { + return PX_CSE1_ID & "/" & PX_CSE1_NAME; + } else { + v_resourceAddress := f_getResourceAddress(vc_localResourcesList[p_targetResourceIndex].parentIndex, p_addressingMethod, p_primitiveScope) & "/" & f_getResourceName(vc_localResourcesList[p_targetResourceIndex].resource); + return v_resourceAddress; + } + } + } else if (p_primitiveScope == e_absolute) { + if(p_addressingMethod == e_nonHierarchical) { + if(p_targetResourceIndex == -1) { + return PX_SP1_ID & PX_CSE1_ID; + } else { + v_resourceAddress := f_getResourceAddress(-, p_addressingMethod, p_primitiveScope) & "/" & f_getResourceId(vc_localResourcesList[p_targetResourceIndex].resource); + return v_resourceAddress; + } + } else { + if(p_targetResourceIndex == -1) { + return PX_SP1_ID & PX_CSE1_ID & "/" & PX_CSE1_NAME; + } else { + v_resourceAddress := f_getResourceAddress(vc_localResourcesList[p_targetResourceIndex].parentIndex, p_addressingMethod, p_primitiveScope) & "/" & f_getResourceName(vc_localResourcesList[p_targetResourceIndex].resource); + return v_resourceAddress; + } + } + } else { + return ""; + } + + } + /** * @desc Saving of a resource and its parent index in the internal resource list * @param p_resource Resource to be saved @@ -2335,6 +2622,27 @@ module OneM2M_Functions { } + /** + * @desc Saving of a local resource and its parent index in the internal resource list + * @param p_resource Resource to be saved + * @param p_parentIndex Parent index of resource to be saved + * @return Internal resource index of the saved resource + * @verdict + */ + function f_setLocalResource(PrimitiveContent p_resource, ResourceType p_resourceType, integer p_parentIndex := -1) runs on CseSimu return integer { + var integer v_newIndex := -1; + if(isbound(vc_localResourcesList)) { + vc_localResourcesList[lengthof(vc_localResourcesList)] := {p_parentIndex, p_resourceType, p_resource}; + } else { + vc_localResourcesList[0] := {p_parentIndex, p_resourceType, p_resource}; + } + + v_newIndex := lengthof(vc_localResourcesList)-1; + + return v_newIndex; + + } + /** * @desc Set Acpid into the requestPrimitive * @param p_requestPrimitive RequestPrimitive to be modified @@ -2522,10 +2830,10 @@ module OneM2M_Functions { group CommonFunctions { + /** - * @desc Sending of an Adapter Control primitive - * @param event Action to be performed by TA - * @param data Corresponding information for the correct execution of the given action + * @desc Boolean to charstring + * @param p_bool * @verdict */ function f_checkAeSimuStatus() runs on AeSimu { @@ -2536,8 +2844,8 @@ module OneM2M_Functions { if(vc_config == e_cf01) { f_cf01Down(); } else if (vc_config ==e_cf02) { - vc_cseSimu.start(f_cse_postamble_deleteResourcesCSE()); - vc_cseSimu.done; + vc_cse1.start(f_cse_postamble_deleteResourcesCSE()); + vc_cse1.done; f_cf02Down(); } stop; @@ -2610,27 +2918,37 @@ module OneM2M_Functions { } - function f_sendUtPrimitive(template UtTriggerPrimitive p_utRequest) runs on Tester { + function f_sendUtPrimitive(template UtTriggerPrimitive p_utRequest, in charstring p_action) runs on Tester { - p_utRequest.from_ := "UNINITIALIZED"; - p_utRequest.requestIdentifier := "m_uttriggerPrimitive" & f_rnd(1, 1000000); - - utPort.send(valueof(p_utRequest)); - - tc_wait.start; - alt{ - [] utPort.receive(mw_utResponseOK) { - tc_wait.stop; - setverdict(pass, __SCOPE__, " : Triggering message is successfully received!"); - } - [] utPort.receive(mw_utResponseKO) { - tc_wait.stop; - setverdict(inconc, __SCOPE__, " : Error while receiving Triggering message!"); - } - [] tc_wait.timeout{ - setverdict(inconc, __SCOPE__, " : Timeout due to no response received from requested SUT!"); + if (PX_UT_IMPLEMENTED){ + + p_utRequest.from_ := "UNINITIALIZED"; + p_utRequest.requestIdentifier := "m_uttriggerPrimitive" & f_rnd(1, 1000000); + + utPort.send(valueof(p_utRequest)); + + tc_wait.start; + alt{ + [] utPort.receive(mw_utResponseOK) { + tc_wait.stop; + setverdict(pass, __SCOPE__, " : Triggering message is successfully received!"); + } + [] utPort.receive(mw_utResponseKO) { + tc_wait.stop; + setverdict(inconc, __SCOPE__, " : Error while receiving Triggering message!"); + } + [] tc_wait.timeout{ + setverdict(inconc, __SCOPE__, " : Timeout due to no response received from requested SUT!"); + } } + + }else{ + + action(p_action); + } + + } @@ -2654,6 +2972,7 @@ module OneM2M_Functions { /** * @desc Get the Resource Identifier with Unstructured-CSE-relative -Resource-ID format + * @return Cleaned-up resourceID */ function f_resourceIdCleaner(in XSD.ID p_resourceID) return XSD.ID { var integer v_length := lengthof(p_resourceID); @@ -2715,6 +3034,12 @@ module OneM2M_Functions { } } + /** + * @desc Removal of an element from a given integer list + * @param p_list Given integer list + * @param p_valueToBeDeleted Element value to be removed + * @verdict + */ function f_removeElementFromList (inout IntegerList p_list, in integer p_valueToBeDeleted) { var IntegerList result := {}; var integer i; @@ -2726,6 +3051,12 @@ module OneM2M_Functions { p_list := result; } + /** + * @desc Build a reception template from the primitiveContent sent in previous request primitive + * @param p_primitiveContent PrimitiveContent from previous request primitive + * @return Built reception template + * @verdict + */ function f_getTemplateFromPrimitiveContent (in template PrimitiveContent p_primitiveContent) return template PrimitiveContent{ var template PrimitiveContent v_primitiveContent := omit; @@ -2978,6 +3309,12 @@ module OneM2M_Functions { return v_primitiveContent; } + /** + * @desc Comparison of two primitiveContent parameters + * @param p_responsePrimitiveContent Received primitiveContent + * @param p_requestPrimitiveContent Sent primitiveContent + * @verdict + */ function f_match2PrimitiveContent (in PrimitiveContent p_responsePrimitiveContent, in template PrimitiveContent p_requestPrimitiveContent) runs on Tester { var template PrimitiveContent v_primitiveContent; var PrimitiveContent v_response; diff --git a/LibOneM2M/OneM2M_Pics.ttcn b/LibOneM2M/OneM2M_Pics.ttcn index 3755ac9344b3b620bfc736c2bf9481b4715d37a0..8061df048d1a0fa20b317ee8598fd41e3b55dcc9 100644 --- a/LibOneM2M/OneM2M_Pics.ttcn +++ b/LibOneM2M/OneM2M_Pics.ttcn @@ -18,7 +18,8 @@ module OneM2M_Pics { * @see oneM2M TS-0017 A.5.5.1/1 */ modulepar boolean PICS_ACP_SUPPORT := true; - modulepar boolean PICS_IN_CSE := true; + modulepar boolean PICS_IN_CSE := true; + modulepar boolean PICS_MN_CSE := true; modulepar boolean PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT := true; modulepar boolean PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT := true; diff --git a/LibOneM2M/OneM2M_Pixits.ttcn b/LibOneM2M/OneM2M_Pixits.ttcn index 08d6e43cef67c8d2383b588b2f79079408c06b30..b083e1e781b9ad0aa9098cec53c0724e564fc3bd 100644 --- a/LibOneM2M/OneM2M_Pixits.ttcn +++ b/LibOneM2M/OneM2M_Pixits.ttcn @@ -27,6 +27,8 @@ module OneM2M_Pixits { modulepar charstring PX_SUT_ADDRESS := "127.0.0.1:8080"; + modulepar boolean PX_UT_IMPLEMENTED := false; + /** * @desc IUT CSE Name */ @@ -57,6 +59,14 @@ module OneM2M_Pixits { */ modulepar XSD.ID PX_SUPER_CSE_ID := "/admin:admin"; + modulepar XSD.IDREFS PX_ALLOWED_C_AE_IDS := {"C"}; + + modulepar XSD.IDREFS PX_NOT_ALLOWED_C_AE_IDS := {"MyAe"}; + + modulepar XSD.IDREFS PX_ALLOWED_S_AE_IDS := {"S"}; + + modulepar XSD.IDREFS PX_NOT_ALLOWED_S_AE_IDS := {"MyAe"}; + modulepar AddressingMethod PX_ADDRESSING_METHOD := e_hierarchical; modulepar PrimitiveScope PX_PRIMITIVE_SCOPE := e_cseRelative; @@ -67,7 +77,8 @@ module OneM2M_Pixits { modulepar charstring PX_XML_NAMESPACE := "m2m=""http://www.onem2m.org/xml/protocols"""; - modulepar ListOfURIs PX_ACOR := {"*"}; + modulepar ListOfURIs PX_ACOR := {"*"}; + } group TesterParameters { @@ -78,10 +89,31 @@ module OneM2M_Pixits { modulepar charstring PX_CSE1_ADDRESS := "127.0.0.1:3141"; + + /** + * @desc Test System CSE1 Name + */ + modulepar XSD.ID PX_CSE1_NAME := "CSE1_NAME"; + /** * @desc Test System CSE1-ID with SP-relative-CSE-ID format (relative) according to TS-0001-7.2-1 */ - modulepar XSD.ID PX_CSE1_ID := "/MyCSEId"; + modulepar XSD.ID PX_CSE1_ID := "/CSE1_ID"; + + /** + * @desc Test System CSE1 resource ID with Unstructured-CSE-relative-Resource-ID (relative) format according to TS-0001-7.2-1 + */ + modulepar XSD.ID PX_CSE1_RESOURCE_ID := "CSE1_RESOURCE_ID"; + + /** + * @desc CSE1 Supported resource type + */ + modulepar ResourceTypeList_1 PX_CSE1_SRT := {int1, int2, int3, int16}; + + /** + * @desc Test System M2M-SP1-ID with M2M-SP-ID format (absolute) according to TS-0001-7.2-1 Unstructured-CSE-relative -Resource-ID + */ + modulepar XSD.ID PX_SP1_ID := "//onem2m.org"; /** * @desc Test System AE1-ID with AE-ID-Stem format (relative) according to TS-0001-7.2-1 diff --git a/LibOneM2M/OneM2M_Templates.ttcn b/LibOneM2M/OneM2M_Templates.ttcn index b41a0cf15a25e3ffa59e8ff1964af2cd0a32d9df..8292bf8b573a30f46f9b918bde00fb11c46231a8 100644 --- a/LibOneM2M/OneM2M_Templates.ttcn +++ b/LibOneM2M/OneM2M_Templates.ttcn @@ -710,6 +710,14 @@ module OneM2M_Templates { primitiveContent := {remoteCSE := m_contentCreateRemoteCSE(p_resourceName, p_accessControlPolicyIds,p_cSEBase, p_cSE_ID)} }; + /** + * @desc Reception template for CREATE RemoteCSE + */ + template RequestPrimitive mw_createRemoteCSE(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := { + resourceType := int16, + primitiveContent := {remoteCSE := ?} //{remoteCSE := m_contentCreateRemoteCSE(p_resourceName, p_accessControlPolicyIds,p_cSEBase, p_cSE_ID)} + }; + /** * @desc CREATE request primitive for remoteCSE resource */ @@ -1134,7 +1142,7 @@ module OneM2M_Templates { tokenRequestIndicator := omit }; - template RequestPrimitive mw_deleteRequest(template XSD.ID p_resourceAddress := ?) := { + template RequestPrimitive mw_deleteRequest(template XSD.ID p_resourceAddress := ?, template XSD.ID p_from := *) := { operation := int4, to_ := p_resourceAddress, from_ := ?, @@ -1311,8 +1319,12 @@ module OneM2M_Templates { template PrimitiveContent m_primitiveContentCSEBase(template CSEBase_optional p_cSEBase) := { cSEBase := p_cSEBase } - - template PrimitiveContent mw_primitiveContent := ?; + + template PrimitiveContent m_primitiveContentRemoteCSE(template RemoteCSE_optional p_remoteCSE) := { + remoteCSE := p_remoteCSE + } + + template PrimitiveContent mw_primitiveContent := ?; /** * @desc Base primitiveContent for CREATE operation for AEAnnc resource @@ -3990,7 +4002,7 @@ module OneM2M_Templates { localTokenIDs := omit, tokenRequestIndicator := omit }; - + template (value) UtTriggerPrimitive m_utCreateContainer modifies m_utCreate := { requestIdentifier := testcasename() & "-m_utCreateContainer" & f_rnd(1, 1000000), resourceType := int3, @@ -4009,6 +4021,12 @@ module OneM2M_Templates { primitiveContent := {subscription := m_contentSubscription} } + template (value) UtTriggerPrimitive m_utCreateRemoteCSE modifies m_utCreate := { + requestIdentifier := testcasename() & "-m_utCreateRemoteCSE" & f_rnd(1, 1000000), + resourceType := int16, + primitiveContent := {remoteCSE := m_contentRemoteCSE_allOmit} + } + template (value) UtTriggerPrimitive m_utRetrieveResource(XSD.ID p_targetResourceAddress, in XSD.ID p_originator) := { operation := int2, to_ := p_targetResourceAddress, diff --git a/LibOneM2M/OneM2M_TestSystem.ttcn b/LibOneM2M/OneM2M_TestSystem.ttcn index d3551621706b17402d7fa64177c16a17d589ff22..78448491b8d7237feb8517c251124e9dc03dc7bd 100644 --- a/LibOneM2M/OneM2M_TestSystem.ttcn +++ b/LibOneM2M/OneM2M_TestSystem.ttcn @@ -31,13 +31,14 @@ module OneM2M_TestSystem { timer tc_wait := PX_TWAIT; //global variables var Configurations vc_config; + var TestSystemRole vc_testSystemRole; var MyResourcesList vc_resourcesList; var IntegerList vc_resourcesIndexToBeDeleted := {}; - //var PrimitiveScope vc_primitiveScope := PX_PRIMITIVE_SCOPE; - //var AddressingMethod vc_addressingMethod := PX_ADDRESSING_METHOD; - var integer vc_aeAuxIndex;//TODO To be removed - var integer vc_acpAuxIndex; + var integer vc_aeAuxIndex := -1;//TODO To be removed + var integer vc_acpAuxIndex := -1; var AccessControlPolicy_optional vc_acpAux; + var MsgIn vc_request; + var MsgIn vc_response; }; type component AeSimu extends Tester { @@ -48,24 +49,21 @@ module OneM2M_TestSystem { //global variables var PrimitiveContent vc_primitiveContentRetrievedResource; - var MsgIn vc_request; - var MsgIn vc_response; - var CseSimu vc_cseSimu;//For CF02 when AeSimu is master + var CseSimu vc_cse1;//For CF02 when AeSimu is master var boolean vc_auxiliaryAe2Up := false; - //var AeSimu vc_ae2; - }; type component CseSimu extends Tester { port OneM2MPort mcaPort; + port OneM2MPort mcaPortIn; port OneM2MPort mccPort; port OneM2MPort mccPortIn; //global variables - var AeSimu vc_aeSimu;//For CF02 when CseSimu is master + var MyResourcesList vc_localResourcesList; + var AeSimu vc_ae1;//For CF02 when CseSimu is master var integer vc_remoteCseIndex; - var MsgIn vc_request; - var MsgIn vc_response; + var integer vc_cSEBaseIndex; //Index of the CSEBase resource of the Tester inside vc_localResourcesList }; type component InCseSimu extends CseSimu {} @@ -76,12 +74,14 @@ module OneM2M_TestSystem { port OneM2MPort mcaPort; port OneM2MPort mcaPortIn; port OneM2MPort mccPort; + port OneM2MPort mccPortIn; port AdapterControlPort acPort; } type component AeSystem { port OneM2MPort mcaPort; port AdapterControlPort acPort; + port UpperTesterPort utPort; } diff --git a/LibOneM2M/OneM2M_Types.ttcn b/LibOneM2M/OneM2M_Types.ttcn index 5658d97968fe793999e91938ddad1fcba0c7da89..1cdc879112bd1adc60231581747eba31dcd6c9f2 100644 --- a/LibOneM2M/OneM2M_Types.ttcn +++ b/LibOneM2M/OneM2M_Types.ttcn @@ -8248,77 +8248,79 @@ group InvalidTypes { }//end group invalidTypes - group OtherTypes { +group OtherTypes { - type enumerated Configurations { - e_cf01, - e_cf02, - e_cf03, - e_cf04 - }; + type enumerated Configurations { + e_cf01, + e_cf02, + e_cf02CseSimuMaster, + e_cf03, + e_cf04 + }; + + type enumerated TestSystemRole { + e_cse, + e_ae + }; - type NhURI ParentID; + type NhURI ParentID; - type record MyResource { - integer parentIndex, - ResourceType resourceType, - PrimitiveContent resource - }; - - type record of MyResource MyResourcesList; + type record MyResource { + integer parentIndex, + ResourceType resourceType, + PrimitiveContent resource + }; - type record of integer IntegerList; + type record of MyResource MyResourcesList; - type enumerated PrimitiveScope { - e_cseRelative, - e_spRelative, - e_absolute - } + type record of integer IntegerList; - type enumerated AddressingMethod { - e_nonHierarchical, - e_hierarchical - } + type enumerated PrimitiveScope { + e_cseRelative, + e_spRelative, + e_absolute + } - type union Resource_2 { - //ResourceTypes - AEAnnc_optional aEAnnc, - AE_optional aE, - AccessControlPolicy_optional accessControlPolicy, - AccessControlPolicyAnnc_optional accessControlPolicyAnnc, - ContentInstance_optional contentInstance, - ContentInstanceAnnc_optional contentInstanceAnnc, - Container_optional container, - ContainerAnnc_optional containerAnnc, - FlexContainerResource_optional flexContainer, - CSEBase_optional cSEBase, - Group_optional group_, - GroupAnnc_optional groupAnnc, - LocationPolicy_optional locationPolicy, - LocationPolicyAnnc_optional locationPolicyAnnc, - MgmtResource_optional mgmtResource,//MgmtResource - AnnouncedMgmtResource_optional announcedMgmtResource,//AnnouncedMgmtResource - Node_optional node, - NodeAnnc_optional nodeAnnc, - PollingChannel_optional pollingChannel, - RemoteCSE_optional remoteCSE, - Schedule_optional schedule, - ScheduleAnnc_optional scheduleAnnc, - StatsConfig_optional statsConfig, - StatsCollect_optional statsCollect, - M2mServiceSubscriptionProfile_optional m2mServiceSubscriptionProfile, - ServiceSubscribedAppRule_optional serviceSubscribedAppRule, - Subscription_optional subscription, - SemanticDescriptor_optional semanticDescriptor, - GenericInterworkingOperationInstance_optional genericInterworkingOperationInstance - } - with { - variant "untagged"; - } + type enumerated AddressingMethod { + e_nonHierarchical, + e_hierarchical + } - type record of ResourceType ResourceTypeList_1; + type union Resource_2 { + //ResourceTypes + AEAnnc_optional aEAnnc, + AE_optional aE, + AccessControlPolicy_optional accessControlPolicy, + AccessControlPolicyAnnc_optional accessControlPolicyAnnc, + ContentInstance_optional contentInstance, + ContentInstanceAnnc_optional contentInstanceAnnc, + Container_optional container, + ContainerAnnc_optional containerAnnc, + CSEBase_optional cSEBase, + Group_optional group_, + GroupAnnc_optional groupAnnc, + LocationPolicy_optional locationPolicy, + LocationPolicyAnnc_optional locationPolicyAnnc, + MgmtResource_optional mgmtResource,//MgmtResource + AnnouncedMgmtResource_optional announcedMgmtResource,//AnnouncedMgmtResource + Node_optional node, + NodeAnnc_optional nodeAnnc, + PollingChannel_optional pollingChannel, + RemoteCSE_optional remoteCSE, + Schedule_optional schedule, + ScheduleAnnc_optional scheduleAnnc, + StatsConfig_optional statsConfig, + StatsCollect_optional statsCollect, + M2mServiceSubscriptionProfile_optional m2mServiceSubscriptionProfile, + ServiceSubscribedAppRule_optional serviceSubscribedAppRule, + Subscription_optional subscription } - + with { + variant "untagged"; + } + + type record of ResourceType ResourceTypeList_1; +} } with { encode "XML"; diff --git a/LibOneM2M/OneM2M_TypesAndValues.ttcn b/LibOneM2M/OneM2M_TypesAndValues.ttcn index b57c5746ce27ac2aa39b4ad84c40d6937494ebdd..44fb2540f026b1249b6dbadbf111b0f993913b6a 100644 --- a/LibOneM2M/OneM2M_TypesAndValues.ttcn +++ b/LibOneM2M/OneM2M_TypesAndValues.ttcn @@ -5,9 +5,9 @@ * © 2016, oneM2M Partners Type 1 (ARIB, ATIS, CCSA, ETSI, TIA, TSDSI, TTA, TTC). * All rights reserved. * - * @author oneM2M - * @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_TypesAndValues.ttcn $ - * $Id: OneM2M_TypesAndValues.ttcn 340 2017-08-07 12:08:41Z reinaortega $ + * @author ETSI + * @version $URL: https://oldforge.etsi.org/svn/oneM2M/branches/Release1/ttcn/LibOneM2M/OneM2M_TypesAndValues.ttcn $ + * $Id: OneM2M_TypesAndValues.ttcn 347 2017-08-11 08:48:20Z reinaortega $ * @desc Module containing types and values for oneM2M * */ diff --git a/OneM2M_TestControl.ttcn b/OneM2M_TestControl.ttcn deleted file mode 100644 index 2efff7b92919afa31ba357c92ebd571f8e3e6e97..0000000000000000000000000000000000000000 --- a/OneM2M_TestControl.ttcn +++ /dev/null @@ -1,356 +0,0 @@ -/** - * Copyright Notification - * No part of this document may be reproduced, in an electronic retrieval system or otherwise, except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * © 2016, oneM2M Partners Type 1 (ARIB, ATIS, CCSA, ETSI, TIA, TSDSI, TTA, TTC). - * All rights reserved. - * - * @author ETSI - * @version $URL: https://oldforge.etsi.org/svn/oneM2M/branches/Release1/ttcn/OneM2M_TestControl.ttcn $ - * $Id: OneM2M_TestControl.ttcn 347 2017-08-11 08:48:20Z reinaortega $ - * @desc Test control module for oneM2M - * - */ -module OneM2M_TestControl { - - - import from OneM2M_Testcases_CSE all; - - control { - execute(TC_CSE_GEN_CRE_001_CSR()); - execute(TC_CSE_GEN_CRE_001_SPR()); - execute(TC_CSE_GEN_CRE_001_ABS()); - execute(TC_CSE_GEN_RET_001_CSR()); - execute(TC_CSE_GEN_RET_001_SPR()); - execute(TC_CSE_GEN_RET_001_ABS()); - execute(TC_CSE_GEN_UPD_001_CSR()); - execute(TC_CSE_GEN_UPD_001_SPR()); - execute(TC_CSE_GEN_UPD_001_ABS()); - execute(TC_CSE_GEN_DEL_001_CSR()); - execute(TC_CSE_GEN_DEL_001_SPR()); - execute(TC_CSE_GEN_DEL_001_ABS()); - execute(TC_CSE_REG_CRE_001()); - execute(TC_CSE_REG_CRE_002()); - execute(TC_CSE_REG_CRE_004()); - execute(TC_CSE_REG_CRE_005()); - execute(TC_CSE_REG_CRE_008()); - execute(TC_CSE_REG_CRE_009()); - execute(TC_CSE_REG_CRE_010()); - execute(TC_CSE_REG_CRE_016_LBL()); - execute(TC_CSE_REG_CRE_016_CST()); - execute(TC_CSE_REG_CRE_016_POA()); - execute(TC_CSE_REG_CRE_016_NL()); - execute(TC_CSE_REG_CRE_022()); - execute(TC_CSE_REG_CRE_023()); - execute(TC_CSE_REG_CRE_025()); - execute(TC_CSE_REG_RET_001()); - execute(TC_CSE_REG_RET_005()); - execute(TC_CSE_REG_RET_008()); - execute(TC_CSE_REG_UPD_001()); - execute(TC_CSE_REG_DEL_001()); - - execute(TC_CSE_DMR_CRE_001_CNT_CB()); - execute(TC_CSE_DMR_CRE_001_CNT_AE()); - execute(TC_CSE_DMR_CRE_001_CNT_CNT()); - execute(TC_CSE_DMR_CRE_001_GRP_CB()); - execute(TC_CSE_DMR_CRE_001_GRP_AE()); - execute(TC_CSE_DMR_CRE_001_ACP_CB()); - execute(TC_CSE_DMR_CRE_001_ACP_AE()); - execute(TC_CSE_DMR_CRE_001_SCH_CB()); - execute(TC_CSE_DMR_CRE_001_SCH_AE()); - execute(TC_CSE_DMR_CRE_001_SCH_SUB()); - execute(TC_CSE_DMR_CRE_001_PCH_AE()); - execute(TC_CSE_DMR_CRE_001_SUB_CB()); - execute(TC_CSE_DMR_CRE_001_SUB_AE()); - execute(TC_CSE_DMR_CRE_001_SUB_CNT()); - execute(TC_CSE_DMR_CRE_001_SUB_ACP()); - execute(TC_CSE_DMR_CRE_001_SUB_SCH()); - execute(TC_CSE_DMR_CRE_001_SUB_GRP()); - execute(TC_CSE_DMR_CRE_001_NOD_CB()); - execute(TC_CSE_DMR_CRE_001_MGC_CB()); - execute(TC_CSE_DMR_CRE_001_LCP_CB()); - execute(TC_CSE_DMR_CRE_001_STCG_CB()); - execute(TC_CSE_DMR_CRE_001_STCL_CB()); - execute(TC_CSE_DMR_CRE_001_MSSP_CB()); - execute(TC_CSE_DMR_CRE_001_ASAR_CB()); - execute(TC_CSE_DMR_CRE_001_CIN_CNT()); - execute(TC_CSE_DMR_CRE_002_CNT()); - execute(TC_CSE_DMR_CRE_002_GRP()); - execute(TC_CSE_DMR_CRE_002_ACP()); - execute(TC_CSE_DMR_CRE_002_SCH()); - execute(TC_CSE_DMR_CRE_002_PCH()); - execute(TC_CSE_DMR_CRE_002_SUB()); - execute(TC_CSE_DMR_CRE_003_CNT()); - execute(TC_CSE_DMR_CRE_003_GRP()); - execute(TC_CSE_DMR_CRE_003_ACP()); - execute(TC_CSE_DMR_CRE_003_SCH()); - execute(TC_CSE_DMR_CRE_003_PCH()); - execute(TC_CSE_DMR_CRE_003_SUB()); - execute(TC_CSE_DMR_CRE_004_CNT()); - execute(TC_CSE_DMR_CRE_004_GRP()); - execute(TC_CSE_DMR_CRE_004_ACP()); - execute(TC_CSE_DMR_CRE_004_SCH()); - execute(TC_CSE_DMR_CRE_004_PCH()); - execute(TC_CSE_DMR_CRE_004_SUB()); - execute(TC_CSE_DMR_RET_001_CNT()); - execute(TC_CSE_DMR_RET_001_GRP()); - execute(TC_CSE_DMR_RET_001_ACP()); - execute(TC_CSE_DMR_RET_001_SCH()); - execute(TC_CSE_DMR_RET_001_PCH()); - execute(TC_CSE_DMR_RET_001_SUB()); - execute(TC_CSE_DMR_RET_001_CIN()); - execute(TC_CSE_DMR_RET_002()); - execute(TC_CSE_DMR_RET_003_CNT()); - execute(TC_CSE_DMR_RET_003_GRP()); - execute(TC_CSE_DMR_RET_003_ACP()); - execute(TC_CSE_DMR_RET_003_SCH()); - execute(TC_CSE_DMR_RET_003_PCH()); - execute(TC_CSE_DMR_RET_003_SUB()); - execute(TC_CSE_DMR_RET_004_CNT()); - execute(TC_CSE_DMR_RET_004_GRP()); - execute(TC_CSE_DMR_RET_004_ACP()); - execute(TC_CSE_DMR_RET_004_SCH()); - execute(TC_CSE_DMR_RET_004_PCH()); - execute(TC_CSE_DMR_RET_004_SUB()); - execute(TC_CSE_DMR_RET_005_CNT()); - execute(TC_CSE_DMR_RET_005_GRP()); - execute(TC_CSE_DMR_RET_005_ACP()); - execute(TC_CSE_DMR_RET_005_SCH()); - execute(TC_CSE_DMR_RET_005_PCH()); - execute(TC_CSE_DMR_RET_005_SUB()); - execute(TC_CSE_DMR_RET_006_CNT()); - execute(TC_CSE_DMR_RET_006_GRP()); - execute(TC_CSE_DMR_RET_006_ACP()); - execute(TC_CSE_DMR_RET_006_SCH()); - execute(TC_CSE_DMR_RET_006_PCH()); - execute(TC_CSE_DMR_RET_006_SUB()); - execute(TC_CSE_DMR_RET_007_CNT_LBL()); - execute(TC_CSE_DMR_RET_007_GRP_LBL()); - execute(TC_CSE_DMR_RET_007_ACP_LBL()); - execute(TC_CSE_DMR_RET_007_SCH_LBL()); - execute(TC_CSE_DMR_RET_007_PCH_LBL()); - execute(TC_CSE_DMR_RET_007_SUB_LBL()); - execute(TC_CSE_DMR_RET_008_CNT_AT()); - execute(TC_CSE_DMR_RET_008_GRP_AT()); - execute(TC_CSE_DMR_RET_008_ACP_AT()); - execute(TC_CSE_DMR_RET_008_SCH_AT()); - execute(TC_CSE_DMR_RET_008_PCH_AT()); - execute(TC_CSE_DMR_RET_008_SUB_AT()); - execute(TC_CSE_DMR_RET_020_RCN_0()); - execute(TC_CSE_DMR_RET_020_RCN_2()); - execute(TC_CSE_DMR_RET_020_RCN_3()); - execute(TC_CSE_DMR_RET_021_CNT()); - execute(TC_CSE_DMR_RET_021_GRP()); - execute(TC_CSE_DMR_RET_021_ACP()); - execute(TC_CSE_DMR_RET_021_SCH()); - execute(TC_CSE_DMR_RET_021_PCH()); - execute(TC_CSE_DMR_RET_021_SUB()); - execute(TC_CSE_DMR_RET_022_CNT()); - execute(TC_CSE_DMR_RET_022_GRP()); - execute(TC_CSE_DMR_RET_022_ACP()); - execute(TC_CSE_DMR_RET_022_SCH()); - execute(TC_CSE_DMR_RET_022_PCH()); - execute(TC_CSE_DMR_RET_022_SUB()); - execute(TC_CSE_DMR_RET_023_CNT()); - execute(TC_CSE_DMR_RET_023_GRP()); - execute(TC_CSE_DMR_RET_023_ACP()); - execute(TC_CSE_DMR_RET_023_SCH()); - execute(TC_CSE_DMR_RET_023_PCH()); - execute(TC_CSE_DMR_RET_023_SUB()); - execute(TC_CSE_DMR_RET_024_CNT()); - execute(TC_CSE_DMR_RET_024_GRP()); - execute(TC_CSE_DMR_RET_024_ACP()); - execute(TC_CSE_DMR_RET_024_SCH()); - execute(TC_CSE_DMR_RET_024_PCH()); - execute(TC_CSE_DMR_RET_024_SUB()); - execute(TC_CSE_DMR_UPD_001_CNT_LBL()); - execute(TC_CSE_DMR_UPD_001_GRP_LBL()); - execute(TC_CSE_DMR_UPD_001_ACP_LBL()); - execute(TC_CSE_DMR_UPD_001_SCH_LBL()); - execute(TC_CSE_DMR_UPD_001_PCH_LBL()); - execute(TC_CSE_DMR_UPD_001_SUB_LBL()); - execute(TC_CSE_DMR_UPD_002_CNT_LBL()); - execute(TC_CSE_DMR_UPD_002_GRP_LBL()); - execute(TC_CSE_DMR_UPD_002_ACP_LBL()); - execute(TC_CSE_DMR_UPD_002_SCH_LBL()); - execute(TC_CSE_DMR_UPD_002_PCH_LBL()); - execute(TC_CSE_DMR_UPD_002_SUB_LBL()); - execute(TC_CSE_DMR_UPD_003_CNT_LBL()); - execute(TC_CSE_DMR_UPD_003_GRP_LBL()); - execute(TC_CSE_DMR_UPD_003_ACP_LBL()); - execute(TC_CSE_DMR_UPD_003_SCH_LBL()); - execute(TC_CSE_DMR_UPD_003_PCH_LBL()); - execute(TC_CSE_DMR_UPD_003_SUB_LBL()); - execute(TC_CSE_DMR_UPD_004_CNT_ET_MNI_LBL()); - execute(TC_CSE_DMR_UPD_004_GRP_ET_GN_LBL()); - execute(TC_CSE_DMR_UPD_004_ACP_PV_AT_LBL()); - execute(TC_CSE_DMR_UPD_004_SCH_SE_AT_LBL()); - execute(TC_CSE_DMR_UPD_004_PCH_LBL_ACP_LBL()); - execute(TC_CSE_DMR_UPD_004_SUB_ET_LBL_EXC()); - execute(TC_CSE_DMR_UPD_005_CNT_EXC()); - execute(TC_CSE_DMR_UPD_005_GRP_EXC()); - execute(TC_CSE_DMR_UPD_005_ACP_EXC()); - execute(TC_CSE_DMR_UPD_005_SCH_EXC()); - execute(TC_CSE_DMR_UPD_005_PCH_EXC()); - execute(TC_CSE_DMR_UPD_005_SUB_MNI()); - execute(TC_CSE_DMR_UPD_006_CNT_LBL()); - execute(TC_CSE_DMR_UPD_006_GRP_LBL()); - execute(TC_CSE_DMR_UPD_006_ACP_LBL()); - execute(TC_CSE_DMR_UPD_006_SCH_LBL()); - execute(TC_CSE_DMR_UPD_006_PCH_LBL()); - execute(TC_CSE_DMR_UPD_006_SUB_LBL()); - execute(TC_CSE_DMR_UPD_007_CNT_CT()); - execute(TC_CSE_DMR_UPD_007_GRP_CT()); - execute(TC_CSE_DMR_UPD_007_ACP_CT()); - execute(TC_CSE_DMR_UPD_007_SCH_CT()); - execute(TC_CSE_DMR_UPD_007_PCH_CT()); - execute(TC_CSE_DMR_UPD_007_SUB_CT()); - execute(TC_CSE_DMR_UPD_008_CNT_ET()); - execute(TC_CSE_DMR_UPD_008_GRP_ET()); - execute(TC_CSE_DMR_UPD_008_ACP_ET()); - execute(TC_CSE_DMR_UPD_008_SCH_ET()); - execute(TC_CSE_DMR_UPD_008_PCH_ET()); - execute(TC_CSE_DMR_UPD_008_SUB_ET()); - execute(TC_CSE_DMR_UPD_010()); - execute(TC_CSE_DMR_DEL_001_CNT()); - execute(TC_CSE_DMR_DEL_001_GRP()); - execute(TC_CSE_DMR_DEL_001_ACP()); - execute(TC_CSE_DMR_DEL_001_SCH()); - execute(TC_CSE_DMR_DEL_001_PCH()); - execute(TC_CSE_DMR_DEL_001_SUB()); - execute(TC_CSE_DMR_DEL_001_CIN()); - execute(TC_CSE_DMR_DEL_002_CNT()); - execute(TC_CSE_DMR_DEL_002_GRP()); - execute(TC_CSE_DMR_DEL_002_ACP()); - execute(TC_CSE_DMR_DEL_002_SCH()); - execute(TC_CSE_DMR_DEL_002_PCH()); - execute(TC_CSE_DMR_DEL_002_SUB()); - execute(TC_CSE_DMR_DEL_003()); - execute(TC_CSE_DMR_DEL_004_CNT()); - execute(TC_CSE_DMR_DEL_004_GRP()); - execute(TC_CSE_DMR_DEL_004_ACP()); - execute(TC_CSE_DMR_DEL_004_SCH()); - execute(TC_CSE_DMR_DEL_004_PCH()); - execute(TC_CSE_DMR_DEL_004_SUB()); - execute(TC_CSE_DMR_DEL_005()); - execute(TC_CSE_DMR_DEL_007()); - execute(TC_CSE_DMR_DEL_008()); - execute(TC_CSE_DMR_DEL_009()); - execute(TC_CSE_DMR_DEL_010()); - execute(TC_CSE_LOC_BV_001()); - execute(TC_CSE_LOC_BV_002()); - execute(TC_CSE_LOC_BO_003()); - execute(TC_CSE_LOC_BO_004()); - execute(TC_CSE_LOC_BI_005()); - execute(TC_CSE_LOC_BV_006()); - execute(TC_CSE_LOC_BV_007()); - execute(TC_CSE_LOC_BV_008()); - execute(TC_CSE_LOC_BV_009_01()); - execute(TC_CSE_LOC_BV_009_02()); - execute(TC_CSE_LOC_BV_009_03()); - //execute(TC_CSE_LOC_BV_007()); - //execute(TC_CSE_LOC_BV_008()); - execute(TC_CSE_LOC_BV_012()); - execute(TC_CSE_LOC_BV_013()); - execute(TC_CSE_GMG_CRE_001()); - execute(TC_CSE_GMG_CRE_002()); - execute(TC_CSE_GMG_CRE_003()); - execute(TC_CSE_GMG_CRE_004()); - execute(TC_CSE_GMG_CRE_005()); - execute(TC_CSE_GMG_CRE_006()); - execute(TC_CSE_GMG_CRE_007()); - execute(TC_CSE_GMG_005_CRE()); - execute(TC_CSE_GMG_005_UPD()); - execute(TC_CSE_GMG_005_RET()); - execute(TC_CSE_GMG_005_DEL()); - execute(TC_CSE_GMG_006_CRE()); - execute(TC_CSE_GMG_006_UPD()); - execute(TC_CSE_GMG_006_RET()); - execute(TC_CSE_GMG_006_DEL()); - execute(TC_CSE_GMG_UPD_001()); - execute(TC_CSE_GMG_UPD_002()); - execute(TC_CSE_GMG_UPD_003()); - execute(TC_CSE_GMG_UPD_004()); - execute(TC_CSE_GMG_UPD_005()); - execute(TC_CSE_GMG_UPD_006()); - execute(TC_CSE_GMG_UPD_007()); - execute(TC_CSE_GMG_UPD_008()); - execute(TC_CSE_GMG_UPD_009()); - execute(TC_CSE_GMG_UPD_010()); - execute(TC_CSE_GMG_RET_001()); - execute(TC_CSE_GMG_001_CRE()); - execute(TC_CSE_GMG_001_UPD()); - execute(TC_CSE_GMG_001_RET()); - execute(TC_CSE_GMG_001_DEL()); - execute(TC_CSE_GMG_002_CRE()); - execute(TC_CSE_GMG_002_UPD()); - execute(TC_CSE_GMG_002_RET()); - execute(TC_CSE_GMG_002_DEL()); - execute(TC_CSE_GMG_003_CRE()); - execute(TC_CSE_GMG_003_UPD()); - execute(TC_CSE_GMG_003_RET()); - execute(TC_CSE_GMG_003_DEL()); - execute(TC_CSE_GMG_004_CRE()); - execute(TC_CSE_GMG_004_UPD()); - execute(TC_CSE_GMG_004_RET()); - execute(TC_CSE_GMG_004_DEL()); - execute(TC_CSE_DIS_001()); - execute(TC_CSE_DIS_003()); - execute(TC_CSE_DIS_004()); - execute(TC_CSE_DIS_005()); - execute(TC_CSE_DIS_006()); - execute(TC_CSE_DIS_007()); - execute(TC_CSE_SUB_CRE_001_SUB()); - execute(TC_CSE_SUB_CRE_001_CIN()); - execute(TC_CSE_SUB_CRE_002()); - execute(TC_CSE_SUB_CRE_003()); - execute(TC_CSE_SUB_CRE_004()); - execute(TC_CSE_SUB_CRE_005()); - execute(TC_CSE_SUB_NTF_001()); - execute(TC_CSE_SUB_NTF_002()); - execute(TC_CSE_SUB_NTF_003()); - execute(TC_CSE_SUB_UPD_001()); - execute(TC_CSE_SUB_UPD_002()); - execute(TC_CSE_SUB_UPD_003()); - execute(TC_CSE_SUB_UPD_004()); - execute(TC_CSE_SUB_UPD_005()); - execute(TC_CSE_SUB_UPD_006()); - execute(TC_CSE_SUB_UPD_007()); - execute(TC_CSE_SUB_UPD_008()); - execute(TC_CSE_SUB_UPD_009()); - execute(TC_CSE_SUB_DEL_001()); - execute(TC_CSE_SUB_DEL_002()); - execute(TC_CSE_SUB_DEL_003()); - - execute(TC_CSE_SEC_ACP_001_CRE()); - execute(TC_CSE_SEC_ACP_001_UPD()); - execute(TC_CSE_SEC_ACP_001_RET()); - execute(TC_CSE_SEC_ACP_001_DEL()); - execute(TC_CSE_SEC_ACP_002_CRE()); - execute(TC_CSE_SEC_ACP_002_UPD()); - execute(TC_CSE_SEC_ACP_002_RET()); - execute(TC_CSE_SEC_ACP_002_DEL()); - execute(TC_CSE_SEC_ACP_003_CRE()); - execute(TC_CSE_SEC_ACP_003_UPD()); - execute(TC_CSE_SEC_ACP_003_RET()); - execute(TC_CSE_SEC_ACP_003_DEL()); - execute(TC_CSE_SEC_ACP_004_CRE()); - execute(TC_CSE_SEC_ACP_004_UPD()); - execute(TC_CSE_SEC_ACP_004_RET()); - execute(TC_CSE_SEC_ACP_004_DEL()); - execute(TC_CSE_SEC_ACP_011_CRE()); - execute(TC_CSE_SEC_ACP_011_UPD()); - execute(TC_CSE_SEC_ACP_011_RET()); - execute(TC_CSE_SEC_ACP_011_DEL()); - execute(TC_CSE_SEC_ACP_012_CRE()); - execute(TC_CSE_SEC_ACP_012_UPD()); - execute(TC_CSE_SEC_ACP_012_RET()); - execute(TC_CSE_SEC_ACP_012_DEL()); - execute(TC_CSE_SEC_ACP_CRE_001()); - execute(TC_CSE_SEC_ACP_CRE_002()); - execute(TC_CSE_SEC_ACP_UPD_001()); - execute(TC_CSE_SEC_ACP_UPD_002()); - } - -} // end of module - diff --git a/OneM2M_TestControl_ADN_profile_3.ttcn b/OneM2M_TestControl_ADN_profile_3.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2734cfa2a8b3753c1af123541750bf7a1791011c --- /dev/null +++ b/OneM2M_TestControl_ADN_profile_3.ttcn @@ -0,0 +1,59 @@ +/** + * Copyright Notification + * No part of this document may be reproduced, in an electronic retrieval system or otherwise, except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * © 2016, oneM2M Partners Type 1 (ARIB, ATIS, CCSA, ETSI, TIA, TSDSI, TTA, TTC). + * All rights reserved. + * + * @author ETSI + * @version $URL: https://oldforge.etsi.org/svn/oneM2M/branches/Release1/ttcn/OneM2M_TestControl.ttcn $ + * $Id: OneM2M_TestControl.ttcn 347 2017-08-11 08:48:20Z reinaortega $ + * @desc Test control module for oneM2M + * + */ +module OneM2M_TestControl_ADN_profile_3 { + + + import from OneM2M_Testcases_AE all; + + control { + + //AE_GEN_00001 + if(true) {execute (TC_AE_GEN_CRE_001_CSR());} + if(true) {execute (TC_AE_GEN_CRE_001_SPR());} + if(true) {execute (TC_AE_GEN_CRE_001_ABS());} + if(true) {execute (TC_AE_GEN_CRE_002_CSR());} + if(true) {execute (TC_AE_GEN_CRE_002_SPR());} + if(true) {execute (TC_AE_GEN_CRE_002_ABS());} + if(true) {execute (TC_AE_GEN_UPD_001_CSR());} + if(true) {execute (TC_AE_GEN_UPD_001_SPR());} + if(true) {execute (TC_AE_GEN_UPD_001_ABS());} + if(true) {execute (TC_AE_GEN_UPD_002_CSR());} + if(true) {execute (TC_AE_GEN_UPD_002_SPR());} + if(true) {execute (TC_AE_GEN_UPD_002_ABS());} + if(true) {execute (TC_AE_GEN_RET_001_CSR());} + if(true) {execute (TC_AE_GEN_RET_001_SPR());} + if(true) {execute (TC_AE_GEN_RET_001_ABS());} + if(true) {execute (TC_AE_GEN_RET_002_CSR());} + if(true) {execute (TC_AE_GEN_RET_002_SPR());} + if(true) {execute (TC_AE_GEN_RET_002_ABS());} + if(true) {execute (TC_AE_GEN_DEL_001_CSR());} + if(true) {execute (TC_AE_GEN_DEL_001_SPR());} + if(true) {execute (TC_AE_GEN_DEL_001_ABS());} + if(true) {execute (TC_AE_GEN_DEL_002_CSR());} + if(true) {execute (TC_AE_GEN_DEL_002_SPR());} + if(true) {execute (TC_AE_GEN_DEL_002_ABS());} + //AE_GEN_00002 + if(true) {execute (TC_AE_DMR_CRE_001());} + //AE_REG_00002 + if(true) {execute (TC_AE_REG_CRE_001());} + if(true) {execute (TC_AE_REG_CRE_002_RR());} + //AE_DMR_00001 + if(true) {execute (TC_AE_DMR_CRE_001());} + //AE_DMR_00002 + if(true) {execute (TC_AE_DMR_CRE_002());} + + } + +} // end of module OneM2M_TestControl_ADN_profile_3 + diff --git a/OneM2M_TestControl_ADN_profile_4.ttcn b/OneM2M_TestControl_ADN_profile_4.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..464e3897bc8e441265c623d2c49c4a64249fa8e6 --- /dev/null +++ b/OneM2M_TestControl_ADN_profile_4.ttcn @@ -0,0 +1,128 @@ +/** + * Copyright Notification + * No part of this document may be reproduced, in an electronic retrieval system or otherwise, except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * © 2016, oneM2M Partners Type 1 (ARIB, ATIS, CCSA, ETSI, TIA, TSDSI, TTA, TTC). + * All rights reserved. + * + * @author ETSI + * @version $URL: https://oldforge.etsi.org/svn/oneM2M/branches/Release1/ttcn/OneM2M_TestControl.ttcn $ + * $Id: OneM2M_TestControl.ttcn 347 2017-08-11 08:48:20Z reinaortega $ + * @desc Test control module for oneM2M + * + */ +module OneM2M_TestControl_ADN_profile_4 { + + + import from OneM2M_Testcases_AE all; + + + control { + //AE_GEN_00001 + if(true) {execute (TC_AE_GEN_CRE_001_CSR());} + if(true) {execute (TC_AE_GEN_CRE_001_SPR());} + if(true) {execute (TC_AE_GEN_CRE_001_ABS());} + if(true) {execute (TC_AE_GEN_CRE_002_CSR());} + if(true) {execute (TC_AE_GEN_CRE_002_SPR());} + if(true) {execute (TC_AE_GEN_CRE_002_ABS());} + if(true) {execute (TC_AE_GEN_UPD_001_CSR());} + if(true) {execute (TC_AE_GEN_UPD_001_SPR());} + if(true) {execute (TC_AE_GEN_UPD_001_ABS());} + if(true) {execute (TC_AE_GEN_UPD_002_CSR());} + if(true) {execute (TC_AE_GEN_UPD_002_SPR());} + if(true) {execute (TC_AE_GEN_UPD_002_ABS());} + if(true) {execute (TC_AE_GEN_RET_001_CSR());} + if(true) {execute (TC_AE_GEN_RET_001_SPR());} + if(true) {execute (TC_AE_GEN_RET_001_ABS());} + if(true) {execute (TC_AE_GEN_RET_002_CSR());} + if(true) {execute (TC_AE_GEN_RET_002_SPR());} + if(true) {execute (TC_AE_GEN_RET_002_ABS());} + if(true) {execute (TC_AE_GEN_DEL_001_CSR());} + if(true) {execute (TC_AE_GEN_DEL_001_SPR());} + if(true) {execute (TC_AE_GEN_DEL_001_ABS());} + if(true) {execute (TC_AE_GEN_DEL_002_CSR());} + if(true) {execute (TC_AE_GEN_DEL_002_SPR());} + if(true) {execute (TC_AE_GEN_DEL_002_ABS());} + //AE_GEN_00002 + if(true) {execute (TC_AE_DMR_CRE_001());} + if(true) {execute (TC_AE_DMR_RET_001_CB());} + if(true) {execute (TC_AE_DMR_RET_001_AE());} + if(true) {execute (TC_AE_DMR_RET_001_CNT());} + if(true) {execute (TC_AE_DMR_UPD_002_LBL());} + if(true) {execute (TC_AE_DMR_DEL_003());} + //AE_REG_00001 + if(true) {execute (TC_AE_DMR_RET_001_CB());} + //AE_REG_00002 + if(true) {execute (TC_AE_REG_CRE_001());} + if(true) {execute (TC_AE_REG_CRE_002_RR());} + if(true) {execute (TC_AE_REG_CRE_002_RN());} + if(true) {execute (TC_AE_REG_CRE_002_ET());} + if(true) {execute (TC_AE_REG_CRE_002_LBL());} + if(true) {execute (TC_AE_REG_CRE_002_APN());} + if(true) {execute (TC_AE_REG_CRE_002_POA());} + if(true) {execute (TC_AE_REG_CRE_002_NL());} + if(true) {execute (TC_AE_REG_CRE_002_CSZ());} + if(true) {execute (TC_AE_DMR_UPD_001_ET());} + if(true) {execute (TC_AE_DMR_UPD_001_LBL());} + if(true) {execute (TC_AE_DMR_UPD_001_APN());} + if(true) {execute (TC_AE_DMR_UPD_001_POA());} + if(true) {execute (TC_AE_DMR_UPD_001_NL());} + if(true) {execute (TC_AE_DMR_UPD_001_RR());} + if(true) {execute (TC_AE_DMR_UPD_001_CSZ());} + if(true) {execute (TC_AE_REG_DEL_001());} + if(true) {execute (TC_AE_DMR_RET_001_AE());} + //AE/DMR/00001 + if(true) {execute (TC_AE_DMR_CRE_001());} + if(true) {execute (TC_AE_DMR_CRE_004_RN());} + if(true) {execute (TC_AE_DMR_CRE_004_ET());} + if(true) {execute (TC_AE_DMR_CRE_004_LBL());} + if(true) {execute (TC_AE_DMR_CRE_004_CR());} + if(true) {execute (TC_AE_DMR_CRE_004_MNI());} + if(true) {execute (TC_AE_DMR_CRE_004_MBS());} + if(true) {execute (TC_AE_DMR_CRE_004_MIA());} + if(true) {execute (TC_AE_DMR_UPD_002_ET());} + if(true) {execute (TC_AE_DMR_UPD_002_LBL());} + if(true) {execute (TC_AE_DMR_UPD_002_MNI());} + if(true) {execute (TC_AE_DMR_UPD_002_MBS());} + if(true) {execute (TC_AE_DMR_UPD_002_MIA());} + if(true) {execute (TC_AE_DMR_DEL_003());} + if(true) {execute (TC_AE_DMR_RET_004());} + //AE/DMR/00002 + if(true) {execute (TC_AE_DMR_CRE_002());} + if(true) {execute (TC_AE_DMR_CRE_003_RN());} + if(true) {execute (TC_AE_DMR_CRE_003_ET());} + if(true) {execute (TC_AE_DMR_CRE_003_LBL());} + if(true) {execute (TC_AE_DMR_CRE_003_CR());} + if(true) {execute (TC_AE_DMR_CRE_003_CNF());} + if(true) {execute (TC_AE_DMR_RET_005());} + if(true) {execute (TC_AE_DMR_RET_002());} + if(true) {execute (TC_AE_DMR_RET_003());} + if(true) {execute (TC_AE_DMR_DEL_004());} + if(true) {execute (TC_AE_DMR_DEL_001());} + if(true) {execute (TC_AE_DMR_DEL_002());} + + //Extendable features + //AE/REG/00002 + if(true) {execute (TC_AE_REG_CRE_002_API());} + if(true) {execute (TC_AE_REG_CRE_002_OR());} + if(true) {execute (TC_AE_DMR_UPD_001_OR());} + // AE/DMR/00001 + if(true) {execute (TC_AE_DMR_CRE_004_ACPI());} + if(true) {execute (TC_AE_DMR_CRE_004_OR());} + //if(true) {execute (TC_AE_DMR_CRE_004_LI());}//TODO To be implemented + //AE/SUB/00001 + //if(true) {execute (TC_AE_SUB_CRE_002_LBL());}//TODO To be implemented. TP As well + if(true) {execute (TC_AE_SUB_CRE_002_SU());} + if(true) {execute (TC_AE_SUB_CRE_002_ACPI());} + if(true) {execute (TC_AE_SUB_CRE_002_ENC());} + if(true) {execute (TC_AE_SUB_CRE_002_EXC());} + if(true) {execute (TC_AE_SUB_CRE_002_NFU());} + if(true) {execute (TC_AE_SUB_CRE_002_NCT());} + if(true) {execute (TC_AE_SUB_CRE_002_NEC());} + if(true) {execute (TC_AE_SUB_NTF_001());} + if(true) {execute (TC_AE_SUB_NTF_002());} + + } + +} // end of module OneM2M_TestControl_ADN_profile_4 + diff --git a/OneM2M_TestControl_ASN_profile.ttcn b/OneM2M_TestControl_ASN_profile.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ed54be502edfd5f9255a9cbf597e3d92783f7556 --- /dev/null +++ b/OneM2M_TestControl_ASN_profile.ttcn @@ -0,0 +1,63 @@ +/** + * Copyright Notification + * No part of this document may be reproduced, in an electronic retrieval system or otherwise, except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * © 2016, oneM2M Partners Type 1 (ARIB, ATIS, CCSA, ETSI, TIA, TSDSI, TTA, TTC). + * All rights reserved. + * + * @author ETSI + * @version $URL: https://oldforge.etsi.org/svn/oneM2M/branches/Release1/ttcn/OneM2M_TestControl.ttcn $ + * $Id: OneM2M_TestControl.ttcn 347 2017-08-11 08:48:20Z reinaortega $ + * @desc Test control module for oneM2M + * + */ +module OneM2M_TestControl_ASN_profile { + + + import from OneM2M_Testcases_CSE all; + + control { + + //CE_GEN_00001 + if(true) {execute (TC_CSE_GEN_CRE_001_CSR());} + if(true) {execute (TC_CSE_GEN_CRE_001_SPR());} + if(true) {execute (TC_CSE_GEN_CRE_001_ABS());} + if(true) {execute (TC_CSE_GEN_RET_001_CSR());} + if(true) {execute (TC_CSE_GEN_RET_001_SPR());} + if(true) {execute (TC_CSE_GEN_RET_001_ABS());} + if(true) {execute (TC_CSE_GEN_UPD_001_CSR());} + if(true) {execute (TC_CSE_GEN_UPD_001_SPR());} + if(true) {execute (TC_CSE_GEN_UPD_001_ABS());} + if(true) {execute (TC_CSE_GEN_DEL_001_CSR());} + if(true) {execute (TC_CSE_GEN_DEL_001_SPR());} + if(true) {execute (TC_CSE_GEN_DEL_001_ABS());} + if(true) {execute (TC_CSE_GEN_CRE_002_CSR());} + if(true) {execute (TC_CSE_GEN_CRE_002_SPR());} + if(true) {execute (TC_CSE_GEN_CRE_002_ABS());} + if(true) {execute (TC_CSE_GEN_RET_002_CSR());} + if(true) {execute (TC_CSE_GEN_RET_002_SPR());} + if(true) {execute (TC_CSE_GEN_RET_002_ABS());} + if(true) {execute (TC_CSE_GEN_UPD_002_CSR());} + if(true) {execute (TC_CSE_GEN_UPD_002_SPR());} + if(true) {execute (TC_CSE_GEN_UPD_002_ABS());} + if(true) {execute (TC_CSE_GEN_DEL_002_CSR());} + if(true) {execute (TC_CSE_GEN_DEL_002_SPR());} + if(true) {execute (TC_CSE_GEN_DEL_002_ABS());} + + //CE_GEN_00002 + + //CE_REG_00005 + if(true) {execute (TC_CSE_REG_CRE_024());} + if(true) {execute (TC_CSE_DMR_RET_013_CSR());} + if(true) {execute (TC_CSE_REG_CRE_026_POA());} + + //CE_DMR_00002 + if(true) {execute (TC_CSE_DMR_CRE_001_CIN_CNT());} + if(true) {execute (TC_CSE_DMR_RET_001_CIN());} + if(true) {execute (TC_CSE_DMR_UPD_011());} + if(true) {execute (TC_CSE_DMR_DEL_001_CIN());} + + } + +} // end of module OneM2M_TestControl_IN_profile + diff --git a/OneM2M_TestControl_Constrained_actuator_as_ADN.ttcn b/OneM2M_TestControl_Constrained_actuator_as_ADN.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2de47639bfa1401c5314731b18f1876e85138bea --- /dev/null +++ b/OneM2M_TestControl_Constrained_actuator_as_ADN.ttcn @@ -0,0 +1,61 @@ +/** + * Copyright Notification + * No part of this document may be reproduced, in an electronic retrieval system or otherwise, except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * © 2016, oneM2M Partners Type 1 (ARIB, ATIS, CCSA, ETSI, TIA, TSDSI, TTA, TTC). + * All rights reserved. + * + * @author ETSI + * @version $URL: https://oldforge.etsi.org/svn/oneM2M/branches/Release1/ttcn/OneM2M_TestControl.ttcn $ + * $Id: OneM2M_TestControl.ttcn 347 2017-08-11 08:48:20Z reinaortega $ + * @desc Test control module for oneM2M + * + */ +module OneM2M_TestControl_Constrained_actuator_as_ADN { + + + import from OneM2M_Testcases_AE all; + + + + control { + + //AE_GEN_00001 + if(true) {execute (TC_AE_GEN_CRE_001_CSR());} + if(true) {execute (TC_AE_GEN_CRE_001_SPR());} + if(true) {execute (TC_AE_GEN_CRE_001_ABS());} + if(true) {execute (TC_AE_GEN_CRE_002_CSR());} + if(true) {execute (TC_AE_GEN_CRE_002_SPR());} + if(true) {execute (TC_AE_GEN_CRE_002_ABS());} + if(true) {execute (TC_AE_GEN_UPD_001_CSR());} + if(true) {execute (TC_AE_GEN_UPD_001_SPR());} + if(true) {execute (TC_AE_GEN_UPD_001_ABS());} + if(true) {execute (TC_AE_GEN_UPD_002_CSR());} + if(true) {execute (TC_AE_GEN_UPD_002_SPR());} + if(true) {execute (TC_AE_GEN_UPD_002_ABS());} + if(true) {execute (TC_AE_GEN_RET_001_CSR());} + if(true) {execute (TC_AE_GEN_RET_001_SPR());} + if(true) {execute (TC_AE_GEN_RET_001_ABS());} + if(true) {execute (TC_AE_GEN_RET_002_CSR());} + if(true) {execute (TC_AE_GEN_RET_002_SPR());} + if(true) {execute (TC_AE_GEN_RET_002_ABS());} + if(true) {execute (TC_AE_GEN_DEL_001_CSR());} + if(true) {execute (TC_AE_GEN_DEL_001_SPR());} + if(true) {execute (TC_AE_GEN_DEL_001_ABS());} + if(true) {execute (TC_AE_GEN_DEL_002_CSR());} + if(true) {execute (TC_AE_GEN_DEL_002_SPR());} + if(true) {execute (TC_AE_GEN_DEL_002_ABS());} + //AE_GEN_00002 + if(true) {execute (TC_AE_DMR_CRE_001());} + //AE_REG_00002 + if(true) {execute (TC_AE_REG_CRE_001());} + if(true) {execute (TC_AE_REG_CRE_002_RR());} + if(true) {execute (TC_AE_REG_CRE_002_POA());} + //AE_SUB_00001 + if(true) {execute (TC_AE_SUB_CRE_001());} + + } + + +} // end of module OneM2M_TestControl_Constrained_actuator_as_ADN + diff --git a/OneM2M_TestControl_Constrained_sensor_as_ADN.ttcn b/OneM2M_TestControl_Constrained_sensor_as_ADN.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..568b32f7f0967c0dc5b6467b2caeba5bbeb9990b --- /dev/null +++ b/OneM2M_TestControl_Constrained_sensor_as_ADN.ttcn @@ -0,0 +1,83 @@ +/** + * Copyright Notification + * No part of this document may be reproduced, in an electronic retrieval system or otherwise, except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * © 2016, oneM2M Partners Type 1 (ARIB, ATIS, CCSA, ETSI, TIA, TSDSI, TTA, TTC). + * All rights reserved. + * + * @author ETSI + * @version $URL: https://oldforge.etsi.org/svn/oneM2M/branches/Release1/ttcn/OneM2M_TestControl.ttcn $ + * $Id: OneM2M_TestControl.ttcn 347 2017-08-11 08:48:20Z reinaortega $ + * @desc Test control module for oneM2M + * + */ +module OneM2M_TestControl_Constrained_sensor_as_ADN { + + + import from OneM2M_Testcases_AE all; + + + + control { + + //AE_GEN_00001 + if(true){execute (TC_AE_GEN_CRE_001_CSR());} + if(true){execute (TC_AE_GEN_CRE_001_SPR());} + if(true){execute (TC_AE_GEN_CRE_001_ABS());} + if(true){execute (TC_AE_GEN_CRE_002_CSR());} + if(true){execute (TC_AE_GEN_CRE_002_SPR());} + if(true){execute (TC_AE_GEN_CRE_002_ABS());} + if(true){execute (TC_AE_GEN_UPD_001_CSR());} + if(true){execute (TC_AE_GEN_UPD_001_SPR());} + if(true){execute (TC_AE_GEN_UPD_001_ABS());} + if(true){execute (TC_AE_GEN_UPD_002_CSR());} + if(true){execute (TC_AE_GEN_UPD_002_SPR());} + if(true){execute (TC_AE_GEN_UPD_002_ABS());} + if(true){execute (TC_AE_GEN_RET_001_CSR());} + if(true){execute (TC_AE_GEN_RET_001_SPR());} + if(true){execute (TC_AE_GEN_RET_001_ABS());} + if(true) {execute (TC_AE_GEN_RET_002_CSR());} + if(true) {execute (TC_AE_GEN_RET_002_SPR());} + if(true) {execute (TC_AE_GEN_RET_002_ABS());} + if(true) {execute (TC_AE_GEN_DEL_001_CSR());} + if(true) {execute (TC_AE_GEN_DEL_001_SPR());} + if(true) {execute (TC_AE_GEN_DEL_001_ABS());} + if(true) {execute (TC_AE_GEN_DEL_002_CSR());} + if(true) {execute (TC_AE_GEN_DEL_002_SPR());} + if(true) {execute (TC_AE_GEN_DEL_002_ABS());} + + //AE_GEN_00002 + if(true) {execute (TC_AE_DMR_CRE_001());} + + //AE_DMR_00002 + if(true) {execute (TC_AE_DMR_CRE_002());} + + + //Extendable feature set + //AE/REG/00002 + if(true) {execute (TC_AE_REG_CRE_001());} + if(true) {execute (TC_AE_REG_CRE_002_RR());} + if(true) {execute (TC_AE_REG_CRE_002_RN());} + if(true) {execute (TC_AE_REG_CRE_002_ET());} + if(true) {execute (TC_AE_REG_CRE_002_LBL());} + if(true) {execute (TC_AE_REG_CRE_002_APN());} + //AE/DMR/00001 + if(true) {execute (TC_AE_DMR_CRE_001());} + if(true) {execute (TC_AE_DMR_CRE_004_RN());} + if(true) {execute (TC_AE_DMR_CRE_004_ET());} + if(true) {execute (TC_AE_DMR_CRE_004_LBL());} + if(true) {execute (TC_AE_DMR_CRE_004_CR());} + if(true) {execute (TC_AE_DMR_CRE_004_MNI());} + if(true) {execute (TC_AE_DMR_CRE_004_MBS());} + if(true) {execute (TC_AE_DMR_CRE_004_MIA());} + //AE/DMR/00002 + if(true) {execute (TC_AE_DMR_CRE_003_RN());} + if(true) {execute (TC_AE_DMR_CRE_003_ET());} + if(true) {execute (TC_AE_DMR_CRE_003_LBL());} + if(true) {execute (TC_AE_DMR_CRE_003_CR());} + if(true) {execute (TC_AE_DMR_CRE_003_CNF());} + + } + +} // end of module OneM2M_TestControl_Constrained_sensor_as_ADN + diff --git a/OneM2M_TestControl_IN_profile.ttcn b/OneM2M_TestControl_IN_profile.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0484eea4b2a7cc8064e08e76c834eed526840e83 --- /dev/null +++ b/OneM2M_TestControl_IN_profile.ttcn @@ -0,0 +1,309 @@ +/** + * Copyright Notification + * No part of this document may be reproduced, in an electronic retrieval system or otherwise, except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * © 2016, oneM2M Partners Type 1 (ARIB, ATIS, CCSA, ETSI, TIA, TSDSI, TTA, TTC). + * All rights reserved. + * + * @author ETSI + * @version $URL: https://oldforge.etsi.org/svn/oneM2M/branches/Release1/ttcn/OneM2M_TestControl.ttcn $ + * $Id: OneM2M_TestControl.ttcn 347 2017-08-11 08:48:20Z reinaortega $ + * @desc Test control module for oneM2M + * + */ +module OneM2M_TestControl_IN_profile { + + + import from OneM2M_Testcases_CSE all; + + control { + + //CE_GEN_00001 + if(true) {execute (TC_CSE_GEN_CRE_001_CSR());} + if(true) {execute (TC_CSE_GEN_CRE_001_SPR());} + if(true) {execute (TC_CSE_GEN_CRE_001_ABS());} + if(true) {execute (TC_CSE_GEN_RET_001_CSR());} + if(true) {execute (TC_CSE_GEN_RET_001_SPR());} + if(true) {execute (TC_CSE_GEN_RET_001_ABS());} + if(true) {execute (TC_CSE_GEN_UPD_001_CSR());} + if(true) {execute (TC_CSE_GEN_UPD_001_SPR());} + if(true) {execute (TC_CSE_GEN_UPD_001_ABS());} + if(true) {execute (TC_CSE_GEN_DEL_001_CSR());} + if(true) {execute (TC_CSE_GEN_DEL_001_SPR());} + if(true) {execute (TC_CSE_GEN_DEL_001_ABS());} + if(true) {execute (TC_CSE_GEN_CRE_002_CSR());} + if(true) {execute (TC_CSE_GEN_CRE_002_SPR());} + if(true) {execute (TC_CSE_GEN_CRE_002_ABS());} + if(true) {execute (TC_CSE_GEN_RET_002_CSR());} + if(true) {execute (TC_CSE_GEN_RET_002_SPR());} + if(true) {execute (TC_CSE_GEN_RET_002_ABS());} + if(true) {execute (TC_CSE_GEN_UPD_002_CSR());} + if(true) {execute (TC_CSE_GEN_UPD_002_SPR());} + if(true) {execute (TC_CSE_GEN_UPD_002_ABS());} + if(true) {execute (TC_CSE_GEN_DEL_002_CSR());} + if(true) {execute (TC_CSE_GEN_DEL_002_SPR());} + if(true) {execute (TC_CSE_GEN_DEL_002_ABS());} + + //CE_GEN_00002 + + //CE_REG_00001 + if(true) {execute (TC_CSE_REG_CRE_021());} + if(true) {execute (TC_CSE_REG_RET_001());} + if(true) {execute (TC_CSE_REG_RET_008());} + if(true) {execute (TC_CSE_REG_UPD_001());} + if(true) {execute (TC_CSE_REG_DEL_001());} + if(true) {execute (TC_CSE_REG_RET_002_CST());} + if(true) {execute (TC_CSE_REG_RET_005());} + if(true) {execute (TC_CSE_REG_RET_002_NL());} + + //CE_REG_00002 + if(true) {execute (TC_CSE_REG_RET_003());} + if(true) {execute (TC_CSE_REG_DEL_003());} + if(true) {execute (TC_CSE_DMR_RET_013_AE());} + if(true) {execute (TC_CSE_DMR_UPD_016_AE_ET());} + if(true) {execute (TC_CSE_DMR_UPD_016_AE_RR());} + if(true) {execute (TC_CSE_REG_CRE_004());} + if(true) {execute (TC_CSE_REG_CRE_009());} + if(true) {execute (TC_CSE_REG_CRE_011());} + if(true) {execute (TC_CSE_REG_CRE_016());} + if(true) {execute (TC_CSE_REG_CRE_017_API());} + if(true) {execute (TC_CSE_REG_CRE_017_RR());} + if(true) {execute (TC_CSE_REG_CRE_022());} + if(true) {execute (TC_CSE_REG_CRE_023());} + if(true) {execute (TC_CSE_REG_CRE_012_AE_LBL());} + if(true) {execute (TC_CSE_REG_RET_004_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_015_AE_LBL());} + if(true) {execute (TC_CSE_REG_CRE_012_AE_APN());} + if(true) {execute (TC_CSE_REG_RET_004_APN());} + if(true) {execute (TC_CSE_DMR_UPD_015_AE_APN());} + if(true) {execute (TC_CSE_REG_CRE_012_AE_POA());} + if(true) {execute (TC_CSE_REG_RET_004_POA());} + if(true) {execute (TC_CSE_DMR_UPD_015_AE_POA());} + if(true) {execute (TC_CSE_REG_CRE_001());} + if(true) {execute (TC_CSE_REG_CRE_002());} + + //CE_REG_00004 + if(true) {execute (TC_CSE_REG_CRE_018());} + if(true) {execute (TC_CSE_REG_CRE_019());} + if(true) {execute (TC_CSE_REG_CRE_025());} + if(true) {execute (TC_CSE_REG_RET_006());} + if(true) {execute (TC_CSE_REG_RET_010());} + if(true) {execute (TC_CSE_REG_DEL_002());} + if(true) {execute (TC_CSE_DMR_UPD_016_CSR_ET());} + if(true) {execute (TC_CSE_DMR_UPD_016_CSR_RR());} + if(true) {execute (TC_CSE_REG_CRE_013_LBL());} + if(true) {execute (TC_CSE_REG_CRE_028_LBL());} + if(true) {execute (TC_CSE_REG_RET_007_LBL());} + if(true) {execute (TC_CSE_REG_UPD_002_LBL());} + if(true) {execute (TC_CSE_REG_CRE_013_CST());} + if(true) {execute (TC_CSE_REG_RET_007_CST());} + if(true) {execute (TC_CSE_REG_CRE_013_POA());} + if(true) {execute (TC_CSE_REG_CRE_028_POA());} + if(true) {execute (TC_CSE_REG_RET_007_POA());} + if(true) {execute (TC_CSE_REG_UPD_002_POA());} + if(true) {execute (TC_CSE_REG_CRE_013_NL());} + if(true) {execute (TC_CSE_REG_CRE_028_NL());} + if(true) {execute (TC_CSE_REG_RET_007_NL());} + if(true) {execute (TC_CSE_REG_UPD_002_NL());} + + + //CE_DMR_00001 + if(true) {execute (TC_CSE_DMR_CRE_001_CNT_CB());} + if(true) {execute (TC_CSE_DMR_CRE_001_CNT_AE());} + if(true) {execute (TC_CSE_DMR_CRE_001_CNT_CNT());} + if(true) {execute (TC_CSE_DMR_CRE_002_CNT());} + if(true) {execute (TC_CSE_DMR_CRE_003_CNT());} + if(true) {execute (TC_CSE_DMR_CRE_007 ());} + if(true) {execute (TC_CSE_DMR_CRE_008 ());} + if(true) {execute (TC_CSE_DMR_RET_001_CNT());} + if(true) {execute (TC_CSE_DMR_RET_013_CNT());} + if(true) {execute (TC_CSE_DMR_UPD_001_CNT_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_002_CNT_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_003_CNT_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_004_CNT_ET_MNI_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_005_CNT_EXC());} + if(true) {execute (TC_CSE_DMR_UPD_007_CNT_CT());} + if(true) {execute (TC_CSE_DMR_UPD_008_CNT_ET());} + //if(true) {execute (TC_CSE_DMR_UPD_009_CNT_LBL());}//TODO TO BE IMPLEMENTED + if(true) {execute (TC_CSE_DMR_UPD_016_CNT_ET());} + if(true) {execute (TC_CSE_DMR_DEL_001_CNT());} + if(true) {execute (TC_CSE_DMR_DEL_006());} + if(true) {execute (TC_CSE_DMR_CRE_012_CNT_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_014_CNT_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_015_CNT_LBL());} + if(true) {execute (TC_CSE_DMR_CRE_012_CNT_CR());} + if(true) {execute (TC_CSE_DMR_CRE_005_MNI());} + if(true) {execute (TC_CSE_DMR_CRE_006_MNI());} + if(true) {execute (TC_CSE_DMR_CRE_012_CNT_MNI());} + if(true) {execute (TC_CSE_DMR_UPD_014_CNT_MNI());} + if(true) {execute (TC_CSE_DMR_UPD_015_CNT_MNI());} + if(true) {execute (TC_CSE_DMR_CRE_005_MBS());} + if(true) {execute (TC_CSE_DMR_CRE_006_MBS());} + if(true) {execute (TC_CSE_DMR_CRE_012_CNT_MBS());} + if(true) {execute (TC_CSE_DMR_CRE_013());} + if(true) {execute (TC_CSE_DMR_UPD_014_CNT_MBS());} + if(true) {execute (TC_CSE_DMR_UPD_015_CNT_MBS());} + if(true) {execute (TC_CSE_DMR_CRE_005_MIA());} + if(true) {execute (TC_CSE_DMR_CRE_006_MIA());} + if(true) {execute (TC_CSE_DMR_CRE_012_CNT_MIA());} + if(true) {execute (TC_CSE_DMR_UPD_014_CNT_MIA());} + if(true) {execute (TC_CSE_DMR_UPD_015_CNT_MIA());} + + //CE_DMR_00002 + if(true) {execute (TC_CSE_DMR_CRE_001_CIN_CNT());} + if(true) {execute (TC_CSE_DMR_RET_001_CIN());} + if(true) {execute (TC_CSE_DMR_UPD_011());} + if(true) {execute (TC_CSE_DMR_DEL_001_CIN());} + if(true) {execute (TC_CSE_DMR_CRE_012_CIN_LBL());} + if(true) {execute (TC_CSE_DMR_CRE_012_CIN_CR());} + if(true) {execute (TC_CSE_DMR_CRE_012_CIN_CNF());} + if(true) {execute (TC_CSE_DMR_RET_012());} + if(true) {execute (TC_CSE_DMR_UPD_012());} + if(true) {execute (TC_CSE_DMR_DEL_007());} + if(true) {execute (TC_CSE_DMR_RET_010());} + if(true) {execute (TC_CSE_DMR_UPD_013());} + if(true) {execute (TC_CSE_DMR_DEL_009());} + + //CE_SUB_00001 + if(true) {execute (TC_CSE_DMR_CRE_001_SUB_CB());} + if(true) {execute (TC_CSE_DMR_CRE_001_SUB_AE());} + if(true) {execute (TC_CSE_DMR_CRE_001_SUB_CNT());} + if(true) {execute (TC_CSE_DMR_CRE_001_SUB_ACP());} + if(true) {execute (TC_CSE_DMR_CRE_001_SUB_CSR());} + if(true) {execute (TC_CSE_DMR_CRE_002_SUB());} + if(true) {execute (TC_CSE_DMR_CRE_003_SUB());} + if(true) {execute (TC_CSE_DMR_RET_001_SUB());} + if(true) {execute (TC_CSE_DMR_RET_013_SUB());} + if(true) {execute (TC_CSE_DMR_UPD_001_SUB_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_002_SUB_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_003_SUB_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_004_SUB_ET_LBL_EXC());} + if(true) {execute (TC_CSE_DMR_UPD_005_SUB_MNI());} + if(true) {execute (TC_CSE_DMR_UPD_007_SUB_CT());} + if(true) {execute (TC_CSE_DMR_UPD_008_SUB_ET());} + //if(true) {execute (TC_CSE_DMR_UPD_009_SUB_LBL());}TODO TO BE IMPLEMENTED + if(true) {execute (TC_CSE_DMR_UPD_016_SUB_ET());} + if(true) {execute (TC_CSE_DMR_UPD_016_SUB_NU());} + if(true) {execute (TC_CSE_DMR_UPD_016_SUB_NCT());} + if(true) {execute (TC_CSE_DMR_DEL_001_SUB());} + if(true) {execute (TC_CSE_DMR_CRE_012_SUB_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_014_SUB_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_015_SUB_LBL());} + if(true) {execute (TC_CSE_DMR_CRE_012_SUB_CR());} + + //CE_SUB_00004 + if(true) {execute (TC_CSE_SUB_CRE_001_SUB());} + if(true) {execute (TC_CSE_SUB_CRE_001_CIN());} + if(true) {execute (TC_CSE_SUB_CRE_003());} + if(true) {execute (TC_CSE_SUB_CRE_005());} + if(true) {execute (TC_CSE_SUB_UPD_001());} + if(true) {execute (TC_CSE_SUB_DEL_001());} + if(true) {execute (TC_CSE_SUB_CRE_004());} + + //CE_SEC_00001 + if(true) {execute (TC_CSE_DMR_CRE_001_ACP_CB());} + if(true) {execute (TC_CSE_DMR_CRE_001_ACP_AE());} + if(true) {execute (TC_CSE_DMR_CRE_002_ACP());} + if(true) {execute (TC_CSE_DMR_CRE_003_ACP());} + if(true) {execute (TC_CSE_DMR_RET_001_ACP());} + if(true) {execute (TC_CSE_DMR_RET_013_ACP());} + if(true) {execute (TC_CSE_DMR_UPD_001_ACP_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_002_ACP_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_003_ACP_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_004_ACP_PV_AT_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_005_ACP_EXC());} + if(true) {execute (TC_CSE_DMR_UPD_007_ACP_CT());} + if(true) {execute (TC_CSE_DMR_UPD_008_ACP_ET());} + //if(true) {execute (TC_CSE_DMR_UPD_009_ACP_LBL());} TODO TO BE IMPLEMENTED + if(true) {execute (TC_CSE_DMR_UPD_016_ACP_ET());} + if(true) {execute (TC_CSE_DMR_UPD_016_ACP_PV());} + if(true) {execute (TC_CSE_DMR_UPD_016_ACP_PVS());} + if(true) {execute (TC_CSE_DMR_DEL_001_ACP());} + if(true) {execute (TC_CSE_SEC_ACP_CRE_001());} + if(true) {execute (TC_CSE_SEC_ACP_CRE_002());} + //if(true) {execute (TC_CSE_SEC_ACP_CRE_003());} TODO TO BE IMPLEMENTED + //if(true) {execute (TC_CSE_SEC_ACP_CRE_004());} TODO TO BE IMPLEMENTED + if(true) {execute (TC_CSE_DMR_CRE_012_ACP_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_014_ACP_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_015_ACP_LBL());} + + //CE_SEC_00002 + if(true) {execute (TC_CSE_DMR_CRE_012_SUB_ACPI());} + if(true) {execute (TC_CSE_DMR_CRE_012_CNT_ACPI());} + if(true) {execute (TC_CSE_DMR_UPD_014_CNT_ACPI());} + if(true) {execute (TC_CSE_DMR_UPD_015_AE_ACPI());} + if(true) {execute (TC_CSE_DMR_UPD_015_CNT_ACPI());} + if(true) {execute (TC_CSE_DMR_UPD_015_SUB_ACPI());} + if(true) {execute (TC_CSE_SEC_ACP_UPD_001());} + if(true) {execute (TC_CSE_SEC_ACP_UPD_002());} + if(true) {execute (TC_CSE_DMR_CRE_004_CNT());} + if(true) {execute (TC_CSE_DMR_CRE_004_ACP());} + if(true) {execute (TC_CSE_DMR_CRE_004_SUB());} + if(true) {execute (TC_CSE_DMR_RET_003_ACP());} + if(true) {execute (TC_CSE_DMR_RET_003_CNT());} + if(true) {execute (TC_CSE_DMR_RET_003_SUB());} + if(true) {execute (TC_CSE_DMR_RET_014_ACP());} + if(true) {execute (TC_CSE_DMR_RET_014_AE());} + if(true) {execute (TC_CSE_DMR_RET_014_CNT());} + //if(true) {execute (TC_CSE_DMR_RET_014_CSR());} TODO TO BE IMPLEMENTED + if(true) {execute (TC_CSE_DMR_RET_014_SUB());} + if(true) {execute (TC_CSE_DMR_UPD_006_CNT_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_006_ACP_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_006_SUB_LBL());} + if(true) {execute (TC_CSE_DMR_DEL_002_CNT());} + if(true) {execute (TC_CSE_DMR_DEL_002_ACP());} + if(true) {execute (TC_CSE_DMR_DEL_002_SUB());} + if(true) {execute (TC_CSE_SUB_CRE_002());} + if(true) {execute (TC_CSE_SEC_ACP_001_CRE());} + if(true) {execute (TC_CSE_SEC_ACP_001_UPD());} + if(true) {execute (TC_CSE_SEC_ACP_001_RET());} + if(true) {execute (TC_CSE_SEC_ACP_001_DEL());} + if(true) {execute (TC_CSE_SEC_ACP_002_CRE());} + if(true) {execute (TC_CSE_SEC_ACP_002_UPD());} + if(true) {execute (TC_CSE_SEC_ACP_002_RET());} + if(true) {execute (TC_CSE_SEC_ACP_002_DEL());} + if(true) {execute (TC_CSE_SEC_ACP_003_CRE());} + if(true) {execute (TC_CSE_SEC_ACP_003_UPD());} + if(true) {execute (TC_CSE_SEC_ACP_003_RET());} + if(true) {execute (TC_CSE_SEC_ACP_003_DEL());} + if(true) {execute (TC_CSE_SEC_ACP_004_CRE());} + if(true) {execute (TC_CSE_SEC_ACP_004_UPD());} + if(true) {execute (TC_CSE_SEC_ACP_004_RET());} + if(true) {execute (TC_CSE_SEC_ACP_004_DEL());} + //if(true) {execute (TC_CSE_SEC_ACP_005_CRE());} + //if(true) {execute (TC_CSE_SEC_ACP_005_UPD());} + //if(true) {execute (TC_CSE_SEC_ACP_005_RET());} + //if(true) {execute (TC_CSE_SEC_ACP_005_DEL());} + //if(true) {execute (TC_CSE_SEC_ACP_006_CRE());} + //if(true) {execute (TC_CSE_SEC_ACP_006_UPD());} + //if(true) {execute (TC_CSE_SEC_ACP_006_RET());} + //if(true) {execute (TC_CSE_SEC_ACP_006_DEL());} + //if(true) {execute (TC_CSE_SEC_ACP_007_CRE());} + //if(true) {execute (TC_CSE_SEC_ACP_007_UPD());} + //if(true) {execute (TC_CSE_SEC_ACP_007_RET());} + //if(true) {execute (TC_CSE_SEC_ACP_007_DEL());} + //if(true) {execute (TC_CSE_SEC_ACP_008_CRE());} + //if(true) {execute (TC_CSE_SEC_ACP_008_UPD());} + //if(true) {execute (TC_CSE_SEC_ACP_008_RET());} + //if(true) {execute (TC_CSE_SEC_ACP_008_DEL());} + //if(true) {execute (TC_CSE_SEC_ACP_009_CRE());} + //if(true) {execute (TC_CSE_SEC_ACP_009_UPD());} + //if(true) {execute (TC_CSE_SEC_ACP_009_RET());} + //if(true) {execute (TC_CSE_SEC_ACP_009_DEL());} + //if(true) {execute (TC_CSE_SEC_ACP_010_CRE());} + //if(true) {execute (TC_CSE_SEC_ACP_010_UPD());} + //if(true) {execute (TC_CSE_SEC_ACP_010_RET());} + //if(true) {execute (TC_CSE_SEC_ACP_010_DEL());} + if(true) {execute (TC_CSE_SEC_ACP_011_CRE());} + if(true) {execute (TC_CSE_SEC_ACP_011_UPD());} + if(true) {execute (TC_CSE_SEC_ACP_011_RET());} + if(true) {execute (TC_CSE_SEC_ACP_011_DEL());} + if(true) {execute (TC_CSE_SEC_ACP_012_CRE());} + if(true) {execute (TC_CSE_SEC_ACP_012_UPD());} + if(true) {execute (TC_CSE_SEC_ACP_012_RET());} + if(true) {execute (TC_CSE_SEC_ACP_012_DEL());} + + } + +} // end of module OneM2M_TestControl_IN_profile + diff --git a/OneM2M_TestControl_MN_profile.ttcn b/OneM2M_TestControl_MN_profile.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..42e5e2427b11132cbf10adaf88bc6d075cdd2ab5 --- /dev/null +++ b/OneM2M_TestControl_MN_profile.ttcn @@ -0,0 +1,330 @@ +/** + * Copyright Notification + * No part of this document may be reproduced, in an electronic retrieval system or otherwise, except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * © 2016, oneM2M Partners Type 1 (ARIB, ATIS, CCSA, ETSI, TIA, TSDSI, TTA, TTC). + * All rights reserved. + * + * @author ETSI + * @version $URL: https://oldforge.etsi.org/svn/oneM2M/branches/Release1/ttcn/OneM2M_TestControl.ttcn $ + * $Id: OneM2M_TestControl.ttcn 347 2017-08-11 08:48:20Z reinaortega $ + * @desc Test control module for oneM2M + * + */ +module OneM2M_TestControl_MN_profile { + + + import from OneM2M_Testcases_CSE all; + + control { + + //CE_GEN_00001 + if(true) {execute (TC_CSE_GEN_CRE_001_CSR());} + if(true) {execute (TC_CSE_GEN_CRE_001_SPR());} + if(true) {execute (TC_CSE_GEN_CRE_001_ABS());} + if(true) {execute (TC_CSE_GEN_RET_001_CSR());} + if(true) {execute (TC_CSE_GEN_RET_001_SPR());} + if(true) {execute (TC_CSE_GEN_RET_001_ABS());} + if(true) {execute (TC_CSE_GEN_UPD_001_CSR());} + if(true) {execute (TC_CSE_GEN_UPD_001_SPR());} + if(true) {execute (TC_CSE_GEN_UPD_001_ABS());} + if(true) {execute (TC_CSE_GEN_DEL_001_CSR());} + if(true) {execute (TC_CSE_GEN_DEL_001_SPR());} + if(true) {execute (TC_CSE_GEN_DEL_001_ABS());} + if(true) {execute (TC_CSE_GEN_CRE_002_CSR());} + if(true) {execute (TC_CSE_GEN_CRE_002_SPR());} + if(true) {execute (TC_CSE_GEN_CRE_002_ABS());} + if(true) {execute (TC_CSE_GEN_RET_002_CSR());} + if(true) {execute (TC_CSE_GEN_RET_002_SPR());} + if(true) {execute (TC_CSE_GEN_RET_002_ABS());} + if(true) {execute (TC_CSE_GEN_UPD_002_CSR());} + if(true) {execute (TC_CSE_GEN_UPD_002_SPR());} + if(true) {execute (TC_CSE_GEN_UPD_002_ABS());} + if(true) {execute (TC_CSE_GEN_DEL_002_CSR());} + if(true) {execute (TC_CSE_GEN_DEL_002_SPR());} + if(true) {execute (TC_CSE_GEN_DEL_002_ABS());} + + //CE_GEN_00002 + + //CE_REG_00001 + if(true) {execute (TC_CSE_REG_CRE_021());} + if(true) {execute (TC_CSE_REG_RET_001());} + if(true) {execute (TC_CSE_REG_RET_008());} + if(true) {execute (TC_CSE_REG_UPD_001());} + if(true) {execute (TC_CSE_REG_DEL_001());} + if(true) {execute (TC_CSE_REG_RET_002_CST());} + if(true) {execute (TC_CSE_REG_RET_005());} + if(true) {execute (TC_CSE_REG_RET_002_NL());} + + //CE_REG_00002 + if(true) {execute (TC_CSE_REG_RET_003());} + if(true) {execute (TC_CSE_REG_DEL_003());} + if(true) {execute (TC_CSE_DMR_RET_013_AE());} + if(true) {execute (TC_CSE_DMR_UPD_016_AE_ET());} + if(true) {execute (TC_CSE_DMR_UPD_016_AE_RR());} + if(true) {execute (TC_CSE_REG_CRE_004());} + if(true) {execute (TC_CSE_REG_CRE_005());} + //if(true) {execute (TC_CSE_REG_CRE_006());}//TODO TO BE IMPLEMENTED + //if(true) {execute (TC_CSE_REG_CRE_007());}//TODO TO BE IMPLEMENTED + if(true) {execute (TC_CSE_REG_CRE_008());} + if(true) {execute (TC_CSE_REG_CRE_010());} + if(true) {execute (TC_CSE_REG_CRE_011());} + if(true) {execute (TC_CSE_REG_CRE_016());} + if(true) {execute (TC_CSE_REG_CRE_017_API());} + if(true) {execute (TC_CSE_REG_CRE_017_RR());} + if(true) {execute (TC_CSE_REG_CRE_022());} + if(true) {execute (TC_CSE_REG_CRE_023());} + if(true) {execute (TC_CSE_REG_CRE_012_AE_LBL());} + if(true) {execute (TC_CSE_REG_RET_004_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_015_AE_LBL());} + if(true) {execute (TC_CSE_REG_CRE_012_AE_APN());} + if(true) {execute (TC_CSE_REG_RET_004_APN());} + if(true) {execute (TC_CSE_DMR_UPD_015_AE_APN());} + if(true) {execute (TC_CSE_REG_CRE_012_AE_POA());} + if(true) {execute (TC_CSE_REG_RET_004_POA());} + if(true) {execute (TC_CSE_DMR_UPD_015_AE_POA());} + if(true) {execute (TC_CSE_REG_CRE_002());} + if(true) {execute (TC_CSE_REG_CRE_003());} + if(true) {execute (TC_CSE_REG_CRE_020());} + + //CE_REG_00004 + if(true) {execute (TC_CSE_REG_CRE_018());} + if(true) {execute (TC_CSE_REG_CRE_019());} + if(true) {execute (TC_CSE_REG_CRE_025());} + if(true) {execute (TC_CSE_REG_RET_006());} + if(true) {execute (TC_CSE_REG_RET_010());} + if(true) {execute (TC_CSE_REG_DEL_002());} + if(true) {execute (TC_CSE_DMR_UPD_016_CSR_ET());} + if(true) {execute (TC_CSE_DMR_UPD_016_CSR_RR());} + if(true) {execute (TC_CSE_REG_CRE_028_LBL());} + if(true) {execute (TC_CSE_REG_RET_007_LBL());} + if(true) {execute (TC_CSE_REG_UPD_002_LBL());} + if(true) {execute (TC_CSE_REG_CRE_013_POA());} + if(true) {execute (TC_CSE_REG_CRE_028_POA());} + if(true) {execute (TC_CSE_REG_RET_007_POA());} + if(true) {execute (TC_CSE_REG_UPD_002_POA());} + if(true) {execute (TC_CSE_REG_CRE_013_NL());} + if(true) {execute (TC_CSE_REG_CRE_028_NL());} + if(true) {execute (TC_CSE_REG_RET_007_NL());} + if(true) {execute (TC_CSE_REG_UPD_002_NL());} + + //CE_REG_00005 + if(true) {execute (TC_CSE_REG_CRE_024());} + if(true) {execute (TC_CSE_DMR_RET_013_CSR());} + if(true) {execute (TC_CSE_REG_CRE_026_RN());} + if(true) {execute (TC_CSE_REG_CRE_026_ET());} + if(true) {execute (TC_CSE_REG_CRE_026_LBL());} + if(true) {execute (TC_CSE_REG_CRE_026_CST());} + if(true) {execute (TC_CSE_REG_CRE_026_POA());} + if(true) {execute (TC_CSE_REG_CRE_026_NL());} + if(true) {execute (TC_CSE_REG_UPD_003_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_015_CSR_LBL());} + if(true) {execute (TC_CSE_REG_UPD_003_ET());} + if(true) {execute (TC_CSE_REG_UPD_003_POA());} + if(true) {execute (TC_CSE_DMR_UPD_015_CSR_POA());} + if(true) {execute (TC_CSE_REG_UPD_003_RR());} + if(true) {execute (TC_CSE_REG_UPD_003_NL());} + if(true) {execute (TC_CSE_DMR_UPD_015_CSR_NL());} + if(true) {execute (TC_CSE_REG_DEL_004());} + if(true) {execute (TC_CSE_REG_RET_009());} + + //CE_DMR_00001 + if(true) {execute (TC_CSE_DMR_CRE_001_CNT_CB());} + if(true) {execute (TC_CSE_DMR_CRE_001_CNT_AE());} + if(true) {execute (TC_CSE_DMR_CRE_001_CNT_CNT());} + if(true) {execute (TC_CSE_DMR_CRE_002_CNT());} + if(true) {execute (TC_CSE_DMR_CRE_003_CNT());} + if(true) {execute (TC_CSE_DMR_CRE_007 ());} + if(true) {execute (TC_CSE_DMR_CRE_008 ());} + if(true) {execute (TC_CSE_DMR_RET_001_CNT());} + if(true) {execute (TC_CSE_DMR_RET_013_CNT());} + if(true) {execute (TC_CSE_DMR_UPD_001_CNT_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_002_CNT_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_003_CNT_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_004_CNT_ET_MNI_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_005_CNT_EXC());} + if(true) {execute (TC_CSE_DMR_UPD_007_CNT_CT());} + if(true) {execute (TC_CSE_DMR_UPD_008_CNT_ET());} + //if(true) {execute (TC_CSE_DMR_UPD_009_CNT_LBL());}//TODO TO BE IMPLEMENTED + if(true) {execute (TC_CSE_DMR_UPD_016_CNT_ET());} + if(true) {execute (TC_CSE_DMR_DEL_001_CNT());} + if(true) {execute (TC_CSE_DMR_DEL_006());} + if(true) {execute (TC_CSE_DMR_CRE_012_CNT_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_014_CNT_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_015_CNT_LBL());} + if(true) {execute (TC_CSE_DMR_CRE_012_CNT_CR());} + if(true) {execute (TC_CSE_DMR_CRE_005_MNI());} + if(true) {execute (TC_CSE_DMR_CRE_006_MNI());} + if(true) {execute (TC_CSE_DMR_CRE_012_CNT_MNI());} + if(true) {execute (TC_CSE_DMR_UPD_014_CNT_MNI());} + if(true) {execute (TC_CSE_DMR_UPD_015_CNT_MNI());} + if(true) {execute (TC_CSE_DMR_CRE_005_MBS());} + if(true) {execute (TC_CSE_DMR_CRE_006_MBS());} + if(true) {execute (TC_CSE_DMR_CRE_012_CNT_MBS());} + if(true) {execute (TC_CSE_DMR_CRE_013());} + if(true) {execute (TC_CSE_DMR_UPD_014_CNT_MBS());} + if(true) {execute (TC_CSE_DMR_UPD_015_CNT_MBS());} + if(true) {execute (TC_CSE_DMR_CRE_005_MIA());} + if(true) {execute (TC_CSE_DMR_CRE_006_MIA());} + if(true) {execute (TC_CSE_DMR_CRE_012_CNT_MIA());} + if(true) {execute (TC_CSE_DMR_UPD_014_CNT_MIA());} + if(true) {execute (TC_CSE_DMR_UPD_015_CNT_MIA());} + + //CE_DMR_00002 + if(true) {execute (TC_CSE_DMR_CRE_001_CIN_CNT());} + if(true) {execute (TC_CSE_DMR_RET_001_CIN());} + if(true) {execute (TC_CSE_DMR_UPD_011());} + if(true) {execute (TC_CSE_DMR_DEL_001_CIN());} + if(true) {execute (TC_CSE_DMR_CRE_012_CIN_LBL());} + if(true) {execute (TC_CSE_DMR_CRE_012_CIN_CR());} + if(true) {execute (TC_CSE_DMR_CRE_012_CIN_CNF());} + if(true) {execute (TC_CSE_DMR_RET_012());} + if(true) {execute (TC_CSE_DMR_UPD_012());} + if(true) {execute (TC_CSE_DMR_DEL_007());} + if(true) {execute (TC_CSE_DMR_RET_010());} + if(true) {execute (TC_CSE_DMR_UPD_013());} + if(true) {execute (TC_CSE_DMR_DEL_009());} + + //CE_SUB_00001 + if(true) {execute (TC_CSE_DMR_CRE_001_SUB_CB());} + if(true) {execute (TC_CSE_DMR_CRE_001_SUB_AE());} + if(true) {execute (TC_CSE_DMR_CRE_001_SUB_CNT());} + if(true) {execute (TC_CSE_DMR_CRE_001_SUB_ACP());} + if(true) {execute (TC_CSE_DMR_CRE_001_SUB_CSR());} + if(true) {execute (TC_CSE_DMR_CRE_002_SUB());} + if(true) {execute (TC_CSE_DMR_CRE_003_SUB());} + if(true) {execute (TC_CSE_DMR_RET_001_SUB());} + if(true) {execute (TC_CSE_DMR_RET_013_SUB());} + if(true) {execute (TC_CSE_DMR_UPD_001_SUB_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_002_SUB_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_003_SUB_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_004_SUB_ET_LBL_EXC());} + if(true) {execute (TC_CSE_DMR_UPD_005_SUB_MNI());} + if(true) {execute (TC_CSE_DMR_UPD_007_SUB_CT());} + if(true) {execute (TC_CSE_DMR_UPD_008_SUB_ET());} + //if(true) {execute (TC_CSE_DMR_UPD_009_SUB_LBL());}TODO TO BE IMPLEMENTED + if(true) {execute (TC_CSE_DMR_UPD_016_SUB_ET());} + if(true) {execute (TC_CSE_DMR_UPD_016_SUB_NU());} + if(true) {execute (TC_CSE_DMR_UPD_016_SUB_NCT());} + if(true) {execute (TC_CSE_DMR_DEL_001_SUB());} + if(true) {execute (TC_CSE_DMR_CRE_012_SUB_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_014_SUB_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_015_SUB_LBL());} + if(true) {execute (TC_CSE_DMR_CRE_012_SUB_CR());} + + //CE_SUB_00004 + if(true) {execute (TC_CSE_SUB_CRE_001_SUB());} + if(true) {execute (TC_CSE_SUB_CRE_001_CIN());} + if(true) {execute (TC_CSE_SUB_CRE_003());} + if(true) {execute (TC_CSE_SUB_CRE_005());} + if(true) {execute (TC_CSE_SUB_UPD_001());} + if(true) {execute (TC_CSE_SUB_DEL_001());} + if(true) {execute (TC_CSE_SUB_CRE_004());} + + //CE_SEC_00001 + if(true) {execute (TC_CSE_DMR_CRE_001_ACP_CB());} + if(true) {execute (TC_CSE_DMR_CRE_001_ACP_AE());} + if(true) {execute (TC_CSE_DMR_CRE_002_ACP());} + if(true) {execute (TC_CSE_DMR_CRE_003_ACP());} + if(true) {execute (TC_CSE_DMR_RET_001_ACP());} + if(true) {execute (TC_CSE_DMR_RET_013_ACP());} + if(true) {execute (TC_CSE_DMR_UPD_001_ACP_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_002_ACP_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_003_ACP_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_004_ACP_PV_AT_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_005_ACP_EXC());} + if(true) {execute (TC_CSE_DMR_UPD_007_ACP_CT());} + if(true) {execute (TC_CSE_DMR_UPD_008_ACP_ET());} + //if(true) {execute (TC_CSE_DMR_UPD_009_ACP_LBL());} TODO TO BE IMPLEMENTED + if(true) {execute (TC_CSE_DMR_UPD_016_ACP_ET());} + if(true) {execute (TC_CSE_DMR_UPD_016_ACP_PV());} + if(true) {execute (TC_CSE_DMR_UPD_016_ACP_PVS());} + if(true) {execute (TC_CSE_DMR_DEL_001_ACP());} + if(true) {execute (TC_CSE_SEC_ACP_CRE_001());} + if(true) {execute (TC_CSE_SEC_ACP_CRE_002());} + //if(true) {execute (TC_CSE_SEC_ACP_CRE_003());} TODO TO BE IMPLEMENTED + //if(true) {execute (TC_CSE_SEC_ACP_CRE_004());} TODO TO BE IMPLEMENTED + if(true) {execute (TC_CSE_DMR_CRE_012_ACP_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_014_ACP_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_015_ACP_LBL());} + + //CE_SEC_00002 + if(true) {execute (TC_CSE_DMR_CRE_012_SUB_ACPI());} + if(true) {execute (TC_CSE_DMR_CRE_012_CNT_ACPI());} + if(true) {execute (TC_CSE_DMR_UPD_014_CNT_ACPI());} + if(true) {execute (TC_CSE_DMR_UPD_015_AE_ACPI());} + if(true) {execute (TC_CSE_DMR_UPD_015_CNT_ACPI());} + if(true) {execute (TC_CSE_DMR_UPD_015_SUB_ACPI());} + if(true) {execute (TC_CSE_SEC_ACP_UPD_001());} + if(true) {execute (TC_CSE_SEC_ACP_UPD_002());} + if(true) {execute (TC_CSE_DMR_CRE_004_CNT());} + if(true) {execute (TC_CSE_DMR_CRE_004_ACP());} + if(true) {execute (TC_CSE_DMR_CRE_004_SUB());} + if(true) {execute (TC_CSE_DMR_RET_003_ACP());} + if(true) {execute (TC_CSE_DMR_RET_003_CNT());} + if(true) {execute (TC_CSE_DMR_RET_003_SUB());} + if(true) {execute (TC_CSE_DMR_RET_014_ACP());} + if(true) {execute (TC_CSE_DMR_RET_014_AE());} + if(true) {execute (TC_CSE_DMR_RET_014_CNT());} + //if(true) {execute (TC_CSE_DMR_RET_014_CSR());} TODO TO BE IMPLEMENTED + if(true) {execute (TC_CSE_DMR_RET_014_SUB());} + if(true) {execute (TC_CSE_DMR_UPD_006_CNT_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_006_ACP_LBL());} + if(true) {execute (TC_CSE_DMR_UPD_006_SUB_LBL());} + if(true) {execute (TC_CSE_DMR_DEL_002_CNT());} + if(true) {execute (TC_CSE_DMR_DEL_002_ACP());} + if(true) {execute (TC_CSE_DMR_DEL_002_SUB());} + if(true) {execute (TC_CSE_SUB_CRE_002());} + if(true) {execute (TC_CSE_SEC_ACP_001_CRE());} + if(true) {execute (TC_CSE_SEC_ACP_001_UPD());} + if(true) {execute (TC_CSE_SEC_ACP_001_RET());} + if(true) {execute (TC_CSE_SEC_ACP_001_DEL());} + if(true) {execute (TC_CSE_SEC_ACP_002_CRE());} + if(true) {execute (TC_CSE_SEC_ACP_002_UPD());} + if(true) {execute (TC_CSE_SEC_ACP_002_RET());} + if(true) {execute (TC_CSE_SEC_ACP_002_DEL());} + if(true) {execute (TC_CSE_SEC_ACP_003_CRE());} + if(true) {execute (TC_CSE_SEC_ACP_003_UPD());} + if(true) {execute (TC_CSE_SEC_ACP_003_RET());} + if(true) {execute (TC_CSE_SEC_ACP_003_DEL());} + if(true) {execute (TC_CSE_SEC_ACP_004_CRE());} + if(true) {execute (TC_CSE_SEC_ACP_004_UPD());} + if(true) {execute (TC_CSE_SEC_ACP_004_RET());} + if(true) {execute (TC_CSE_SEC_ACP_004_DEL());} + //if(true) {execute (TC_CSE_SEC_ACP_005_CRE());} + //if(true) {execute (TC_CSE_SEC_ACP_005_UPD());} + //if(true) {execute (TC_CSE_SEC_ACP_005_RET());} + //if(true) {execute (TC_CSE_SEC_ACP_005_DEL());} + //if(true) {execute (TC_CSE_SEC_ACP_006_CRE());} + //if(true) {execute (TC_CSE_SEC_ACP_006_UPD());} + //if(true) {execute (TC_CSE_SEC_ACP_006_RET());} + //if(true) {execute (TC_CSE_SEC_ACP_006_DEL());} + //if(true) {execute (TC_CSE_SEC_ACP_007_CRE());} + //if(true) {execute (TC_CSE_SEC_ACP_007_UPD());} + //if(true) {execute (TC_CSE_SEC_ACP_007_RET());} + //if(true) {execute (TC_CSE_SEC_ACP_007_DEL());} + //if(true) {execute (TC_CSE_SEC_ACP_008_CRE());} + //if(true) {execute (TC_CSE_SEC_ACP_008_UPD());} + //if(true) {execute (TC_CSE_SEC_ACP_008_RET());} + //if(true) {execute (TC_CSE_SEC_ACP_008_DEL());} + //if(true) {execute (TC_CSE_SEC_ACP_009_CRE());} + //if(true) {execute (TC_CSE_SEC_ACP_009_UPD());} + //if(true) {execute (TC_CSE_SEC_ACP_009_RET());} + //if(true) {execute (TC_CSE_SEC_ACP_009_DEL());} + //if(true) {execute (TC_CSE_SEC_ACP_010_CRE());} + //if(true) {execute (TC_CSE_SEC_ACP_010_UPD());} + //if(true) {execute (TC_CSE_SEC_ACP_010_RET());} + //if(true) {execute (TC_CSE_SEC_ACP_010_DEL());} + if(true) {execute (TC_CSE_SEC_ACP_011_CRE());} + if(true) {execute (TC_CSE_SEC_ACP_011_UPD());} + if(true) {execute (TC_CSE_SEC_ACP_011_RET());} + if(true) {execute (TC_CSE_SEC_ACP_011_DEL());} + if(true) {execute (TC_CSE_SEC_ACP_012_CRE());} + if(true) {execute (TC_CSE_SEC_ACP_012_UPD());} + if(true) {execute (TC_CSE_SEC_ACP_012_RET());} + if(true) {execute (TC_CSE_SEC_ACP_012_DEL());} + + } + +} // end of module OneM2M_TestControl_IN_profile + diff --git a/OneM2M_Testcases_AE.ttcn b/OneM2M_Testcases_AE.ttcn index b5b595f0bd0bbdff074a16d54774bb8a3c79ad30..ea1216ec526dc64c4ef4625ff7e01fc06ea189e0 100644 --- a/OneM2M_Testcases_AE.ttcn +++ b/OneM2M_Testcases_AE.ttcn @@ -70,9 +70,10 @@ module OneM2M_Testcases_AE { function f_AE_GEN_CRE_001(PrimitiveScope p_primitiveScope) runs on CseSimu { - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; var UtTriggerAckPrimitive v_trigger_response; + var charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for container containing To set to " & f_getResourceAddress(-1, e_nonHierarchical, p_primitiveScope); if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { setverdict(inconc, __SCOPE__, ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case"); @@ -84,18 +85,18 @@ module OneM2M_Testcases_AE { //Send Trigger Message v_utRequest.to_ := f_getResourceAddress(-1, e_nonHierarchical, p_primitiveScope); v_utRequest.from_ := "UNINITIALIZED"; - f_sendUtPrimitive(v_utRequest); + f_sendUtPrimitive(v_utRequest, v_action); tc_ac.start; alt { - [] mcaPort.receive(mw_request(mw_createContainer(omit,v_utRequest.to_))) { + [] mcaPortIn.receive(mw_request(mw_createContainer(omit,v_utRequest.to_))) { tc_ac.stop; setverdict(pass, __SCOPE__, " : Container creation request received successfuly"); - v_responsePrimtive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); - mcaPort.send(m_response(v_responsePrimtive)); + v_responsePrimitive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); + mcaPortIn.send(m_response(v_responsePrimitive)); } - [] mcaPort.receive(mw_request(?)) { + [] mcaPortIn.receive(mw_request(?)) { tc_ac.stop; setverdict(fail, __SCOPE__, " : Error while creating container"); stop; @@ -149,9 +150,11 @@ module OneM2M_Testcases_AE { function f_AE_GEN_CRE_002(PrimitiveScope p_primitiveScope) runs on CseSimu { - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; var UtTriggerAckPrimitive v_trigger_response; + var charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for container containing To set to " & f_getResourceAddress(-1, e_hierarchical, p_primitiveScope); + //Test Control if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { @@ -164,19 +167,19 @@ module OneM2M_Testcases_AE { //Send Trigger Message v_utRequest.to_ := f_getResourceAddress(-1, e_hierarchical, p_primitiveScope); v_utRequest.from_ := "UNINITIALIZED"; - f_sendUtPrimitive(v_utRequest); + f_sendUtPrimitive(v_utRequest,v_action); tc_ac.start; alt { - [] mcaPort.receive(mw_request(mw_createContainer(omit,v_utRequest.to_))) { + [] mcaPortIn.receive(mw_request(mw_createContainer(omit,v_utRequest.to_))) { tc_ac.stop; setverdict(pass, __SCOPE__, " : Container creation request received successfuly"); - v_responsePrimtive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); - mcaPort.send(m_response(v_responsePrimtive)); + v_responsePrimitive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); + mcaPortIn.send(m_response(v_responsePrimitive)); } - [] mcaPort.receive(mw_request(?)) { + [] mcaPortIn.receive(mw_request(?)) { tc_ac.stop; setverdict(fail, __SCOPE__, " : Error while creating container"); stop; @@ -238,10 +241,12 @@ module OneM2M_Testcases_AE { function f_AE_GEN_UPD_001(PrimitiveScope p_primitiveScope) runs on CseSimu { - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer; var UtTriggerAckPrimitive v_trigger_response; var integer v_auxInteger; + var charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for container containing To set to " & f_getResourceAddress(-1, e_nonHierarchical, p_primitiveScope); + if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { setverdict(inconc, __SCOPE__, ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case"); @@ -254,18 +259,18 @@ module OneM2M_Testcases_AE { v_auxInteger := f_setResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), int3); v_utRequest.to_ := f_getResourceAddress(v_auxInteger, e_nonHierarchical, p_primitiveScope); v_utRequest.from_ := "UNINITIALIZED"; - f_sendUtPrimitive(v_utRequest); + f_sendUtPrimitive(v_utRequest,v_action); tc_ac.start; alt { - [] mcaPort.receive(mw_request(mw_updateContainer(omit,v_utRequest.to_))) { + [] mcaPortIn.receive(mw_request(mw_updateContainer(omit,v_utRequest.to_))) { tc_ac.stop; setverdict(pass, __SCOPE__, " : Container update request received successfuly"); - v_responsePrimtive := valueof(m_responsePrimitive(int2004, "To_be_defined", omit)); - mcaPort.send(m_response(v_responsePrimtive)); + v_responsePrimitive := valueof(m_responsePrimitive(int2004, "To_be_defined", omit)); + mcaPortIn.send(m_response(v_responsePrimitive)); } - [] mcaPort.receive(mw_request(?)) { + [] mcaPortIn.receive(mw_request(?)) { tc_ac.stop; setverdict(fail, __SCOPE__, " : Error while updating container"); stop; @@ -322,10 +327,11 @@ module OneM2M_Testcases_AE { function f_AE_GEN_UPD_002(PrimitiveScope p_primitiveScope) runs on CseSimu { - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer; var UtTriggerAckPrimitive v_trigger_response; var integer v_auxInteger; + var charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for container containing To set to " & f_getResourceAddress(-1, e_hierarchical, p_primitiveScope); if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { setverdict(inconc, __SCOPE__, ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); @@ -338,18 +344,18 @@ module OneM2M_Testcases_AE { v_auxInteger := f_setResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), int3); v_utRequest.to_ := f_getResourceAddress(v_auxInteger, e_hierarchical, p_primitiveScope); v_utRequest.from_ := "UNINITIALIZED"; - f_sendUtPrimitive(v_utRequest); + f_sendUtPrimitive(v_utRequest,v_action); tc_ac.start; alt { - [] mcaPort.receive(mw_request(mw_updateContainer(omit,v_utRequest.to_))) { + [] mcaPortIn.receive(mw_request(mw_updateContainer(omit,v_utRequest.to_))) { tc_ac.stop; setverdict(pass, __SCOPE__, " : Container update request received successfuly"); - v_responsePrimtive := valueof(m_responsePrimitive(int2004, "To_be_defined", omit)); - mcaPort.send(m_response(v_responsePrimtive)); + v_responsePrimitive := valueof(m_responsePrimitive(int2004, "To_be_defined", omit)); + mcaPortIn.send(m_response(v_responsePrimitive)); } - [] mcaPort.receive(mw_request(?)) { + [] mcaPortIn.receive(mw_request(?)) { tc_ac.stop; setverdict(fail, __SCOPE__, " : Error while updating container"); stop; @@ -411,11 +417,12 @@ module OneM2M_Testcases_AE { function f_AE_GEN_RET_001(PrimitiveScope p_primitiveScope) runs on CseSimu { - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; var template UtTriggerPrimitive v_utRequestTemplate; var UtTriggerPrimitive v_utRequest; var UtTriggerAckPrimitive v_trigger_response; var integer v_auxInteger; + var charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for container containing To set to " & f_getResourceAddress(-1, e_nonHierarchical, p_primitiveScope); if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { setverdict(inconc, __SCOPE__, ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case"); @@ -427,19 +434,19 @@ module OneM2M_Testcases_AE { //Send Trigger Message v_auxInteger := f_setResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), int3); v_utRequestTemplate := m_utRetrieveResource(f_getResourceAddress(v_auxInteger, e_nonHierarchical, p_primitiveScope),"UNINITIALIZED"); - f_sendUtPrimitive(v_utRequestTemplate); + f_sendUtPrimitive(v_utRequestTemplate,v_action); v_utRequest := valueof(v_utRequestTemplate); tc_ac.start; alt { - [] mcaPort.receive(mw_request(mw_retrieveResource(v_utRequest.to_))) { + [] mcaPortIn.receive(mw_request(mw_retrieveResource(v_utRequest.to_))) { tc_ac.stop; setverdict(pass, __SCOPE__, " : Container retrieve request received successfuly"); - v_responsePrimtive := valueof(m_responsePrimitive(int2000, "To_be_defined", omit)); - mcaPort.send(m_response(v_responsePrimtive)); + v_responsePrimitive := valueof(m_responsePrimitive(int2000, "To_be_defined", omit)); + mcaPortIn.send(m_response(v_responsePrimitive)); } - [] mcaPort.receive(mw_request(?)) { + [] mcaPortIn.receive(mw_request(?)) { tc_ac.stop; setverdict(fail, __SCOPE__, " : Error while retrieving container"); stop; @@ -496,11 +503,12 @@ module OneM2M_Testcases_AE { function f_AE_GEN_RET_002(PrimitiveScope p_primitiveScope) runs on CseSimu { - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; var template UtTriggerPrimitive v_utRequestTemplate; var UtTriggerPrimitive v_utRequest; var UtTriggerAckPrimitive v_trigger_response; var integer v_auxInteger; + var charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for container containing To set to " & f_getResourceAddress(-1, e_hierarchical, p_primitiveScope); if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { setverdict(inconc, __SCOPE__, ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); @@ -513,18 +521,18 @@ module OneM2M_Testcases_AE { v_auxInteger := f_setResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), int3); v_utRequestTemplate := m_utRetrieveResource(f_getResourceAddress(v_auxInteger, e_hierarchical, p_primitiveScope),"UNINITIALIZED"); v_utRequest := valueof(v_utRequestTemplate); - f_sendUtPrimitive(v_utRequest); + f_sendUtPrimitive(v_utRequest,v_action); tc_ac.start; alt { - [] mcaPort.receive(mw_request(mw_retrieveResource(v_utRequest.to_))) { + [] mcaPortIn.receive(mw_request(mw_retrieveResource(v_utRequest.to_))) { tc_ac.stop; setverdict(pass, __SCOPE__, " : Container retrieve request received successfuly"); - v_responsePrimtive := valueof(m_responsePrimitive(int2000, "To_be_defined", omit)); - mcaPort.send(m_response(v_responsePrimtive)); + v_responsePrimitive := valueof(m_responsePrimitive(int2000, "To_be_defined", omit)); + mcaPortIn.send(m_response(v_responsePrimitive)); } - [] mcaPort.receive(mw_request(?)) { + [] mcaPortIn.receive(mw_request(?)) { tc_ac.stop; setverdict(fail, __SCOPE__, " : Error while retrieving container"); stop; @@ -586,10 +594,11 @@ module OneM2M_Testcases_AE { function f_AE_GEN_DEL_001(PrimitiveScope p_primitiveScope) runs on CseSimu { - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; var template UtTriggerPrimitive v_utRequest := m_utDeleteRequest; var UtTriggerAckPrimitive v_trigger_response; var integer v_auxInteger; + var charstring v_action := __SCOPE__ & ": Please, send a valid DELETE Request for container containing To set to " & f_getResourceAddress(-1, e_nonHierarchical, p_primitiveScope); if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { setverdict(inconc, __SCOPE__, ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case"); @@ -602,18 +611,18 @@ module OneM2M_Testcases_AE { v_auxInteger := f_setResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), int3); v_utRequest.to_ := f_getResourceAddress(v_auxInteger, e_nonHierarchical, p_primitiveScope); v_utRequest.from_ := "UNINITIALIZED"; - f_sendUtPrimitive(v_utRequest); + f_sendUtPrimitive(v_utRequest,v_action); tc_ac.start; alt { - [] mcaPort.receive(mw_request(mw_deleteRequest(v_utRequest.to_))) { + [] mcaPortIn.receive(mw_request(mw_deleteRequest(v_utRequest.to_))) { tc_ac.stop; setverdict(pass, __SCOPE__, " : Container update request received successfuly"); - v_responsePrimtive := valueof(m_responsePrimitive(int2004, "To_be_defined", omit)); - mcaPort.send(m_response(v_responsePrimtive)); + v_responsePrimitive := valueof(m_responsePrimitive(int2004, "To_be_defined", omit)); + mcaPortIn.send(m_response(v_responsePrimitive)); } - [] mcaPort.receive(mw_request(?)) { + [] mcaPortIn.receive(mw_request(?)) { tc_ac.stop; setverdict(fail, __SCOPE__, " : Error while updating container"); stop; @@ -670,10 +679,11 @@ module OneM2M_Testcases_AE { function f_AE_GEN_DEL_002(PrimitiveScope p_primitiveScope) runs on CseSimu { - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; var template UtTriggerPrimitive v_utRequest := m_utDeleteRequest; var UtTriggerAckPrimitive v_trigger_response; var integer v_auxInteger; + var charstring v_action := __SCOPE__ & ": Please, send a valid DELETE Request for container containing To set to " & f_getResourceAddress(-1, e_hierarchical, p_primitiveScope); if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { setverdict(inconc, __SCOPE__, ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); @@ -685,20 +695,20 @@ module OneM2M_Testcases_AE { //Send Trigger Message v_auxInteger := f_setResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), int3); v_utRequest.to_ := f_getResourceAddress(v_auxInteger, e_hierarchical, p_primitiveScope); - v_utRequest.from_ := "UNINITIALIZED"; - f_sendUtPrimitive(v_utRequest); + v_utRequest.from_ := "UNINITIALIZED"; + f_sendUtPrimitive(v_utRequest,v_action); tc_ac.start; alt { - [] mcaPort.receive(mw_request(mw_deleteRequest(v_utRequest.to_))) { + [] mcaPortIn.receive(mw_request(mw_deleteRequest(v_utRequest.to_))) { tc_ac.stop; setverdict(pass, __SCOPE__, " : Container update request received successfuly"); - v_responsePrimtive := valueof(m_responsePrimitive(int2004, "To_be_defined", omit)); - mcaPort.send(m_response(v_responsePrimtive)); + v_responsePrimitive := valueof(m_responsePrimitive(int2004, "To_be_defined", omit)); + mcaPortIn.send(m_response(v_responsePrimitive)); } - [] mcaPort.receive(mw_request(?)) { + [] mcaPortIn.receive(mw_request(?)) { tc_ac.stop; setverdict(fail, __SCOPE__, " : Error while updating container"); stop; @@ -732,28 +742,29 @@ module OneM2M_Testcases_AE { //primitives for utPort var template UtTriggerPrimitive v_utRequest := m_createAe("UNINITIALIZED"); - //primitives for mcaPort + //primitives for mcaPortIn var MsgIn v_request; - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; + var charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request"; f_cf03Up(); //Send Trigger Message - f_sendUtPrimitive(v_utRequest); + f_sendUtPrimitive(v_utRequest, v_action); //Test behavior tc_ac.start; alt{ - [] mcaPort.receive(mw_request(mw_createAe)) -> value v_request { + [] mcaPortIn.receive(mw_request(mw_createAe)) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__, " : AE registration request is accepted!!"); - //v_responsePrimtive := valueof(m_responsePrimitiveTemp(int2000, omit)); - v_responsePrimtive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); + //v_responsePrimitive := valueof(m_responsePrimitiveTemp(int2000, omit)); + v_responsePrimitive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); + mcaPortIn.send(m_response(v_responsePrimitive)); } - [] mcaPort.receive(mw_request(mw_createAe(*,?,m_contentCreateAe_Invalid))) -> value v_request { + [] mcaPortIn.receive(mw_request(mw_createAe(*,?,m_contentCreateAe_Invalid))) -> value v_request { tc_ac.stop; setverdict(fail, __SCOPE__, " : AE registration request is rejected due to not including mandatory attributes!!"); } @@ -776,117 +787,127 @@ module OneM2M_Testcases_AE { testcase TC_AE_REG_CRE_002_RN() runs on CseSimu system AeSystem { //primitives for utPort var template UtTriggerPrimitive v_utRequest := m_createAe("UNINITIALIZED"); - var template RequestPrimitive v_createAe := mw_createAe; + var template RequestPrimitive v_createAe := mw_createAe; + var charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute ResourceName"; v_utRequest.primitiveContent.aE.resourceName := "UNINITIALIZED"; v_createAe.primitiveContent.aE.resourceName := ?; - f_AE_REG_CRE_002(v_utRequest,v_createAe); + f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action); } testcase TC_AE_REG_CRE_002_ET() runs on CseSimu system AeSystem { //primitives for utPort var template UtTriggerPrimitive v_utRequest := m_createAe("UNINITIALIZED"); - var template RequestPrimitive v_createAe := mw_createAe; + var template RequestPrimitive v_createAe := mw_createAe; + var charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute ExpirationTime"; v_utRequest.primitiveContent.aE.expirationTime := "20301231T012345"; v_createAe.primitiveContent.aE.expirationTime := ?; - f_AE_REG_CRE_002(v_utRequest,v_createAe); + f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action); } testcase TC_AE_REG_CRE_002_LBL() runs on CseSimu system AeSystem { //primitives for utPort var template UtTriggerPrimitive v_utRequest := m_createAe("UNINITIALIZED"); - var template RequestPrimitive v_createAe := mw_createAe; + var template RequestPrimitive v_createAe := mw_createAe; + var charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute Labels"; v_utRequest.primitiveContent.aE.labels := {"UNINITIALIZED"}; v_createAe.primitiveContent.aE.labels := ?; - f_AE_REG_CRE_002(v_utRequest,v_createAe); + f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action); } testcase TC_AE_REG_CRE_002_APN() runs on CseSimu system AeSystem { //primitives for utPort var template UtTriggerPrimitive v_utRequest := m_createAe("UNINITIALIZED"); - var template RequestPrimitive v_createAe := mw_createAe; + var template RequestPrimitive v_createAe := mw_createAe; + var charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute AppName"; v_utRequest.primitiveContent.aE.appName := "UNINITIALIZED"; v_createAe.primitiveContent.aE.appName := ?; - f_AE_REG_CRE_002(v_utRequest,v_createAe); + f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action); } testcase TC_AE_REG_CRE_002_API() runs on CseSimu system AeSystem { //primitives for utPort var template UtTriggerPrimitive v_utRequest := m_createAe("UNINITIALIZED"); - var template RequestPrimitive v_createAe := mw_createAe; + var template RequestPrimitive v_createAe := mw_createAe; + var charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute AppID"; v_utRequest.primitiveContent.aE.app_ID := "UNINITIALIZED"; v_createAe.primitiveContent.aE.app_ID := ?; - f_AE_REG_CRE_002(v_utRequest,v_createAe); + f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action); } testcase TC_AE_REG_CRE_002_POA() runs on CseSimu system AeSystem { //primitives for utPort var template UtTriggerPrimitive v_utRequest := m_createAe("UNINITIALIZED"); - var template RequestPrimitive v_createAe := mw_createAe; + var template RequestPrimitive v_createAe := mw_createAe; + var charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute PointOfAccess"; v_utRequest.primitiveContent.aE.pointOfAccess := {"UNINITIALIZED"}; v_createAe.primitiveContent.aE.pointOfAccess := ?; - f_AE_REG_CRE_002(v_utRequest,v_createAe); + f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action); } testcase TC_AE_REG_CRE_002_OR() runs on CseSimu system AeSystem { //primitives for utPort var template UtTriggerPrimitive v_utRequest := m_createAe("UNINITIALIZED"); - var template RequestPrimitive v_createAe := mw_createAe; + var template RequestPrimitive v_createAe := mw_createAe; + var charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute OntologyRef"; v_utRequest.primitiveContent.aE.ontologyRef := "UNINITIALIZED"; v_createAe.primitiveContent.aE.ontologyRef := ?; - f_AE_REG_CRE_002(v_utRequest,v_createAe); + f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action); } testcase TC_AE_REG_CRE_002_NL() runs on CseSimu system AeSystem { //primitives for utPort var template UtTriggerPrimitive v_utRequest := m_createAe("UNINITIALIZED"); - var template RequestPrimitive v_createAe := mw_createAe; + var template RequestPrimitive v_createAe := mw_createAe; + var charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute NodeLink"; v_utRequest.primitiveContent.aE.nodeLink := "UNINITIALIZED"; v_createAe.primitiveContent.aE.nodeLink := ?; - f_AE_REG_CRE_002(v_utRequest,v_createAe); + f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action); } testcase TC_AE_REG_CRE_002_RR() runs on CseSimu system AeSystem { //primitives for utPort var template UtTriggerPrimitive v_utRequest := m_createAe("UNINITIALIZED"); - var template RequestPrimitive v_createAe := mw_createAe; + var template RequestPrimitive v_createAe := mw_createAe; + var charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute RequestReachability"; v_utRequest.primitiveContent.aE.requestReachability := true; v_createAe.primitiveContent.aE.requestReachability := ?; - f_AE_REG_CRE_002(v_utRequest,v_createAe); + f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action); } testcase TC_AE_REG_CRE_002_CSZ() runs on CseSimu system AeSystem { //primitives for utPort var template UtTriggerPrimitive v_utRequest := m_createAe("UNINITIALIZED"); - var template RequestPrimitive v_createAe := mw_createAe; + var template RequestPrimitive v_createAe := mw_createAe; + var charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute ContentSerialization"; v_utRequest.primitiveContent.aE.contentSerialization := {applicationxml}; v_createAe.primitiveContent.aE.contentSerialization := ?; - f_AE_REG_CRE_002(v_utRequest,v_createAe); + f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action); } - function f_AE_REG_CRE_002(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_response) runs on CseSimu { + function f_AE_REG_CRE_002(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_response, in charstring p_action) runs on CseSimu { - //primitives for mcaPort + //primitives for mcaPortIn var MsgIn v_request; - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; f_cf03Up(); //Send Trigger Message - f_sendUtPrimitive(p_utRequest); + f_sendUtPrimitive(p_utRequest,p_action); //Test behavior tc_ac.start; alt{ - [] mcaPort.receive(mw_request(p_response)) -> value v_request { + [] mcaPortIn.receive(mw_request(p_response)) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__, " : AE registration request is accepted!!"); - //v_responsePrimtive := valueof(m_responsePrimitiveTemp(int2000, omit)); - v_responsePrimtive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); + //v_responsePrimitive := valueof(m_responsePrimitiveTemp(int2000, omit)); + v_responsePrimitive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); + mcaPortIn.send(m_response(v_responsePrimitive)); } - [] mcaPort.receive(mw_request(mw_createAe(*,?,m_contentCreateAe_Invalid))) -> value v_request { + [] mcaPortIn.receive(mw_request(mw_createAe(*,?,m_contentCreateAe_Invalid))) -> value v_request { tc_ac.stop; setverdict(fail, __SCOPE__, " : AE registration request is rejected due to not including the optional attribute!"); } @@ -915,29 +936,30 @@ module OneM2M_Testcases_AE { //variables var MsgIn v_request; - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; + var charstring v_action := __SCOPE__ & ": Please, send a valid AE DELETE Registration Request"; //primitives for utPort var template UtTriggerPrimitive v_utRequest := mw_deleteRequest; f_cf03Up(); - f_sendUtPrimitive(v_utRequest); + f_sendUtPrimitive(v_utRequest,v_action); //Test behavior tc_ac.start; alt{ - [] mcaPort.receive(mw_request(mw_deleteRequest)) -> value v_request { + [] mcaPortIn.receive(mw_request(mw_deleteRequest)) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__, " : AE deregistration request is accepted!"); - //v_responsePrimtive := valueof(m_responsePrimitiveTemp(int2000, omit)); - v_responsePrimtive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); + //v_responsePrimitive := valueof(m_responsePrimitiveTemp(int2000, omit)); + v_responsePrimitive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); + mcaPortIn.send(m_response(v_responsePrimitive)); } - [] mcaPort.receive { + [] mcaPortIn.receive { tc_ac.stop; setverdict(fail, __SCOPE__, " : Error while AE deregistration"); } @@ -967,27 +989,28 @@ module OneM2M_Testcases_AE { //variables var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; var MsgIn v_request; - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; + var charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for container"; f_cf03Up(); - //send triggering primtive to SUT - f_sendUtPrimitive(v_utRequest); + //send triggering primitive to SUT + f_sendUtPrimitive(v_utRequest,v_action); //Test behavior tc_ac.start; alt{ - [] mcaPort.receive(mw_request(mw_createContainer)) -> value v_request { + [] mcaPortIn.receive(mw_request(mw_createContainer)) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__, " : Container creation request is accepted!"); //set responseStatusCode back to SUT - v_responsePrimtive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); + v_responsePrimitive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); + mcaPortIn.send(m_response(v_responsePrimitive)); } - [] mcaPort.receive { + [] mcaPortIn.receive { tc_ac.stop; setverdict(fail, __SCOPE__, " : Container creation request is rejected due to not including mandatory attributes!!"); } @@ -1008,31 +1031,32 @@ module OneM2M_Testcases_AE { var template UtTriggerPrimitive v_utRequest := m_utCreateContentInstance; var MsgIn v_request; - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; + var charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for ContentInstance"; //Test component configuration f_cf03Up(); - //send triggering primtive to SUT - f_sendUtPrimitive(v_utRequest); + //send triggering primitive to SUT + f_sendUtPrimitive(v_utRequest,v_action); //Test behavior tc_ac.start; alt{ //receive MsgIn requestPrimitive - [] mcaPort.receive(mw_request(mw_createContentInstance)) -> value v_request { + [] mcaPortIn.receive(mw_request(mw_createContentInstance)) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__, " : ContentInstance creation request is accepted!!"); //set responseStatusCode back to SUT - v_responsePrimtive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); + v_responsePrimitive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); + mcaPortIn.send(m_response(v_responsePrimitive)); } - [] mcaPort.receive { + [] mcaPortIn.receive { tc_ac.stop; setverdict(fail, __SCOPE__, " : ContentInstance creation request is rejected due to not including mandatory attributes!!"); } @@ -1047,7 +1071,7 @@ module OneM2M_Testcases_AE { } /** - * @desc Check that the IUT sends a ContentInstance creation request with optional attribute ATTRIBUTE_NAME + * @desc Check that the IUT sends a ContentInstance creation request with optional attribute ATTRIBUTE_NAME */ group g_AE_DMR_CRE_003 { @@ -1055,70 +1079,75 @@ module OneM2M_Testcases_AE { testcase TC_AE_DMR_CRE_003_CNF() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_utCreateContentInstance; var template RequestPrimitive v_request := mw_createContentInstance; + var charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for ContentInstance containing attribute ContentInfo"; v_utRequest.primitiveContent.contentInstance.contentInfo := "UNINITIALIZED"; v_request.primitiveContent.contentInstance.contentInfo := ?; - f_AE_DMR_CRE_003(v_utRequest,v_request); + f_AE_DMR_CRE_003(v_utRequest,v_request,v_action); } testcase TC_AE_DMR_CRE_003_RN() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_utCreateContentInstance; var template RequestPrimitive v_request := mw_createContentInstance; + var charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for ContentInstance containing attribute ResourceName"; v_utRequest.primitiveContent.contentInstance.resourceName := "UNINITIALIZED"; v_request.primitiveContent.contentInstance.resourceName := ?; - f_AE_DMR_CRE_003(v_utRequest,v_request); + f_AE_DMR_CRE_003(v_utRequest,v_request,v_action); } testcase TC_AE_DMR_CRE_003_ET() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_utCreateContentInstance; var template RequestPrimitive v_request := mw_createContentInstance; + var charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for ContentInstance containing attribute ExpirationTime"; v_utRequest.primitiveContent.contentInstance.expirationTime := "20301231T012345"; v_request.primitiveContent.contentInstance.expirationTime := ?; - f_AE_DMR_CRE_003(v_utRequest,v_request); + f_AE_DMR_CRE_003(v_utRequest,v_request,v_action); } testcase TC_AE_DMR_CRE_003_LBL() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_utCreateContentInstance; var template RequestPrimitive v_request := mw_createContentInstance; + var charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for ContentInstance containing attribute Labels"; v_utRequest.primitiveContent.contentInstance.labels := {"UNINITIALIZED"}; v_request.primitiveContent.contentInstance.labels := ?; - f_AE_DMR_CRE_003(v_utRequest,v_request); + f_AE_DMR_CRE_003(v_utRequest,v_request,v_action); } testcase TC_AE_DMR_CRE_003_CR() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_utCreateContentInstance; var template RequestPrimitive v_request := mw_createContentInstance; + var charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for ContentInstance containing attribute Creator"; v_utRequest.primitiveContent.contentInstance.creator := "UNINITIALIZED"; v_request.primitiveContent.contentInstance.creator := ?; - f_AE_DMR_CRE_003(v_utRequest,v_request); + f_AE_DMR_CRE_003(v_utRequest,v_request,v_action); } - function f_AE_DMR_CRE_003(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request) runs on CseSimu { + function f_AE_DMR_CRE_003(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in charstring p_action) runs on CseSimu { - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; //Test component configuration f_cf03Up(); - //send triggering primtive to SUT - f_sendUtPrimitive(p_utRequest); + //send triggering primitive to SUT + f_sendUtPrimitive(p_utRequest,p_action); //Test behavior tc_ac.start; alt{ //receive MsgIn requestPrimitive - [] mcaPort.receive(mw_request(p_request)) { + [] mcaPortIn.receive(mw_request(p_request)) { tc_ac.stop; setverdict(pass, __SCOPE__, " : ContentInstance creation request is accepted!!"); //set responseStatusCode back to SUT - v_responsePrimtive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); + v_responsePrimitive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); + mcaPortIn.send(m_response(v_responsePrimitive)); } - [] mcaPort.receive { + [] mcaPortIn.receive { tc_ac.stop; setverdict(fail, __SCOPE__, " : ContentInstance creation request is rejected due to not including the attribute!"); } @@ -1145,102 +1174,111 @@ module OneM2M_Testcases_AE { testcase TC_AE_DMR_CRE_004_ACPI() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; var template RequestPrimitive v_request := mw_createContainer; + var charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute AccessControlPolicyIDs"; v_utRequest.primitiveContent.container.accessControlPolicyIDs := {"UNINITIALIZED"}; v_request.primitiveContent.container.accessControlPolicyIDs := ?; - f_AE_DMR_CRE_004(v_utRequest,v_request); + f_AE_DMR_CRE_004(v_utRequest,v_request,v_action); } testcase TC_AE_DMR_CRE_004_MNI() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; var template RequestPrimitive v_request := mw_createContainer; + var charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute MaxNrOfInstances"; v_utRequest.primitiveContent.container.maxNrOfInstances := 1; v_request.primitiveContent.container.maxNrOfInstances := ?; - f_AE_DMR_CRE_004(v_utRequest,v_request); + f_AE_DMR_CRE_004(v_utRequest,v_request,v_action); } testcase TC_AE_DMR_CRE_004_MBS() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; var template RequestPrimitive v_request := mw_createContainer; + var charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute MaxByteSize"; v_utRequest.primitiveContent.container.maxByteSize := 1; v_request.primitiveContent.container.maxByteSize := ?; - f_AE_DMR_CRE_004(v_utRequest,v_request); + f_AE_DMR_CRE_004(v_utRequest,v_request,v_action); } testcase TC_AE_DMR_CRE_004_MIA() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; var template RequestPrimitive v_request := mw_createContainer; + var charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute MaxInstanceAge"; v_utRequest.primitiveContent.container.maxInstanceAge := 1; v_request.primitiveContent.container.maxInstanceAge := ?; - f_AE_DMR_CRE_004(v_utRequest,v_request); + f_AE_DMR_CRE_004(v_utRequest,v_request,v_action); } testcase TC_AE_DMR_CRE_004_OR() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; var template RequestPrimitive v_request := mw_createContainer; + var charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute OntologyRef"; v_utRequest.primitiveContent.container.ontologyRef := "UNINITIALIZED"; v_request.primitiveContent.container.ontologyRef := ?; - f_AE_DMR_CRE_004(v_utRequest,v_request); + f_AE_DMR_CRE_004(v_utRequest,v_request,v_action); } testcase TC_AE_DMR_CRE_004_RN() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; var template RequestPrimitive v_request := mw_createContainer; + var charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute ResourceName"; v_utRequest.primitiveContent.container.resourceName := "UNINITIALIZED"; v_request.primitiveContent.container.resourceName := ?; - f_AE_DMR_CRE_004(v_utRequest,v_request); + f_AE_DMR_CRE_004(v_utRequest,v_request,v_action); } testcase TC_AE_DMR_CRE_004_ET() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; var template RequestPrimitive v_request := mw_createContainer; + var charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute ExpirationTime"; v_utRequest.primitiveContent.container.expirationTime := "20301231T012345"; v_request.primitiveContent.container.expirationTime := ?; - f_AE_DMR_CRE_004(v_utRequest,v_request); + f_AE_DMR_CRE_004(v_utRequest,v_request,v_action); } testcase TC_AE_DMR_CRE_004_LBL() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; var template RequestPrimitive v_request := mw_createContainer; + var charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute Labels"; v_utRequest.primitiveContent.container.labels := {"UNINITIALIZED"}; v_request.primitiveContent.container.labels := ?; - f_AE_DMR_CRE_004(v_utRequest,v_request); + f_AE_DMR_CRE_004(v_utRequest,v_request,v_action); } testcase TC_AE_DMR_CRE_004_CR() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; var template RequestPrimitive v_request := mw_createContainer; + var charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute Creator"; v_utRequest.primitiveContent.container.creator := "UNINITIALIZED"; v_request.primitiveContent.container.creator := ?; - f_AE_DMR_CRE_004(v_utRequest,v_request); + f_AE_DMR_CRE_004(v_utRequest,v_request,v_action); } - function f_AE_DMR_CRE_004(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request) runs on CseSimu { + function f_AE_DMR_CRE_004(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in charstring p_action) runs on CseSimu { - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; //Test component configuration f_cf03Up(); - //send triggering primtive to SUT - f_sendUtPrimitive(p_utRequest); + //send triggering primitive to SUT + f_sendUtPrimitive(p_utRequest,p_action); //Test behavior tc_ac.start; alt{ //receive MsgIn requestPrimitive - [] mcaPort.receive(mw_request(p_request)) { + [] mcaPortIn.receive(mw_request(p_request)) { tc_ac.stop; setverdict(pass, __SCOPE__, " : Container creation request is accepted!!"); //set responseStatusCode back to SUT - v_responsePrimtive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); + v_responsePrimitive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); + mcaPortIn.send(m_response(v_responsePrimitive)); } - [] mcaPort.receive { + [] mcaPortIn.receive { tc_ac.stop; setverdict(fail, __SCOPE__, " : Container creation request is rejected due to not including the attribute!"); } @@ -1262,136 +1300,93 @@ module OneM2M_Testcases_AE { group g_AE_DMR_UPD_001 { - /** - * @desc Check that the IUT sends an UPDATE Request with the value of the attribute ATTRIBUTE_NAME of the TARGET_RESOURCE_ADDRESS resource - */ - - testcase TC_AE_DMR_UPD_001_LBL() runs on CseSimu system AeSystem { - var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer; - var template RequestPrimitive v_request := mw_createContainer; - v_utRequest.primitiveContent.container.labels := {"UNINITIALIZED"}; - f_AE_DMR_UPD_001(v_utRequest,v_request); - } - - function f_AE_DMR_UPD_001(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request) runs on CseSimu { - - var ResponsePrimitive v_responsePrimtive; - var MsgIn v_request; - - //Test component configuration - f_cf03Up(); - - //send triggering primtive to SUT - f_sendUtPrimitive(p_utRequest); - - //Test behavior - tc_ac.start; - alt{ - - //receive MsgIn requestPrimitive - [] mcaPort.receive(mw_request(p_request)) -> value v_request { - tc_ac.stop; - setverdict(pass, __SCOPE__, " : Container update request is accepted!!"); - - if (match(v_request.primitive.requestPrimitive.primitiveContent.container.labels,p_utRequest.primitiveContent.container.labels)){ - setverdict(fail, __SCOPE__, " : Container update request didn't change the value of the attribute"); - }else{ - //set responseStatusCode back to SUT - v_responsePrimtive := valueof(m_responsePrimitive(int2004, "To_be_defined", omit)); - - //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); - } - } - - [] mcaPort.receive { - tc_ac.stop; - setverdict(fail, __SCOPE__, " : Container update request is rejected due to not including the attribute!"); - } - - [] tc_ac.timeout{ - setverdict(fail, __SCOPE__, " : Timeout due to no response received from requested SUT!"); - } - } - - // Postamble - f_cf03Down(); - } - - } - - group g_AE_DMR_UPD_002 { - /** * @desc Check that the IUT sends an UPDATE Request with the value of the attribute ATTRIBUTE_NAME of the AE resource */ - testcase TC_AE_DMR_UPD_002_ET() runs on CseSimu system AeSystem { + testcase TC_AE_DMR_UPD_001_ET() runs on CseSimu system AeSystem { + var charstring v_action := "Please, send a valid UPDATE Request for AE updating attribute expirationTime"; var template UtTriggerPrimitive v_utRequest := m_updateAeBase; v_utRequest.primitiveContent.aE.expirationTime := "20301231T012345"; - f_AE_DMR_UPD_002(v_utRequest); + f_AE_DMR_UPD_001(v_utRequest, v_action); + } + + testcase TC_AE_DMR_UPD_001_LBL() runs on CseSimu system AeSystem { + + var template UtTriggerPrimitive v_utRequest := m_updateAeBase; + var charstring v_action := "Please, send a valid UPDATE Request for AE updating attribute labels"; + + v_utRequest.primitiveContent.aE.labels := {"UNINITIALIZED"}; + + f_AE_DMR_UPD_001(v_utRequest,v_action); } - testcase TC_AE_DMR_UPD_002_APN() runs on CseSimu system AeSystem { + testcase TC_AE_DMR_UPD_001_APN() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_updateAeBase; + var charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for AE updating attribute appName"; v_utRequest.primitiveContent.aE.appName := "UNINITIALIZED"; - f_AE_DMR_UPD_002(v_utRequest); + f_AE_DMR_UPD_001(v_utRequest,v_action); } - testcase TC_AE_DMR_UPD_002_POA() runs on CseSimu system AeSystem { + testcase TC_AE_DMR_UPD_001_POA() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_updateAeBase; + var charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for AE updating attribute pointOfAccess"; v_utRequest.primitiveContent.aE.pointOfAccess := {"http://127.0.0.1:1400/monitor"}; - f_AE_DMR_UPD_002(v_utRequest); + f_AE_DMR_UPD_001(v_utRequest,v_action); } - testcase TC_AE_DMR_UPD_002_OR() runs on CseSimu system AeSystem { + testcase TC_AE_DMR_UPD_001_OR() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_updateAeBase; + var charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for AE updating attribute ontologyRef"; v_utRequest.primitiveContent.aE.ontologyRef := "MyOntologyRef"; - f_AE_DMR_UPD_002(v_utRequest); + f_AE_DMR_UPD_001(v_utRequest,v_action); } - testcase TC_AE_DMR_UPD_002_NL() runs on CseSimu system AeSystem { + testcase TC_AE_DMR_UPD_001_NL() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_updateAeBase; + var charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for AE updating attribute nodeLink"; v_utRequest.primitiveContent.aE.nodeLink := "/CSE_ID/S-AE-ID-STEM"; - f_AE_DMR_UPD_002(v_utRequest); + f_AE_DMR_UPD_001(v_utRequest,v_action); } - testcase TC_AE_DMR_UPD_002_RR() runs on CseSimu system AeSystem { + testcase TC_AE_DMR_UPD_001_RR() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_updateAeBase; + var charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for AE updating attribute requestReachability"; v_utRequest.primitiveContent.aE.requestReachability := true; - f_AE_DMR_UPD_002(v_utRequest); + f_AE_DMR_UPD_001(v_utRequest,v_action); } - testcase TC_AE_DMR_UPD_002_CSZ() runs on CseSimu system AeSystem { + testcase TC_AE_DMR_UPD_001_CSZ() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequestTestBody := m_updateAeBase; + var charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for AE updating attribute contentSerialization"; v_utRequestTestBody.primitiveContent.aE.contentSerialization := {applicationxml}; - f_AE_DMR_UPD_002(v_utRequestTestBody); + f_AE_DMR_UPD_001(v_utRequestTestBody,v_action); } - function f_AE_DMR_UPD_002(template UtTriggerPrimitive p_utRequestTestBody) runs on CseSimu { + function f_AE_DMR_UPD_001(template UtTriggerPrimitive p_utRequestTestBody, in charstring p_action) runs on CseSimu { - //primitives for mcaPort + //primitives for mcaPortIn var MsgIn v_request; - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; var integer v_aeIndex := -1; var template RequestPrimitive v_expectedUpdateRequestAe := mw_updateAe(); @@ -1403,7 +1398,7 @@ module OneM2M_Testcases_AE { //Send Trigger Message p_utRequestTestBody.to_ := f_getResourceAddress(v_aeIndex); - f_sendUtPrimitive(p_utRequestTestBody); + f_sendUtPrimitive(p_utRequestTestBody,p_action); //Test behavior @@ -1412,15 +1407,15 @@ module OneM2M_Testcases_AE { tc_ac.start; alt{ - [] mcaPort.receive(mw_request(v_expectedUpdateRequestAe)) -> value v_request { + [] mcaPortIn.receive(mw_request(v_expectedUpdateRequestAe)) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__, " : AE registration update request is accepted!"); - v_responsePrimtive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); + v_responsePrimitive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); + mcaPortIn.send(m_response(v_responsePrimitive)); } - [] mcaPort.receive(mw_request(?)) -> value v_request { + [] mcaPortIn.receive(mw_request(?)) -> value v_request { tc_ac.stop; setverdict(fail, __SCOPE__, " : AE registration update request is rejected due to not including the optional attribute!"); } @@ -1434,96 +1429,101 @@ module OneM2M_Testcases_AE { f_cf03Down(); } - }//End of subgroup AE_DMR_UPD_002 + }//End of subgroup AE_DMR_UPD_001 - group g_AE_DMR_UPD_003 { + group g_AE_DMR_UPD_002 { /** - * @desc Check that the IUT sends an UPDATE Request with the value of the attribute ATTRIBUTE_NAME of the <container> resource + * @desc Check that the IUT sends an UPDATE Request with the value of the attribute ATTRIBUTE_NAME of the <container> resource */ - testcase TC_AE_DMR_UPD_003_ET() runs on CseSimu system AeSystem { + testcase TC_AE_DMR_UPD_002_ET() runs on CseSimu system AeSystem { var integer v_auxInteger := f_setResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))),int2); var template RequestPrimitive v_request := mw_updateContainer; var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer; + var charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for Container updating attribute expirationTime"; v_utRequest.to_ := f_getResourceAddress(v_auxInteger); v_utRequest.primitiveContent.container.expirationTime := "20301231T012345"; v_request.primitiveContent.container.expirationTime := ?; - f_AE_DMR_UPD_003(v_utRequest,v_request); + f_AE_DMR_UPD_002(v_utRequest,v_request,v_action); } - testcase TC_AE_DMR_UPD_003_LBL() runs on CseSimu system AeSystem { + testcase TC_AE_DMR_UPD_002_LBL() runs on CseSimu system AeSystem { var integer v_auxInteger := f_setResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))),int2); var template RequestPrimitive v_request := mw_updateContainer; var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer; + var charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for Container updating attribute labels"; v_utRequest.to_ := f_getResourceAddress(v_auxInteger); v_utRequest.primitiveContent.container.labels := {"UNINITIALIZED"}; v_request.primitiveContent.container.labels := ?; - f_AE_DMR_UPD_003(v_utRequest,v_request); + f_AE_DMR_UPD_002(v_utRequest,v_request,v_action); } - testcase TC_AE_DMR_UPD_003_MNI() runs on CseSimu system AeSystem { + testcase TC_AE_DMR_UPD_002_MNI() runs on CseSimu system AeSystem { var integer v_auxInteger := f_setResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))),int2); var template RequestPrimitive v_request := mw_updateContainer; var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer; + var charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for Container updating attribute maxNrOfInstances"; v_utRequest.to_ := f_getResourceAddress(v_auxInteger); v_utRequest.primitiveContent.container.maxNrOfInstances := 1; v_request.primitiveContent.container.maxNrOfInstances := ?; - f_AE_DMR_UPD_003(v_utRequest,v_request); + f_AE_DMR_UPD_002(v_utRequest,v_request,v_action); } - testcase TC_AE_DMR_UPD_003_MBS() runs on CseSimu system AeSystem { + testcase TC_AE_DMR_UPD_002_MBS() runs on CseSimu system AeSystem { var integer v_auxInteger := f_setResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))),int2); var template RequestPrimitive v_request := mw_updateContainer; var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer; + var charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for Container updating attribute maxByteSize"; v_utRequest.to_ := f_getResourceAddress(v_auxInteger); v_utRequest.primitiveContent.container.maxByteSize := 1; v_request.primitiveContent.container.maxByteSize := ?; - f_AE_DMR_UPD_003(v_utRequest,v_request); + f_AE_DMR_UPD_002(v_utRequest,v_request,v_action); } - testcase TC_AE_DMR_UPD_003_MIA() runs on CseSimu system AeSystem { + testcase TC_AE_DMR_UPD_002_MIA() runs on CseSimu system AeSystem { var integer v_auxInteger := f_setResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))),int2); var template RequestPrimitive v_request := mw_updateContainer; var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer; + var charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for Container updating attribute maxInstanceAge"; v_utRequest.to_ := f_getResourceAddress(v_auxInteger); v_utRequest.primitiveContent.container.maxInstanceAge := 1; v_request.primitiveContent.container.maxInstanceAge := ?; - f_AE_DMR_UPD_003(v_utRequest,v_request); + f_AE_DMR_UPD_002(v_utRequest,v_request,v_action); } - function f_AE_DMR_UPD_003(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request) runs on CseSimu { + function f_AE_DMR_UPD_002(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in charstring p_action) runs on CseSimu { - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; //Test component configuration f_cf03Up(); - //send triggering primtive to SUT - f_sendUtPrimitive(p_utRequest); + //send triggering primitive to SUT + f_sendUtPrimitive(p_utRequest,p_action); //Test behavior tc_ac.start; alt{ //receive MsgIn requestPrimitive - [] mcaPort.receive(mw_request(p_request)) { + [] mcaPortIn.receive(mw_request(p_request)) { tc_ac.stop; setverdict(pass, __SCOPE__, " : Container update request is accepted!!"); //set responseStatusCode back to SUT - v_responsePrimtive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); + v_responsePrimitive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); + mcaPortIn.send(m_response(v_responsePrimitive)); } - [] mcaPort.receive { + [] mcaPortIn.receive { tc_ac.stop; setverdict(fail, __SCOPE__, " : Container update request is rejected due to not including the attribute!"); } @@ -1537,7 +1537,7 @@ module OneM2M_Testcases_AE { f_cf03Down(); } - } + }//End of subgroup AE_DMR_UPD_002 }//End of subgroup Update @@ -1546,48 +1546,56 @@ module OneM2M_Testcases_AE { group g_AE_DMR_RET_001{ /** - * @desc Check that the IUT sends a RETRIEVE Request on the TARGET_RESOURCE_ADDRESS to CSE + * @desc Check that the IUT sends a RETRIEVE Request on the TARGET_RESOURCE_ADDRESS to CSE */ testcase TC_AE_DMR_RET_001_CB() runs on CseSimu system AeSystem { var integer v_auxInteger := f_setResource(valueof(m_primitiveContentCSEBase(m_contentCreateCSEBase)), int5); - f_AE_DMR_RET_001(int5, f_getResourceAddress(v_auxInteger)); + var charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for CSEBase"; + f_AE_DMR_RET_001(int5, f_getResourceAddress(v_auxInteger),v_action); } testcase TC_AE_DMR_RET_001_AE() runs on CseSimu system AeSystem { var integer v_auxInteger := f_setResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))),int2); - f_AE_DMR_RET_001(int2, f_getResourceAddress(v_auxInteger)); + var charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for AE"; + f_AE_DMR_RET_001(int2, f_getResourceAddress(v_auxInteger),v_action); + } + + testcase TC_AE_DMR_RET_001_CNT() runs on CseSimu system AeSystem { + var integer v_auxInteger := f_setResource(valueof(m_primitiveContentContainer(m_contentCreateContainer())), int3); + var charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for Container"; + f_AE_DMR_RET_001(int3, f_getResourceAddress(v_auxInteger),v_action); } - function f_AE_DMR_RET_001(ResourceType p_resourceType, XSD.AnyURI p_address) runs on CseSimu { + function f_AE_DMR_RET_001(ResourceType p_resourceType, XSD.AnyURI p_address, in charstring p_action) runs on CseSimu { //variables var template UtTriggerPrimitive v_utRequest := m_utRetrieveResource (p_address, "UNINITIALIZED"); var MsgIn v_request; - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; //Test component configuration f_cf03Up(); - //send triggering primtive to SUT + //send triggering primitive to SUT v_utRequest.resourceType := p_resourceType; - f_sendUtPrimitive(v_utRequest); + f_sendUtPrimitive(v_utRequest,p_action); //Test behavior tc_ac.start; alt{ - [] mcaPort.receive(mw_request(mw_retrieveResource(p_address))) -> value v_request { + [] mcaPortIn.receive(mw_request(mw_retrieveResource(p_address))) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__, " : retrieve ressource type " & int2str(enum2int(v_request.primitive.requestPrimitive.resourceType)) & " request is accepted!!"); //set responseStatusCode back to SUT - v_responsePrimtive := valueof(m_responsePrimitive(int2000, "To_be_defined", omit)); + v_responsePrimitive := valueof(m_responsePrimitive(int2000, "To_be_defined", omit)); //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); + mcaPortIn.send(m_response(v_responsePrimitive)); tc_ac.stop; } - [] mcaPort.receive { + [] mcaPortIn.receive { tc_ac.stop; setverdict(fail, __SCOPE__, " : error while retrieving ressource !"); } @@ -1614,29 +1622,30 @@ module OneM2M_Testcases_AE { //variables var template UtTriggerPrimitive v_utRequest := m_utRetrieveResource (v_address & "/" & c_resourceShortNameOldest, "UNINITIALIZED"); var MsgIn v_request; - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; + var charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for retrieving the 'oldest' attribute from Container"; //Test component configuration f_cf03Up(); - //send triggering primtive to SUT - f_sendUtPrimitive(v_utRequest); + //send triggering primitive to SUT + f_sendUtPrimitive(v_utRequest,v_action); //Test behavior tc_ac.start; alt{ - [] mcaPort.receive(mw_request(mw_retrieveResource(v_address & "/" & c_resourceShortNameOldest))) -> value v_request { + [] mcaPortIn.receive(mw_request(mw_retrieveResource(v_address & "/" & c_resourceShortNameOldest))) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__, " : retrieve attribute oldest request is accepted!"); //set responseStatusCode back to SUT - v_responsePrimtive := valueof(m_responsePrimitive(int2000, "To_be_defined", omit)); + v_responsePrimitive := valueof(m_responsePrimitive(int2000, "To_be_defined", omit)); //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); + mcaPortIn.send(m_response(v_responsePrimitive)); tc_ac.stop; } - [] mcaPort.receive { + [] mcaPortIn.receive { tc_ac.stop; setverdict(fail, __SCOPE__, " : error while retrieving attribute !"); } @@ -1661,29 +1670,30 @@ module OneM2M_Testcases_AE { //variables var template UtTriggerPrimitive v_utRequest := m_utRetrieveResource (v_address & "/" & c_resourceShortNameLatest, "UNINITIALIZED"); var MsgIn v_request; - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; + var charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for retrieving the 'latest' attribute from Container"; //Test component configuration f_cf03Up(); - //send triggering primtive to SUT - f_sendUtPrimitive(v_utRequest); + //send triggering primitive to SUT + f_sendUtPrimitive(v_utRequest,v_action); //Test behavior tc_ac.start; alt{ - [] mcaPort.receive(mw_request(mw_retrieveResource(v_address & "/" & c_resourceShortNameLatest))) -> value v_request { + [] mcaPortIn.receive(mw_request(mw_retrieveResource(v_address & "/" & c_resourceShortNameLatest))) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__, " : retrieve attribute latest request is accepted!!"); //set responseStatusCode back to SUT - v_responsePrimtive := valueof(m_responsePrimitive(int2000, "To_be_defined", omit)); + v_responsePrimitive := valueof(m_responsePrimitive(int2000, "To_be_defined", omit)); //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); + mcaPortIn.send(m_response(v_responsePrimitive)); tc_ac.stop; } - [] mcaPort.receive { + [] mcaPortIn.receive { tc_ac.stop; setverdict(fail, __SCOPE__, " : error while retrieving attribute !"); } @@ -1708,30 +1718,31 @@ module OneM2M_Testcases_AE { //variables var template UtTriggerPrimitive v_utRequest := m_utRetrieveResource (v_address, "UNINITIALIZED"); var MsgIn v_request; - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; + var charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for retrieving the Container"; //Test component configuration f_cf03Up(); - //send triggering primtive to SUT + //send triggering primitive to SUT v_utRequest.resourceType := int3; - f_sendUtPrimitive(v_utRequest); + f_sendUtPrimitive(v_utRequest,v_action); //Test behavior tc_ac.start; alt{ - [] mcaPort.receive(mw_request(mw_retrieveResource(v_address))) -> value v_request { + [] mcaPortIn.receive(mw_request(mw_retrieveResource(v_address))) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__, " : retrieve ressource type " & int2str(enum2int(v_request.primitive.requestPrimitive.resourceType)) & " request is accepted!!"); //set responseStatusCode back to SUT - v_responsePrimtive := valueof(m_responsePrimitive(int2000, "To_be_defined", omit)); + v_responsePrimitive := valueof(m_responsePrimitive(int2000, "To_be_defined", omit)); //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); + mcaPortIn.send(m_response(v_responsePrimitive)); tc_ac.stop; } - [] mcaPort.receive { + [] mcaPortIn.receive { tc_ac.stop; setverdict(fail, __SCOPE__, " : error while retrieving ressource !"); } @@ -1756,30 +1767,31 @@ module OneM2M_Testcases_AE { //variables var template UtTriggerPrimitive v_utRequest := m_utRetrieveResource (v_address, "UNINITIALIZED"); var MsgIn v_request; - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; + var charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for retrieving the contentInstance"; //Test component configuration f_cf03Up(); - //send triggering primtive to SUT + //send triggering primitive to SUT v_utRequest.resourceType := int4; - f_sendUtPrimitive(v_utRequest); + f_sendUtPrimitive(v_utRequest,v_action); //Test behavior tc_ac.start; alt{ - [] mcaPort.receive(mw_request(mw_retrieveResource(v_address))) -> value v_request { + [] mcaPortIn.receive(mw_request(mw_retrieveResource(v_address))) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__, " : retrieve ressource type " & int2str(enum2int(v_request.primitive.requestPrimitive.resourceType)) & " request is accepted!!"); //set responseStatusCode back to SUT - v_responsePrimtive := valueof(m_responsePrimitive(int2000, "To_be_defined", omit)); + v_responsePrimitive := valueof(m_responsePrimitive(int2000, "To_be_defined", omit)); //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); + mcaPortIn.send(m_response(v_responsePrimitive)); tc_ac.stop; } - [] mcaPort.receive { + [] mcaPortIn.receive { tc_ac.stop; setverdict(fail, __SCOPE__, " : error while retrieving ressource !"); } @@ -1808,29 +1820,30 @@ module OneM2M_Testcases_AE { //variables var template UtTriggerPrimitive v_utRequest := m_utDeleteResource (v_address & "/" & c_resourceShortNameOldest, "UNINITIALIZED"); var MsgIn v_request; - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; + var charstring v_action := __SCOPE__ & ": Please, send a valid DELETE Request for deleting the 'oldest' attribute from contentInstance"; //Test component configuration f_cf03Up(); - //send triggering primtive to SUT - f_sendUtPrimitive(v_utRequest); + //send triggering primitive to SUT + f_sendUtPrimitive(v_utRequest,v_action); //Test behavior tc_ac.start; alt{ - [] mcaPort.receive(mw_request(mw_deleteRequest(v_address & "/" & c_resourceShortNameOldest))) -> value v_request { + [] mcaPortIn.receive(mw_request(mw_deleteRequest(v_address & "/" & c_resourceShortNameOldest))) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__, " : delete attribute oldest request is accepted!!"); //set responseStatusCode back to SUT - v_responsePrimtive := valueof(m_responsePrimitive(int2002, "To_be_defined", omit)); + v_responsePrimitive := valueof(m_responsePrimitive(int2002, "To_be_defined", omit)); //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); + mcaPortIn.send(m_response(v_responsePrimitive)); tc_ac.stop; } - [] mcaPort.receive { + [] mcaPortIn.receive { tc_ac.stop; setverdict(fail, __SCOPE__, " : error while deleting attribute !"); } @@ -1855,29 +1868,30 @@ module OneM2M_Testcases_AE { //variables var template UtTriggerPrimitive v_utRequest := m_utDeleteResource (v_address & "/" & c_resourceShortNameLatest, "UNINITIALIZED"); var MsgIn v_request; - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; + var charstring v_action := __SCOPE__ & ": Please, send a valid DELETE Request for deleting the 'latest' attribute from contentInstance"; //Test component configuration f_cf03Up(); - //send triggering primtive to SUT - f_sendUtPrimitive(v_utRequest); + //send triggering primitive to SUT + f_sendUtPrimitive(v_utRequest,v_action); //Test behavior tc_ac.start; alt{ - [] mcaPort.receive(mw_request(mw_deleteRequest(v_address & "/" & c_resourceShortNameLatest))) -> value v_request { + [] mcaPortIn.receive(mw_request(mw_deleteRequest(v_address & "/" & c_resourceShortNameLatest))) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__, " : delete attribute latest request is accepted!!"); //set responseStatusCode back to SUT - v_responsePrimtive := valueof(m_responsePrimitive(int2002, "To_be_defined", omit)); + v_responsePrimitive := valueof(m_responsePrimitive(int2002, "To_be_defined", omit)); //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); + mcaPortIn.send(m_response(v_responsePrimitive)); tc_ac.stop; } - [] mcaPort.receive { + [] mcaPortIn.receive { tc_ac.stop; setverdict(fail, __SCOPE__, " : error while deleting attribute !"); } @@ -1902,30 +1916,31 @@ module OneM2M_Testcases_AE { //variables var template UtTriggerPrimitive v_utRequest := m_utDeleteResource (v_address, "UNINITIALIZED"); var MsgIn v_request; - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; + var charstring v_action := __SCOPE__ & ": Please, send a valid DELETE Request for deleting the container resource"; //Test component configuration f_cf03Up(); - //send triggering primtive to SUT + //send triggering primitive to SUT v_utRequest.resourceType := int3; - f_sendUtPrimitive(v_utRequest); + f_sendUtPrimitive(v_utRequest,v_action); //Test behavior tc_ac.start; alt{ - [] mcaPort.receive(mw_request(mw_deleteRequest(v_address))) -> value v_request { + [] mcaPortIn.receive(mw_request(mw_deleteRequest(v_address))) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__, " : delete ressource type " & int2str(enum2int(v_request.primitive.requestPrimitive.resourceType)) & " request is accepted!!"); //set responseStatusCode back to SUT - v_responsePrimtive := valueof(m_responsePrimitive(int2002, "To_be_defined", omit)); + v_responsePrimitive := valueof(m_responsePrimitive(int2002, "To_be_defined", omit)); //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); + mcaPortIn.send(m_response(v_responsePrimitive)); tc_ac.stop; } - [] mcaPort.receive { + [] mcaPortIn.receive { tc_ac.stop; setverdict(fail, __SCOPE__, " : error while deleting ressource !"); } @@ -1939,7 +1954,7 @@ module OneM2M_Testcases_AE { } /** - * @desc Check that the IUT sends a <contentInstance> resource RETRIEVE Request to CSE + * @desc Check that the IUT sends a <contentInstance> resource DELETE Request to CSE */ testcase TC_AE_DMR_DEL_004 () runs on CseSimu system AeSystem { @@ -1950,30 +1965,31 @@ module OneM2M_Testcases_AE { //variables var template UtTriggerPrimitive v_utRequest := m_utDeleteResource (v_address, "UNINITIALIZED"); var MsgIn v_request; - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; + var charstring v_action := __SCOPE__ & ": Please, send a valid DELETE Request for deleting the contentInstance resource"; //Test component configuration f_cf03Up(); - //send triggering primtive to SUT + //send triggering primitive to SUT v_utRequest.resourceType := int4; - f_sendUtPrimitive(v_utRequest); + f_sendUtPrimitive(v_utRequest,v_action); //Test behavior tc_ac.start; alt{ - [] mcaPort.receive(mw_request(mw_deleteRequest(v_address))) -> value v_request { + [] mcaPortIn.receive(mw_request(mw_deleteRequest(v_address))) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__, " : delete ressource type " & int2str(enum2int(v_request.primitive.requestPrimitive.resourceType)) & " request is accepted!!"); //set responseStatusCode back to SUT - v_responsePrimtive := valueof(m_responsePrimitive(int2002, "To_be_defined", omit)); + v_responsePrimitive := valueof(m_responsePrimitive(int2002, "To_be_defined", omit)); //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); + mcaPortIn.send(m_response(v_responsePrimitive)); tc_ac.stop; } - [] mcaPort.receive { + [] mcaPortIn.receive { tc_ac.stop; setverdict(fail, __SCOPE__, " : error while deleting ressource !"); } @@ -2004,30 +2020,31 @@ module OneM2M_Testcases_AE { //variables var template UtTriggerPrimitive v_utRequest := m_utCreateSubscription; var MsgIn v_request; - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; + var charstring v_action := __SCOPE__ & ": Please, send a valid subscription creation request"; var integer v_auxInteger := f_setResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))),int2); v_utRequest.to_ := f_getResourceAddress(v_auxInteger); f_cf03Up(); - //send triggering primtive to SUT - f_sendUtPrimitive(v_utRequest); + //send triggering primitive to SUT + f_sendUtPrimitive(v_utRequest,v_action); //Test behavior tc_ac.start; alt{ - [] mcaPort.receive(mw_request(mw_createSubscription)) -> value v_request { + [] mcaPortIn.receive(mw_request(mw_createSubscription)) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__, " : Subscription creation request is accepted!"); //set responseStatusCode back to SUT - v_responsePrimtive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); + v_responsePrimitive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); + mcaPortIn.send(m_response(v_responsePrimitive)); } - [] mcaPort.receive { + [] mcaPortIn.receive { tc_ac.stop; setverdict(fail, __SCOPE__, " : Subscription creation request is rejected due to not including mandatory attributes!!"); } @@ -2049,6 +2066,7 @@ module OneM2M_Testcases_AE { testcase TC_AE_SUB_CRE_002_ACPI() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_utCreateSubscription; var template RequestPrimitive v_requestT := mw_createSubscription; + var charstring v_action := __SCOPE__ & ": Please, send a valid subscription creation request with optional attribute accessControlPolicyIDs"; var integer v_auxInteger := f_setResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))),int2); v_utRequest.to_ := f_getResourceAddress(v_auxInteger); @@ -2059,12 +2077,13 @@ module OneM2M_Testcases_AE { v_requestT.primitiveContent.subscription.notificationURI := ?; v_requestT.primitiveContent.subscription.accessControlPolicyIDs := ?; - f_AE_SUB_CRE_002(v_utRequest, v_requestT); + f_AE_SUB_CRE_002(v_utRequest, v_requestT, v_action); } testcase TC_AE_SUB_CRE_002_ENC() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_utCreateSubscription; var template RequestPrimitive v_requestT := mw_createSubscription; + var charstring v_action := __SCOPE__ & ": Please, send a valid subscription creation request with optional attribute createdBefore"; var integer v_auxInteger := f_setResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))),int2); v_utRequest.to_ := f_getResourceAddress(v_auxInteger); v_utRequest.primitiveContent.subscription.notificationURI := {"UNINITIALIZED"}; @@ -2075,12 +2094,13 @@ module OneM2M_Testcases_AE { v_requestT.primitiveContent.subscription.notificationURI := ?; v_requestT.primitiveContent.subscription.eventNotificationCriteria.createdBefore := ?; - f_AE_SUB_CRE_002(v_utRequest, v_requestT); + f_AE_SUB_CRE_002(v_utRequest, v_requestT, v_action); } testcase TC_AE_SUB_CRE_002_EXC() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_utCreateSubscription; var template RequestPrimitive v_requestT := mw_createSubscription; + var charstring v_action := __SCOPE__ & ": Please, send a valid subscription creation request with optional attribute expirationCounter"; var integer v_auxInteger := f_setResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))),int2); v_utRequest.to_ := f_getResourceAddress(v_auxInteger); @@ -2091,12 +2111,13 @@ module OneM2M_Testcases_AE { v_requestT.primitiveContent.subscription.notificationURI := ?; v_requestT.primitiveContent.subscription.expirationCounter := ?; - f_AE_SUB_CRE_002(v_utRequest, v_requestT); + f_AE_SUB_CRE_002(v_utRequest, v_requestT, v_action); } testcase TC_AE_SUB_CRE_002_NFU() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_utCreateSubscription; var template RequestPrimitive v_requestT := mw_createSubscription; + var charstring v_action := __SCOPE__ & ": Please, send a valid subscription creation request with optional attribute notificationForwardingURI"; var integer v_auxInteger := f_setResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))),int2); v_utRequest.to_ := f_getResourceAddress(v_auxInteger); @@ -2107,12 +2128,13 @@ module OneM2M_Testcases_AE { v_requestT.primitiveContent.subscription.notificationURI := ?; v_requestT.primitiveContent.subscription.notificationForwardingURI := ?; - f_AE_SUB_CRE_002(v_utRequest, v_requestT); + f_AE_SUB_CRE_002(v_utRequest, v_requestT, v_action); } testcase TC_AE_SUB_CRE_002_NCT() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_utCreateSubscription; var template RequestPrimitive v_requestT := mw_createSubscription; + var charstring v_action := __SCOPE__ & ": Please, send a valid subscription creation request with optional attribute notificationContentType"; var integer v_auxInteger := f_setResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))),int2); v_utRequest.to_ := f_getResourceAddress(v_auxInteger); @@ -2123,12 +2145,13 @@ module OneM2M_Testcases_AE { v_requestT.primitiveContent.subscription.notificationURI := ?; v_requestT.primitiveContent.subscription.notificationContentType := ?; - f_AE_SUB_CRE_002(v_utRequest, v_requestT); + f_AE_SUB_CRE_002(v_utRequest, v_requestT, v_action); } testcase TC_AE_SUB_CRE_002_NEC() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_utCreateSubscription; var template RequestPrimitive v_requestT := mw_createSubscription; + var charstring v_action := __SCOPE__ & ": Please, send a valid subscription creation request with optional attribute notificationEventCat"; var integer v_auxInteger := f_setResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))),int2); v_utRequest.to_ := f_getResourceAddress(v_auxInteger); @@ -2139,12 +2162,13 @@ module OneM2M_Testcases_AE { v_requestT.primitiveContent.subscription.notificationURI := ?; v_requestT.primitiveContent.subscription.notificationEventCat.alt_ := ?; - f_AE_SUB_CRE_002(v_utRequest, v_requestT); + f_AE_SUB_CRE_002(v_utRequest, v_requestT, v_action); } testcase TC_AE_SUB_CRE_002_SU() runs on CseSimu system AeSystem { var template UtTriggerPrimitive v_utRequest := m_utCreateSubscription; var template RequestPrimitive v_requestT := mw_createSubscription; + var charstring v_action := __SCOPE__ & ": Please, send a valid subscription creation request with optional attribute subscriberURI"; var integer v_auxInteger := f_setResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))),int2); v_utRequest.to_ := f_getResourceAddress(v_auxInteger); @@ -2155,33 +2179,33 @@ module OneM2M_Testcases_AE { v_requestT.primitiveContent.subscription.notificationURI := ?; v_requestT.primitiveContent.subscription.subscriberURI := ?; - f_AE_SUB_CRE_002(v_utRequest, v_requestT); + f_AE_SUB_CRE_002(v_utRequest, v_requestT, v_action); } - function f_AE_SUB_CRE_002(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request) runs on CseSimu { + function f_AE_SUB_CRE_002(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in charstring p_action) runs on CseSimu { var MsgIn v_request; - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; f_cf03Up(); - //send triggering primtive to SUT - f_sendUtPrimitive(p_utRequest); + //send triggering primitive to SUT + f_sendUtPrimitive(p_utRequest,p_action); //Test behavior tc_ac.start; alt{ - [] mcaPort.receive(mw_request(p_request)) -> value v_request { + [] mcaPortIn.receive(mw_request(p_request)) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__, " : Subscription creation request is accepted!"); //set responseStatusCode back to SUT - v_responsePrimtive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); + v_responsePrimitive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); + mcaPortIn.send(m_response(v_responsePrimitive)); } - [] mcaPort.receive { + [] mcaPortIn.receive { tc_ac.stop; setverdict(fail, __SCOPE__, " : Subscription creation request is rejected due to not including the optional attribute!"); } @@ -2205,12 +2229,13 @@ module OneM2M_Testcases_AE { * @desc Check that the IUT sends a Notify Response to the hosting CSE when receiving a Notify request containing a single notification */ - testcase TC_AE_SUB_NTY_001() runs on CseSimu system AeSystem { + testcase TC_AE_SUB_NTF_001() runs on CseSimu system AeSystem { //variables var template UtTriggerPrimitive v_utRequest := m_createAe("UNINITIALIZED"); var MsgIn v_request; - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; + var charstring v_action := __SCOPE__ & ": Please, send a valid AE Registration CREATE Request"; var integer v_auxInteger := f_setResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))),int2); v_utRequest.to_ := f_getResourceAddress(v_auxInteger); @@ -2218,18 +2243,18 @@ module OneM2M_Testcases_AE { f_cf03Up(); //create Ae - f_sendUtPrimitive(v_utRequest); + f_sendUtPrimitive(v_utRequest,v_action); tc_ac.start; alt{ - [] mcaPort.receive(mw_request(mw_createAe)) -> value v_request { + [] mcaPortIn.receive(mw_request(mw_createAe)) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__, " : AE registration request is accepted!!"); - v_responsePrimtive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); + v_responsePrimitive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); - } - [] mcaPort.receive(mw_request(mw_createAe(*,?,m_contentCreateAe_Invalid))) -> value v_request { + mcaPortIn.send(m_response(v_responsePrimitive)); + } + [] mcaPortIn.receive(mw_request(mw_createAe(*,?,m_contentCreateAe_Invalid))) -> value v_request { tc_ac.stop; setverdict(inconc, __SCOPE__, " : AE registration request is rejected due to not including mandatory attributes!!"); stop; @@ -2244,21 +2269,22 @@ module OneM2M_Testcases_AE { //create Subscription v_utRequest := m_utCreateSubscription; v_utRequest.to_ := f_getResourceAddress(-1); - f_sendUtPrimitive(v_utRequest); + v_action := "Please, send a valid CREATE request for Subscription"; + f_sendUtPrimitive(v_utRequest,v_action); tc_ac.start; alt{ - [] mcaPort.receive(mw_request(mw_createSubscription)) -> value v_request { + [] mcaPortIn.receive(mw_request(mw_createSubscription)) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__, " : Subscription creation request is accepted!"); //set responseStatusCode back to SUT - v_responsePrimtive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); + v_responsePrimitive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); + mcaPortIn.send(m_response(v_responsePrimitive)); } - [] mcaPort.receive { + [] mcaPortIn.receive { tc_ac.stop; setverdict(inconc, __SCOPE__, " : Subscription creation request is rejected due to not including mandatory attributes!!"); } @@ -2269,15 +2295,15 @@ module OneM2M_Testcases_AE { //Test behavior - mcaPort.send(m_request(m_notifyRequest)); + mcaPortIn.send(m_request(m_notifyRequest)); tc_ac.start; alt{ - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + [] mcaPortIn.receive(mw_response(mw_responsePrimitiveOK)) { tc_ac.stop; setverdict(pass, __SCOPE__, " : Notification response is accepted!"); } - [] mcaPort.receive { + [] mcaPortIn.receive { tc_ac.stop; setverdict(fail, __SCOPE__, " : Notification response is rejected due to not including mandatory attributes!"); } @@ -2294,12 +2320,13 @@ module OneM2M_Testcases_AE { * @desc Check that the IUT sends a Notify Response to the hosting CSE when receiving a Notify request containing aggregated notifications */ - testcase TC_AE_SUB_NTY_002() runs on CseSimu system AeSystem { + testcase TC_AE_SUB_NTF_002() runs on CseSimu system AeSystem { //variables var template UtTriggerPrimitive v_utRequest := m_createAe("UNINITIALIZED"); var MsgIn v_request; - var ResponsePrimitive v_responsePrimtive; + var ResponsePrimitive v_responsePrimitive; + var charstring v_action := __SCOPE__ & ": Please, send a valid AE Registration CREATE Request"; var integer v_auxInteger := f_setResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))),int2); v_utRequest.to_ := f_getResourceAddress(v_auxInteger); @@ -2307,18 +2334,18 @@ module OneM2M_Testcases_AE { f_cf03Up(); //create Ae - f_sendUtPrimitive(v_utRequest); + f_sendUtPrimitive(v_utRequest,v_action); tc_ac.start; alt{ - [] mcaPort.receive(mw_request(mw_createAe)) -> value v_request { + [] mcaPortIn.receive(mw_request(mw_createAe)) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__, " : AE registration request is accepted!!"); - v_responsePrimtive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); + v_responsePrimitive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); - } - [] mcaPort.receive(mw_request(mw_createAe(*,?,m_contentCreateAe_Invalid))) -> value v_request { + mcaPortIn.send(m_response(v_responsePrimitive)); + } + [] mcaPortIn.receive(mw_request(mw_createAe(*,?,m_contentCreateAe_Invalid))) -> value v_request { tc_ac.stop; setverdict(inconc, __SCOPE__, " : AE registration request is rejected due to not including mandatory attributes!!"); stop; @@ -2333,21 +2360,22 @@ module OneM2M_Testcases_AE { //create Subscription v_utRequest := m_utCreateSubscription; v_utRequest.to_ := f_getResourceAddress(-1); - f_sendUtPrimitive(v_utRequest); + v_action := "Please, send a valid CREATE request for Subscription"; + f_sendUtPrimitive(v_utRequest,v_action); tc_ac.start; alt{ - [] mcaPort.receive(mw_request(mw_createSubscription)) -> value v_request { + [] mcaPortIn.receive(mw_request(mw_createSubscription)) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__, " : Subscription creation request is accepted!"); //set responseStatusCode back to SUT - v_responsePrimtive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); + v_responsePrimitive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); //send back responsePrimitive - mcaPort.send(m_response(v_responsePrimtive)); + mcaPortIn.send(m_response(v_responsePrimitive)); } - [] mcaPort.receive { + [] mcaPortIn.receive { tc_ac.stop; setverdict(inconc, __SCOPE__, " : Subscription creation request is rejected due to not including mandatory attributes!!"); } @@ -2358,15 +2386,15 @@ module OneM2M_Testcases_AE { //Test behavior - mcaPort.send(m_request(m_notifyAggregatedRequest)); + mcaPortIn.send(m_request(m_notifyAggregatedRequest)); tc_ac.start; alt{ - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + [] mcaPortIn.receive(mw_response(mw_responsePrimitiveOK)) { tc_ac.stop; setverdict(pass, __SCOPE__, " : Notification response is accepted!"); } - [] mcaPort.receive { + [] mcaPortIn.receive { tc_ac.stop; setverdict(fail, __SCOPE__, " : Notification response is rejected due to not including mandatory attributes!"); } diff --git a/OneM2M_Testcases_CSE.ttcn b/OneM2M_Testcases_CSE.ttcn index 9f586a7bd3be568d7227e2a7ccc86ff73af2fcd5..6be702a29784762af09e8b8155680d741716a446 100644 --- a/OneM2M_Testcases_CSE.ttcn +++ b/OneM2M_Testcases_CSE.ttcn @@ -870,14 +870,19 @@ module OneM2M_Testcases_CSE { var integer v_cseBaseIndex := -1; var ResourceType v_resourceType := int2; + //Test control + if(not(PICS_IN_CSE)) { + setverdict(inconc, __SCOPE__ & ": IUT shall be IN-CSE to run this test case"); + stop; + } + // Test component configuration f_cf01Up(); //Preamble - v_cseBaseIndex := f_cse_preamble_createServiceSubscribedProfile({"S*"}); //c_CRUDNDi); - + //Test Body - v_request := valueof(m_createAe(PX_APP_ID, omit, omit)); + v_request := valueof(m_createAe(PX_APP_ID, omit, "S-AE-ID-STEM")); v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1); @@ -885,8 +890,11 @@ module OneM2M_Testcases_CSE { tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { tc_ac.stop; + f_checkAttributesToBeSaved(int2, v_request, v_response.primitive.responsePrimitive); + vc_aeAuxIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int2); + setverdict(pass, __SCOPE__ & ": AE successfully created."); } [] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{ @@ -916,6 +924,8 @@ module OneM2M_Testcases_CSE { var RequestPrimitive v_request; var integer v_cseBaseIndex := -1; var ResourceType v_resourceType := int2; + + //Test control // Test component configuration f_cf01Up(); @@ -930,8 +940,11 @@ module OneM2M_Testcases_CSE { mcaPort.send(m_request(v_request)); tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response{ tc_ac.stop; + + f_checkAttributesToBeSaved(int2, v_request, v_response.primitive.responsePrimitive); + vc_aeAuxIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int2); setverdict(pass, __SCOPE__ & ": AE successfully created."); } [] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{ @@ -949,6 +962,25 @@ module OneM2M_Testcases_CSE { // Tear down f_cf01Down(); + } + + /** + * @desc Check that the IUT accepts a create request of <AE> resource with attributes multiplicity equals to 1 and provided preprovisioned SP_relative_AE_ID. + */ + + testcase TC_CSE_REG_CRE_003() runs on CseSimu system CseSystem{ + + var integer v_remoteCseIndex := -1; + + //Test Configuration + //f_cf02Up(); + + //Preamble + v_remoteCseIndex := f_cse_registrationRemoteCse(); + vc_ae1 := AeSimu.create("AE1") alive; + vc_ae1.start(f_cse_preamble_registerAe()); + + } /** @@ -961,20 +993,23 @@ module OneM2M_Testcases_CSE { var RequestPrimitive v_request; var integer v_cseBaseIndex := -1; var ResourceType v_resourceType := int2; + + //Test control // Test component configuration f_cf01Up(); //Preambule - //vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSEBase); + //vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE); //TODO: create serviceSubscribedProfile, Node, and serviceSubscribedAppRule //v_cseBaseIndex := f_cse_preamble_createServiceSubscribedProfile({"C*"}); //c_CRUDNDi); //Test Body //v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM")); - f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, "C")); + v_request := f_getCreateRequestPrimitive(int2, m_createAe(PX_APP_ID, omit, PX_NOT_ALLOWED_C_AE_IDS[0]), -1); + mcaPort.send(m_request(v_request)); tc_ac.start; alt { [] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) { @@ -1007,31 +1042,33 @@ module OneM2M_Testcases_CSE { var RequestPrimitive v_request; var integer v_cseBaseIndex := -1; var ResourceType v_resourceType := int2; + + //Test control // Test component configuration f_cf02UpCseSimuMaster(); //Preambule //v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule({"S"});//c_CRUDNDi); - vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSEBase); + vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE); //Test Body - vc_aeSimu.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, omit))); + vc_ae1.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, omit))); //v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex); //mcaPort.send(m_request(v_request)); tc_ac.start; alt{ - []mccPort.receive(mw_request(mw_createAEAnnc(f_getResourceAddress(-1,e_hierarchical, e_spRelative) & "/S", "CSE_ID", -))){ + []mccPortIn.receive(mw_request(mw_createAEAnnc(f_getResourceAddress(-1,e_hierarchical, e_spRelative) & "/S", "CSE_ID", -))){ tc_ac.stop; setverdict(pass, __SCOPE__ & ": AE creation redirected."); } - []mccPort.receive(mw_request(mw_createAEAnnc(f_getResourceAddress(-1,e_hierarchical, e_absolute) & "/S", "CSE_ID", -))){ + []mccPortIn.receive(mw_request(mw_createAEAnnc(f_getResourceAddress(-1,e_hierarchical, e_absolute) & "/S", "CSE_ID", -))){ tc_ac.stop; setverdict(pass, __SCOPE__ & ": AE creation redirected."); } - [] mccPort.receive { + [] mccPortIn.receive { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Error while creating AE"); } @@ -1040,8 +1077,8 @@ module OneM2M_Testcases_CSE { } } - /*vc_cseSimu.start(f_cse_receiveCreateRequest(mw_createAEAnnc(-, -, -))); - vc_cseSimu.done;*/ + /*vc_cse1.start(f_cse_receiveCreateRequest(mw_createAEAnnc(-, -, -))); + vc_cse1.done;*/ // Postamble f_cse_postamble_deleteResourcesCSE(); @@ -1060,20 +1097,28 @@ module OneM2M_Testcases_CSE { var RequestPrimitive v_request; var integer v_cseBaseIndex := -1; var ResourceType v_resourceType := int2; + + //Test control + if(not(PICS_MN_CSE)) { + setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE to run this test case"); + stop; + } // Test component configuration f_cf02UpCseSimuMaster(); //Preambule - vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSEBase); - vc_aeSimu.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, "S"))); + vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE); + vc_ae1.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, "S"))); + + vc_ae1.done; //TODO: //v_request := valueof(m_delete(f_getResourceAddress(v_aeIndex), f_getOriginator(v_aeIndex))); //mcaPort.send(m_request(v_request)); //Test Body - vc_aeSimu.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, "S"))); + vc_ae1.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, "S"))); tc_ac.start; @@ -1113,6 +1158,12 @@ module OneM2M_Testcases_CSE { var RequestPrimitive v_request; var integer v_aeAnncIndex := -1; var ResourceType v_resourceType := int2; + + //Test control + if(not(PICS_IN_CSE)) { + setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE to run this test case"); + stop; + } // Test component configuration f_cf04Up(); @@ -1121,7 +1172,7 @@ module OneM2M_Testcases_CSE { vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase); - v_aeAnncIndex := f_cse_announceResource(int2, m_createAEAnnc(-, -, -, PX_APP_ID, -)); + v_aeAnncIndex := f_cse_announceResource(int2, m_createAEAnnc(-, "/" & "SAE1", PX_APP_ID, PX_CSE1_ID & "/" & "SAE1")); //Test Body v_request := valueof(m_updateAEAnnc(-, -, -, PX_APP_ID, -)); //TODO to double check all parameters @@ -1168,18 +1219,24 @@ module OneM2M_Testcases_CSE { var MsgIn v_response; var RequestPrimitive v_request; var integer v_aeIndex := -1; + + //Test control + if(not(PICS_MN_CSE)) { + setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE to run this test case"); + stop; + } // Test component configuration f_cf02Up(); //Preambule - vc_cseSimu.start(f_cse_registrationRemoteCse(mw_createRemoteCSEBase)); - vc_cseSimu.done; + vc_cse1.start(f_cse_registrationRemoteCse(mw_createRemoteCSE)); + vc_cse1.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; + vc_cse1.start(f_cse_resourceAnnouncementHandler()); + vc_cse1.done; //TODO Deregister //f_cse_deleteResource(v_aeIndex); @@ -1189,8 +1246,8 @@ module OneM2M_Testcases_CSE { //Test Body f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, f_getResourceId(vc_resourcesList[v_aeIndex].resource))); - vc_cseSimu.start(f_cse_resourceAnnouncementHandler(PX_CSE_ID, f_getResourceAddress(v_aeIndex, e_nonHierarchical, e_spRelative))); - vc_cseSimu.done; + vc_cse1.start(f_cse_resourceAnnouncementHandler(PX_CSE_ID, f_getResourceAddress(v_aeIndex, e_nonHierarchical, e_spRelative))); + vc_cse1.done; tc_ac.start; @@ -1225,13 +1282,174 @@ module OneM2M_Testcases_CSE { }; //end TC_CSE_REG_CRE_010 - group g_CSE_REG_CRE_016 { + /** + * @desc Check that the IUT accepts a create request of <AE> resource with attributes multiplicity equals to 1 and asking an CSE relative AE_ID by indicating AE_ID_Stem with character ‘C’. + * + */ + testcase TC_CSE_REG_CRE_011() runs on AeSimu system CseSystem { + + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_cseBaseIndex := -1; + var ResourceType v_resourceType := int2; + + //Test control + + + // Test component configuration + f_cf01Up(); + + //Preamble + + //Test Body + v_request := valueof(m_createAe(PX_APP_ID, omit, "C")); + + v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1); + + mcaPort.send(m_request(v_request)); + + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { + tc_ac.stop; + f_checkAttributesToBeSaved(int2, v_request, v_response.primitive.responsePrimitive); + vc_aeAuxIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int2); + setverdict(pass, __SCOPE__ & ": AE successfully created."); + + if(v_response.primitive.responsePrimitive.primitiveContent.aE.resourceID[0] == "C"){ + setverdict(pass, __SCOPE__ & "Resource ID set correctly."); + } else { + setverdict(fail, __SCOPE__ & "Resource ID not set correctly."); + } + + if(f_isScopeSpRelative(v_response.primitive.responsePrimitive.primitiveContent.aE.aE_ID)){ + setverdict(pass, __SCOPE__ & "AE ID set correctly."); + } else { + setverdict(fail, __SCOPE__ & "AE ID not set correctly."); + } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{ + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating AE"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + } + + /** + * @desc Check that the IUT accepts an AE registration with the optional attribute OPTIONAL_ATTRIBUTE provided + * + */ + group g_CSE_REG_CRE_012 { + + testcase TC_CSE_REG_CRE_012_AE_LBL() runs on Tester system CseSystem { + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_create := m_createAe(PX_APP_ID, omit, omit); + + v_create.primitiveContent.aE.labels := {"labels"}; + v_ae1.start(TC_CSE_REG_CRE_012(v_create)); + v_ae1.done; + } + + testcase TC_CSE_REG_CRE_012_AE_APN() runs on Tester system CseSystem { + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_create := m_createAe(PX_APP_ID, omit, omit); + + v_create.primitiveContent.aE.appName := "AeAppName"; + v_ae1.start(TC_CSE_REG_CRE_012(v_create)); + v_ae1.done; + } + + testcase TC_CSE_REG_CRE_012_AE_POA() runs on Tester system CseSystem { + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_create := m_createAe(PX_APP_ID, omit, omit); + + v_create.primitiveContent.aE.pointOfAccess := {PX_AE1_ADDRESS}; + v_ae1.start(TC_CSE_REG_CRE_012(v_create)); + v_ae1.done; + } + + testcase TC_CSE_REG_CRE_012_AE_NL() runs on Tester system CseSystem { + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_create := m_createAe(PX_APP_ID, omit, omit); + + v_create.primitiveContent.aE.nodeLink := "http://127.0.0.1/"; + v_ae1.start(TC_CSE_REG_CRE_012(v_create)); + v_ae1.done; + } + + testcase TC_CSE_REG_CRE_012_AE_OR() runs on Tester system CseSystem { + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_create := m_createAe(PX_APP_ID, omit, omit); + + v_create.primitiveContent.aE.ontologyRef := "MyOntologyRef"; + v_ae1.start(TC_CSE_REG_CRE_012(v_create)); + v_ae1.done; + } + + function TC_CSE_REG_CRE_012(in template RequestPrimitive p_createAe) runs on AeSimu { + + //Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var ResourceType v_resourceType := int2; //AE + + // Test control + + // Test component configuration + f_cf01Up(); + + //Test Body + + v_request := valueof(p_createAe); + v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1); + + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response{ + tc_ac.stop; + + f_checkAttributesToBeSaved(int2, v_request, v_response.primitive.responsePrimitive); + vc_aeAuxIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int2); + + setverdict(pass, __SCOPE__ & ": AE creation successfull."); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{ + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating AE"); + } + } + + //Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + } + + } + + + group g_CSE_REG_CRE_013 { /** * @desc Check that the IUT accepts a create request of <remoteCSE> resource with OPTIONAL_ATTRIBUTE. * */ - testcase TC_CSE_REG_CRE_016_LBL() runs on Tester system CseSystem { + testcase TC_CSE_REG_CRE_013_LBL() runs on Tester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createRemoteCSEBase; const AttributeAux c_optionalAttribute := {"labels", omit}; @@ -1239,12 +1457,12 @@ module OneM2M_Testcases_CSE { v_createRequest.primitiveContent.remoteCSE.labels := {"MyLabel"}; - v_cse1.start(f_CSE_REG_CRE_016(v_createRequest, c_optionalAttribute)); + v_cse1.start(f_CSE_REG_CRE_013(v_createRequest, c_optionalAttribute)); v_cse1.done; } - testcase TC_CSE_REG_CRE_016_CST() runs on Tester system CseSystem { + testcase TC_CSE_REG_CRE_013_CST() runs on Tester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createRemoteCSEBase; const AttributeAux c_optionalAttribute := {"cseType", omit}; @@ -1252,11 +1470,11 @@ module OneM2M_Testcases_CSE { v_createRequest.primitiveContent.remoteCSE.cseType := int1; - v_cse1.start(f_CSE_REG_CRE_016(v_createRequest, c_optionalAttribute)); + v_cse1.start(f_CSE_REG_CRE_013(v_createRequest, c_optionalAttribute)); v_cse1.done; } - testcase TC_CSE_REG_CRE_016_POA() runs on Tester system CseSystem { + testcase TC_CSE_REG_CRE_013_POA() runs on Tester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createRemoteCSEBase; const AttributeAux c_optionalAttribute := {"pointOfAccess", omit}; @@ -1264,12 +1482,12 @@ module OneM2M_Testcases_CSE { v_createRequest.primitiveContent.remoteCSE.pointOfAccess := {"http://" & PX_CSE1_ADDRESS & "/"}; - v_cse1.start(f_CSE_REG_CRE_016(v_createRequest, c_optionalAttribute)); + v_cse1.start(f_CSE_REG_CRE_013(v_createRequest, c_optionalAttribute)); v_cse1.done; } - testcase TC_CSE_REG_CRE_016_NL() runs on Tester system CseSystem { + testcase TC_CSE_REG_CRE_013_NL() runs on Tester system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createRemoteCSEBase; const AttributeAux c_optionalAttribute := {"nodeLink", omit}; @@ -1277,12 +1495,12 @@ module OneM2M_Testcases_CSE { v_createRequest.primitiveContent.remoteCSE.nodeLink := c_defaultNodeID; - v_cse1.start(f_CSE_REG_CRE_016(v_createRequest, c_optionalAttribute)); + v_cse1.start(f_CSE_REG_CRE_013(v_createRequest, c_optionalAttribute)); v_cse1.done; } - function f_CSE_REG_CRE_016(template RequestPrimitive p_requestPrimitive, in AttributeAux p_optionalAttribute) runs on CseSimu { + function f_CSE_REG_CRE_013(template RequestPrimitive p_requestPrimitive, in AttributeAux p_optionalAttribute) runs on CseSimu { // Local variables var MsgIn v_response; @@ -1321,7 +1539,7 @@ module OneM2M_Testcases_CSE { } [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Rejected creation of resource type remoteCSE containing attribute" & p_optionalAttribute.name); + setverdict(fail, __SCOPE__ & ": Rejected creation of resource type remoteCSE containing attribute " & p_optionalAttribute.name); } [] tc_ac.timeout { setverdict(fail, __SCOPE__ & ": No answer while creating resource type remoteCSE"); @@ -1334,20 +1552,22 @@ module OneM2M_Testcases_CSE { // Tear down f_cf04Down(); - }//end f_CSE_REG_CRE_BV_016 + }//end f_CSE_REG_CRE_BV_013 - }// end group g_CSE_REG_CRE_BV_016 + }// end group g_CSE_REG_CRE_BV_013 /** * @desc Check that the IUT rejects an AE registration (not allowed App-ID) * */ - testcase TC_CSE_REG_CRE_019() runs on AeSimu system CseSystem { + testcase TC_CSE_REG_CRE_016() runs on AeSimu system CseSystem { var MsgIn v_response; var RequestPrimitive v_request; var integer v_cseBaseIndex := -1; var ResourceType v_resourceType := int2; + + //Test control // Test component configuration f_cf01Up(); @@ -1384,11 +1604,88 @@ module OneM2M_Testcases_CSE { } + /** + * @desc Check that the IUT rejects a create request of <AE> resource that doesn’t include the MANDATORY_ATTRIBUTE + * + */ + group g_CSE_REG_CRE_017 { + testcase TC_CSE_REG_CRE_017_API() runs on Tester system CseSystem { + + //Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createAe(PX_APP_ID); + + v_createRequest.primitiveContent.aE.app_ID := omit; //Mandatory app_ID field is being set empty + + v_ae1.start(f_CSE_REG_CRE_017(v_createRequest)); + v_ae1.done; + + }//end TC_CSE_REG_CRE_017_API + testcase TC_CSE_REG_CRE_017_RR() runs on Tester system CseSystem { + + // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createAe(PX_APP_ID); + + v_createRequest.primitiveContent.aE.requestReachability := omit; //Mandatory requestReachability field is being set empty + + v_ae1.start(f_CSE_REG_CRE_017(v_createRequest)); + v_ae1.done; + + }//end TC_CSE_REG_CRE_017_RR + + function f_CSE_REG_CRE_017(template RequestPrimitive p_createRequestPrimitive) runs on AeSimu { + + //Local variables + var ResourceType v_resourceType := int2; + var RequestPrimitive v_request; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + + // Test Body + v_request := f_getCreateRequestPrimitive(int2, p_createRequestPrimitive, -1); + + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) { //BAD REQUEST + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Request successfully rejected"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)){ + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, AE has been registered"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + } + }//end g_CSE_REG_CRE_017 + /** * @desc Check that the IUT accepts an create request of <remoteCSE> resource with attributes multiplicity equals to 1. * */ - testcase TC_CSE_REG_CRE_022() runs on CseSimu system CseSystem { + testcase TC_CSE_REG_CRE_018() runs on CseSimu system CseSystem { // Local variables var MsgIn v_response; @@ -1436,13 +1733,13 @@ module OneM2M_Testcases_CSE { // Tear down f_cf04Down(); - }//end TC_CSE_REG_CRE_022 + }//end TC_CSE_REG_CRE_018 /** * @desc Check that the IUT accepts an create request of <remoteCSE> resource with attributes multiplicity equals to 1 without the preconfigured CSE-ID * */ - testcase TC_CSE_REG_CRE_023() runs on CseSimu system CseSystem { + testcase TC_CSE_REG_CRE_019() runs on CseSimu system CseSystem { // Local variables var MsgIn v_response; @@ -1486,65 +1783,206 @@ module OneM2M_Testcases_CSE { // Tear down f_cf04Down(); - }//end TC_CSE_REG_CRE_023 + }//end TC_CSE_REG_CRE_019 /** - * @desc Check that the IUT rejects the create request of <CSEBase> resource. + * @desc Check that the IUT accepts a response from IN_CSE on the success update of AEAnnc during AE registration with preprovisioned SP_relative_AE_ID * */ - testcase TC_CSE_REG_CRE_025() runs on AeSimu system CseSystem { - - // Local variables + //TODO TO BE FINALIZED + testcase TC_CSE_REG_CRE_020() runs on AeSimu system CseSystem { + var MsgIn v_response; var RequestPrimitive v_request; var integer v_aeIndex := -1; - var ResourceType v_resourceType := int5; //CSEBase - - // Test control - + var ResourceType v_resourceType := int2; + + //Test control + if(not(PICS_MN_CSE)) { + setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE to run this test case"); + stop; + } + // Test component configuration - f_cf01Up(); - - // Test adapter configuration + f_cf02Up(); - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + //Preambule + vc_cse1.start(f_cse_registrationRemoteCse(mw_createRemoteCSE)); + vc_cse1.done; + + v_request := valueof(m_createAe(PX_APP_ID, omit, omit)); + + v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1); - // Test Body - v_request := f_getCreateRequestPrimitive(v_resourceType, m_createCSEBaseBase, -1); - v_request.from_ := f_getOriginator(v_aeIndex); - mcaPort.send(m_request(v_request)); tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response{ tc_ac.stop; - setverdict(pass, __SCOPE__ & ": CSEBase creation rejected."); + + f_checkAttributesToBeSaved(int2, v_request, v_response.primitive.responsePrimitive); + vc_aeAuxIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int2); + setverdict(pass, __SCOPE__ & ": AE successfully created."); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int4005))) -> value v_response{ + [] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{ tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating CSEBase with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))); + setverdict(fail, __SCOPE__ & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))); } [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating CSEBase"); + setverdict(fail, __SCOPE__ & ": No answer while creating AE"); } } - - // Postamble - f_cse_postamble_deleteResources(); - - // Tear down - f_cf01Down(); - - }//end TC_CSE_REG_CRE_025 - - /** - * @desc Check that the IUT rejects the create request of <CSEBase> resource. - * - */ - testcase TC_CSE_REG_CRE_027() runs on AeSimu system CseSystem { - // Local variables + vc_cse1.start(f_cse_notifyProcedure_updateHandler()); + vc_cse1.done; + + //Test body + tc_ac.start; + + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { + tc_ac.stop; + //continue to test the content + if (ischosen(v_response.primitive.responsePrimitive.primitiveContent.aE)){ + if (v_response.primitive.responsePrimitive.primitiveContent.aE.app_ID == PX_APP_ID){ + setverdict(pass, __SCOPE__ & ": AE creation success."); + }else{ + setverdict(fail, __SCOPE__ & ": Error in AE content."); + } + }else{ + setverdict(fail, __SCOPE__ & ": primitiveContent doesn't exist"); + } + } + [] mcaPort.receive { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating AE"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating AE"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf02Down(); + + }; //end TC_CSE_REG_CRE_020 + + /** + * @desc Check that the IUT rejects the create request of <CSEBase> resource. + * + */ + testcase TC_CSE_REG_CRE_021() runs on AeSimu system CseSystem { + + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var ResourceType v_resourceType := int5; //CSEBase + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + // Test Body + v_request := f_getCreateRequestPrimitive(v_resourceType, m_createCSEBaseBase, -1); + v_request.from_ := f_getOriginator(v_aeIndex); + + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": CSEBase creation rejected."); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int4005))) -> value v_response{ + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating CSEBase with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating CSEBase"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end TC_CSE_REG_CRE_021 + + /** + * @desc Check that the IUT accepts an AE registration (allowed App-ID, C-AE-ID-STEM not provided by AE) + * + */ + testcase TC_CSE_REG_CRE_022() runs on AeSimu system CseSystem { + + var MsgIn v_response; + var RequestPrimitive v_request; + var ResourceType v_resourceType := int2; + + //Test control + + // Test component configuration + f_cf01Up(); + + //Preamble + + //Test Body + v_request := valueof(m_createAe(PX_APP_ID, omit, "C")); + + v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1); + + mcaPort.send(m_request(v_request)); + + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { + tc_ac.stop; + f_checkAttributesToBeSaved(int2, v_request, v_response.primitive.responsePrimitive); + vc_aeAuxIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int2); + setverdict(pass, __SCOPE__ & ": AE successfully registered."); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{ + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while registering AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while registering AE"); + } + } + + //Check to see if the resource is present or not + if (f_isResourcePresent(vc_aeAuxIndex)){ + setverdict(pass, __SCOPE__ & ":INFO: Resource created"); + } else { + setverdict(fail, __SCOPE__ & ":ERROR: Resource not created"); + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + } + + /** + * @desc Check that the IUT rejects the create request of <CSEBase> resource. + * + + testcase TC_CSE_REG_CRE_027() runs on AeSimu system CseSystem { + + // Local variables var RequestPrimitive v_request; var integer v_cseBaseIndex := -1; var ResourceType v_resourceType := int2; @@ -1557,7 +1995,7 @@ module OneM2M_Testcases_CSE { // Test adapter configuration // Preamble - vc_cseSimu.start(f_cse_registrationRemoteCse(mw_createRemoteCSEBase)); + vc_cse1.start(f_cse_registrationRemoteCse(mw_createRemoteCSE)); // Test Body f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, omit)); @@ -1583,13 +2021,13 @@ module OneM2M_Testcases_CSE { // Tear down f_cf02Down(); - }//end TC_CSE_REG_CRE_027 + }end TC_CSE_REG_CRE_027*/ /** * @desc Check that the IUT rejects registration of already registered AE (C-AE-ID-STEM provided by AE) * */ - testcase TC_CSE_REG_CRE_028() runs on AeSimu system CseSystem { + testcase TC_CSE_REG_CRE_023() runs on AeSimu system CseSystem { var MsgIn v_response; var RequestPrimitive v_request; @@ -1635,558 +2073,2547 @@ module OneM2M_Testcases_CSE { } - 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); - - tc_ac.start; - alt { - [] mccPort.receive(mw_request(mw_createRemoteCSEBase(PX_CSE_ID,f_getResourceAddress(-1)))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Resource type remoteCSE created successfully"); - } - [] mccPort.receive { - 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 - - group Retrieve{ - /** - * @desc Check that the IUT accepts an retrieval request of <CSEBase> resource and responds with all attributes that have multiplicity equals to 1. + * @desc Check that IUT sends a CSE registration request with attributes multiplicity equals to 1 * */ - testcase TC_CSE_REG_RET_001() runs on AeSimu system CseSystem { - + testcase TC_CSE_REG_CRE_024() runs on CseSimu system CseSystem { + // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var template PrimitiveContent v_contentResponse; - - // Test control - + var ResponsePrimitive v_responsePrimitive; + var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE; + var charstring v_action := __SCOPE__ & ": Please, send a CSE registration request with attributes multiplicity equals to 1"; + + //Test control + if(not(PICS_MN_CSE)) { + setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE to run this test case"); + stop; + } + // Test component configuration - f_cf01Up(); - + f_cf04Up(); + // Test adapter configuration - + // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - + //send triggering primitive to SUT + f_sendUtPrimitive(v_utRequest,v_action); + // Test Body - v_contentResponse.cSEBase := mw_contentCSEBase_rc1; - - mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(v_aeIndex))));//TODO Maybe PX_SUPER_AE_ID - tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Response OK for retrieving"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response { + [] mccPortIn.receive(mw_request(mw_createRemoteCSEBase)) { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); + setverdict(pass, __SCOPE__&":INFO: Resource type remoteCSE created successfuly"); + + //set responseStatusCode back to SUT + v_responsePrimitive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); + + //send back responsePrimitive + mccPortIn.send(m_response(v_responsePrimitive)); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + [] mccPortIn.receive { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + setverdict(inconc, __SCOPE__&":INFO: Unexpected message received"); } [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + setverdict(inconc, __SCOPE__&":INFO: No request received for creating resource type remoteCSE"); } } - // Postamble - f_cse_postamble_deleteResources(); - + f_cse_postamble_deleteResourcesCSE(); + // Tear down - f_cf01Down(); - - }//end TC_CSE_REG_RET_001 + f_cf04Down(); + + } /** - * @desc Check that if the IUT is IN-CSE, it accepts an retrieval request of <CSEBase> resource and returns the cseType attribute. cseType Attribute is mandatory for IN-CSE + * @desc Check that IUT accepts a CSE registration request with attributes multiplicity equals to 1 * */ - testcase TC_CSE_REG_RET_005() runs on AeSimu system CseSystem { - + testcase TC_CSE_REG_CRE_025() runs on CseSimu system CseSystem { + // Local variables var MsgIn v_response; - var integer v_aeIndex := -1; - var template PrimitiveContent v_contentResponse; - + var RequestPrimitive v_request; + var integer v_resourceIndex := -1; + var integer v_localResourceIndex := -1; + var PrimitiveContent v_remoteCSEResource; + // Test control - if(not(PICS_IN_CSE)) { - setverdict(inconc, __SCOPE__ & ": IUT shall be IN-CSE to run this test case"); - stop; - } // Test component configuration - f_cf01Up(); + f_cf04Up(); // Test adapter configuration // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - + v_request := f_getCreateRequestPrimitive(int16, m_createRemoteCSEBase, -1); + mccPort.send(m_request(v_request)); + // Test Body - v_contentResponse.cSEBase := mw_contentCSEBase_rc1; - - mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(v_aeIndex))));//TODO Maybe PX_SUPER_AE_ID - tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response { + [] mccPort.receive(mw_response(mw_responsePrimitiveOK(?))) -> value v_response { tc_ac.stop; - if (ispresent(v_response.primitive.responsePrimitive.primitiveContent.cSEBase.cseType)){ - if (v_response.primitive.responsePrimitive.primitiveContent.cSEBase.cseType==int1){ - setverdict(pass, __SCOPE__ & ": cseType attribute is set to 1 (IN_CSE)"); - }else{ - setverdict(fail, __SCOPE__ & ": Error, cseType attribute is set to " & int2str(enum2int(v_response.primitive.responsePrimitive.primitiveContent.cSEBase.cseType))); - } - }else{ - setverdict(fail, __SCOPE__ & ": Error, cseType attribute is not present"); - } - + setverdict(pass, __SCOPE__&":INFO: Resource type remoteCSE created successfuly"); + f_checkAttributesToBeSaved(int16, v_request, v_response.primitive.responsePrimitive); + v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int16, -1); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response { + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); + setverdict(inconc, __SCOPE__&":INFO: Error while creating resource type remoteCSE"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + [] mccPort.receive { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + setverdict(inconc, __SCOPE__&":INFO: Unexpected message received"); } [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + setverdict(inconc, __SCOPE__&":INFO: No answer while creating resource type remoteCSE"); } } - // Postamble - f_cse_postamble_deleteResources(); + f_cse_postamble_deleteResourcesCSE(); // Tear down - f_cf01Down(); - - }//end TC_CSE_REG_RET_BV_005 + f_cf04Down(); + + } /** - * @desc Check that the IUT accepts a retrieval request of <CSEBase> resource and responds with supportedResourceTypes attribute containing a list of the supported resources and pointOfAccess containing the list of physical addresses to be used by Registree to connect to this CSE (e.g. IP address, FQDN). + * @desc Check that IUT sends a CSE registration request with OPTIONAL_ATTRIBUTE attribute * */ - testcase TC_CSE_REG_RET_008() runs on AeSimu system CseSystem { - - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var template PrimitiveContent v_contentResponse; - - // Test control + + group g_CSE_REG_CRE_026 { + + testcase TC_CSE_REG_CRE_026_RN() runs on CseSimu system CseSystem { + var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE; + var template RequestPrimitive v_request := mw_createRemoteCSE; + var charstring v_action := __SCOPE__ & ": Please, send a CSE registration request with optional attribute resourceName"; + v_utRequest.primitiveContent.remoteCSE.resourceName := "UNINITIALIZED"; + v_request.primitiveContent.remoteCSE.resourceName := ?; + f_CSE_REG_CRE_026(v_utRequest,v_request,v_action); + } + + testcase TC_CSE_REG_CRE_026_ET() runs on CseSimu system CseSystem { + var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE; + var template RequestPrimitive v_request := mw_createRemoteCSE; + var charstring v_action := __SCOPE__ & ": Please, send a CSE registration request with optional attribute expirationTime"; + v_utRequest.primitiveContent.remoteCSE.expirationTime := "20301231T012345"; + v_request.primitiveContent.remoteCSE.expirationTime := ?; + f_CSE_REG_CRE_026(v_utRequest,v_request,v_action); + } + + testcase TC_CSE_REG_CRE_026_LBL() runs on CseSimu system CseSystem { + var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE; + var template RequestPrimitive v_request := mw_createRemoteCSE; + var charstring v_action := __SCOPE__ & ": Please, send a CSE registration request with optional attribute labels"; + v_utRequest.primitiveContent.remoteCSE.labels := {"UNINITIALIZED"}; + v_request.primitiveContent.remoteCSE.labels := ?; + f_CSE_REG_CRE_026(v_utRequest,v_request,v_action); + } + + testcase TC_CSE_REG_CRE_026_POA() runs on CseSimu system CseSystem { + var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE; + var template RequestPrimitive v_request := mw_createRemoteCSE; + var charstring v_action := __SCOPE__ & ": Please, send a CSE registration request with optional attribute pointOfAccess"; + v_utRequest.primitiveContent.remoteCSE.pointOfAccess := {"UNINITIALIZED"}; + v_request.primitiveContent.remoteCSE.pointOfAccess := ?; + f_CSE_REG_CRE_026(v_utRequest,v_request,v_action); + } + + testcase TC_CSE_REG_CRE_026_NL() runs on CseSimu system CseSystem { + var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE; + var template RequestPrimitive v_request := mw_createRemoteCSE; + var charstring v_action := __SCOPE__ & ": Please, send a CSE registration request with optional attribute nodeLink"; + v_utRequest.primitiveContent.remoteCSE.nodeLink := "UNINITIALIZED"; + v_request.primitiveContent.remoteCSE.nodeLink := ?; + f_CSE_REG_CRE_026(v_utRequest,v_request,v_action); + } + + testcase TC_CSE_REG_CRE_026_CST() runs on CseSimu system CseSystem { + var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE; + var template RequestPrimitive v_request := mw_createRemoteCSE; + var charstring v_action := __SCOPE__ & ": Please, send a CSE registration request with optional attribute cseType"; + v_utRequest.primitiveContent.remoteCSE.cseType := int1;//TODO It should be marked as "UNITIALIZED" + v_request.primitiveContent.remoteCSE.cseType := ?; + f_CSE_REG_CRE_026(v_utRequest,v_request,v_action); + } + + function f_CSE_REG_CRE_026(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in charstring p_action) runs on CseSimu { + + var ResponsePrimitive v_responsePrimitive; + + //Test control + if(not(PICS_MN_CSE)) { + setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + //Test component configuration + f_cf04Up(); - // Test adapter configuration + //send triggering primitive to SUT + f_sendUtPrimitive(p_utRequest,p_action); - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + //Test behavior + tc_ac.start; + alt{ - // Test Body - v_contentResponse.cSEBase := mw_contentCSEBase_rc1; + //receive MsgIn requestPrimitive + [] mccPortIn.receive(mw_request(p_request)) { + tc_ac.stop; + setverdict(pass, __SCOPE__&":INFO: Resource type remoteCSE created successfuly"); - mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(v_aeIndex))));//TODO Maybe PX_SUPER_AE_ID + //set responseStatusCode back to SUT + v_responsePrimitive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response { - tc_ac.stop; - - if (v_response.primitive.responsePrimitive.primitiveContent.cSEBase.supportedResourceType == PX_SRT) { - setverdict(pass, __SCOPE__ & ": supportedResourceTypes attribute is set according to PX_SRT"); - }else{ - setverdict(fail, __SCOPE__ & ": supportedResourceTypes attribute is not set according to PX_SRT"); + //send back responsePrimitive + mccPortIn.send(m_response(v_responsePrimitive)); } - - if (v_response.primitive.responsePrimitive.primitiveContent.cSEBase.pointOfAccess==PX_POA){ - setverdict(pass, __SCOPE__ & ": supportedResourceTypes attribute is set according to PX_POA"); - }else{ - setverdict(fail, __SCOPE__ & ": supportedResourceTypes attribute is not set according to PX_POA"); + [] mccPortIn.receive { + tc_ac.stop; + setverdict(fail, __SCOPE__&":INFO: Unexpected message received"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__&":INFO: No request received for creating resource type remoteCSE"); } - - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + + // Postamble + f_cse_postamble_deleteResourcesCSE(); + + // Tear down + f_cf04Down(); + + } + } + + /*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); + + tc_ac.start; + alt { + [] mccPort.receive(mw_request(mw_createRemoteCSE(PX_CSE_ID,f_getResourceAddress(-1)))) -> value v_response { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); + setverdict(pass, __SCOPE__ & ": Resource type remoteCSE created successfully"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + [] mccPort.receive { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + setverdict(fail, __SCOPE__ & ": Error while creating resource type remoteCSE"); } [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + setverdict(fail, __SCOPE__ & ": No answer while creating resource type remoteCSE"); } } - + // Postamble - f_cse_postamble_deleteResources(); - + f_cse_postamble_deleteResourcesCSE(); + // Tear down - f_cf01Down(); - - }//end TC_CSE_REG_RET_008 - - } //end group Retrieve - - group Update{ - + f_cf04Down(); + + }*/ + + /** - * @desc Check that the IUT rejects the update request of <CSEBase> resource. + * @desc Check that IUT accepts a CSE registration request with cseType attribute set to ‘MN_CSE’ * */ - testcase TC_CSE_REG_UPD_001() runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; + testcase TC_CSE_REG_CRE_027() runs on CseSimu system CseSystem { + //Local variables + var ResourceType v_resourceType := int16; //remoteCSE var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var Labels v_labels_1 := {"VALUE_1"}; - var template RequestPrimitive v_updateRequest := m_updateCSEBaseBase; - const integer c_cseBaseIndex := -1; + var template PrimitiveContent v_contentResponse; // Test control // Test component configuration - f_cf01Up(); + f_cf04Up(); // Test adapter configuration // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + v_request := valueof(m_createRemoteCSEBase); + v_request.primitiveContent.remoteCSE.cseType := int2; //MN_CSE - // Test Body - v_updateRequest.primitiveContent.cSEBase.labels := v_labels_1; - v_request := f_getUpdateRequestPrimitive(int5, c_cseBaseIndex, v_updateRequest); + v_contentResponse.remoteCSE := mw_contentRemoteCSEBase; + v_contentResponse.remoteCSE.cseType := int2; //MN_CSE - mcaPort.send(m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": CSEBase update rejected."); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int4005))) -> value v_response{ - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while updating CSEBase with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while updating CSEBase"); - } - } + //Test Body + vc_remoteCseIndex := f_cse_registerRemoteCse(v_request, v_contentResponse); + + //Check if the resource has been deleted or not + if(f_cse_isResourcePresent(vc_remoteCseIndex)) { + setverdict(pass, __SCOPE__ & ":INFO: Resource created"); + } else { + setverdict(fail, __SCOPE__ & ":INFO: Resource not created"); + } // Postamble - f_cse_postamble_deleteResources(); + f_cse_postamble_deleteResourcesCSE(); // Tear down - f_cf01Down(); - - }//end TC_CSE_REG_UPD_BI_001 + f_cf04Down(); - }// end group Update + }//end TC_CSE_REG_CRE_027 + + /** + * @desc Check that IUT accepts a CSE registration request with OPTIONAL_ATTRIBUTE attribute + * + */ + group g_CSE_REG_CRE_028 { + + testcase TC_CSE_REG_CRE_028_RN() runs on Tester system CseSystem { + //Local variables + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + var RequestPrimitive v_request; + var template PrimitiveContent v_contentResponse; + + v_request := valueof(m_createRemoteCSEBase); + v_request.primitiveContent.remoteCSE.cseType := int2; //MN_CSE + v_request.primitiveContent.remoteCSE.resourceName := c_defaultRemoteCSEResourceName; + + v_contentResponse.remoteCSE := mw_contentRemoteCSEBase; + v_contentResponse.remoteCSE.cseType := int2; //MN_CSE + v_contentResponse.remoteCSE.resourceName := c_defaultRemoteCSEResourceName; + + v_cse1.start(f_CSE_REG_CRE_028(v_request, v_contentResponse)); + v_cse1.done; + + } + + testcase TC_CSE_REG_CRE_028_ET() runs on Tester system CseSystem { + //Local variables + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + var RequestPrimitive v_request; + var template PrimitiveContent v_contentResponse; + + v_request := valueof(m_createRemoteCSEBase); + v_request.primitiveContent.remoteCSE.cseType := int2; //MN_CSE + v_request.primitiveContent.remoteCSE.expirationTime := "20301231T012345"; + + v_contentResponse.remoteCSE := mw_contentRemoteCSEBase; + v_contentResponse.remoteCSE.cseType := int2; //MN_CSE + v_contentResponse.remoteCSE.expirationTime := "20301231T012345"; + + v_cse1.start(f_CSE_REG_CRE_028(v_request, v_contentResponse)); + v_cse1.done; + + } + + testcase TC_CSE_REG_CRE_028_LBL() runs on Tester system CseSystem { + //Local variables + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + var RequestPrimitive v_request; + var template PrimitiveContent v_contentResponse; + var Labels v_labels_1 := {"VALUE_1"}; + + v_request := valueof(m_createRemoteCSEBase); + v_request.primitiveContent.remoteCSE.cseType := int2; //MN_CSE + v_request.primitiveContent.remoteCSE.labels := v_labels_1; + + v_contentResponse.remoteCSE := mw_contentRemoteCSEBase; + v_contentResponse.remoteCSE.cseType := int2; //MN_CSE + v_contentResponse.remoteCSE.labels := v_labels_1; + + v_cse1.start(f_CSE_REG_CRE_028(v_request, v_contentResponse)); + v_cse1.done; + + } + + testcase TC_CSE_REG_CRE_028_POA() runs on Tester system CseSystem { + //Local variables + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + var RequestPrimitive v_request; + var template PrimitiveContent v_contentResponse; + + v_request := valueof(m_createRemoteCSEBase); + v_request.primitiveContent.remoteCSE.cseType := int2; //MN_CSE + v_request.primitiveContent.remoteCSE.pointOfAccess := {"http://" & PX_CSE1_ADDRESS & "/"}; + + v_contentResponse.remoteCSE := mw_contentRemoteCSEBase; + v_contentResponse.remoteCSE.cseType := int2; //MN_CSE + v_contentResponse.remoteCSE.pointOfAccess := {"http://" & PX_CSE1_ADDRESS & "/"}; + + v_cse1.start(f_CSE_REG_CRE_028(v_request, v_contentResponse)); + v_cse1.done; + + } + + testcase TC_CSE_REG_CRE_028_NL() runs on Tester system CseSystem { + //Local variables + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + var RequestPrimitive v_request; + var template PrimitiveContent v_contentResponse; + + v_request := valueof(m_createRemoteCSEBase); + v_request.primitiveContent.remoteCSE.cseType := int2; //MN_CSE + v_request.primitiveContent.remoteCSE.nodeLink := c_defaultNodeID; + + v_contentResponse.remoteCSE := mw_contentRemoteCSEBase; + v_contentResponse.remoteCSE.cseType := int2; //MN_CSE + v_contentResponse.remoteCSE.nodeLink := c_defaultNodeID; + + v_cse1.start(f_CSE_REG_CRE_028(v_request, v_contentResponse)); + v_cse1.done; + + } + + function f_CSE_REG_CRE_028(RequestPrimitive p_request, template PrimitiveContent p_contentResponse) runs on CseSimu{ //system CseSystem { + //Local variables + var ResourceType v_resourceType := int16; //remoteCSE + // Test control + + // Test component configuration + f_cf04Up(); + + // Test adapter configuration + + // Preamble + + + //Test Body + vc_remoteCseIndex := f_cse_registerRemoteCse(p_request, p_contentResponse); + + //Check if the resource has been deleted or not + if(f_cse_isResourcePresent(vc_remoteCseIndex)) { + setverdict(pass, __SCOPE__ & ":INFO: Resource created"); + } else { + setverdict(fail, __SCOPE__ & ":INFO: Resource not created"); + } + + // Postamble + f_cse_postamble_deleteResourcesCSE(); + + // Tear down + f_cf04Down(); + + }//end TC_CSE_REG_CRE_028 + }//end g_CSE_REG_CRE_028 - group Delete{ + } //end group Create + group Retrieve{ + /** - * @desc Check that the IUT rejects the delete request of <CSEBase> resource. + * @desc Check that the IUT accepts an retrieval request of <CSEBase> resource and responds with all attributes that have multiplicity equals to 1. * */ - testcase TC_CSE_REG_DEL_001() runs on AeSimu system CseSystem { + testcase TC_CSE_REG_RET_001() runs on AeSimu system CseSystem { + // Local variables var MsgIn v_response; - var RequestPrimitive v_request; var integer v_aeIndex := -1; - + var template PrimitiveContent v_contentResponse; + // Test control - + // Test component configuration f_cf01Up(); - + // Test adapter configuration - + // Preamble v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - + // Test Body - v_request := valueof(m_delete(f_getResourceAddress(), f_getOriginator())); - mcaPort.send(m_request(v_request)); + v_contentResponse.cSEBase := mw_contentCSEBase_rc1; + + mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(v_aeIndex))));//TODO Maybe PX_SUPER_AE_ID + tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response { tc_ac.stop; - setverdict(pass, __SCOPE__ & ": CSEBase deletion rejected."); + setverdict(pass, __SCOPE__ & ": Response OK for retrieving"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int4005))) -> value v_response{ + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while deleting CSEBase with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))); + setverdict(fail, __SCOPE__ & ": Wrong response status code"); } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while deleting CSEBase"); + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); } - } - + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } + // Postamble f_cse_postamble_deleteResources(); - + // Tear down f_cf01Down(); - - }//end TC_CSE_REG_DEL_BI_001 - - }// end group Delete - - }//end Registration - - group Data_Management_and_Repository { - - group Create { + + }//end TC_CSE_REG_RET_001 - group g_CSE_DMR_CRE_001 { + /** + * @desc Check that the IUT accepts a retrieval request of <CSEBase> resource with the optional ATTRIBUTE + * + */ + group g_CSE_REG_RET_002 { - /** - * @desc Check that the IUT accepts the creation of a RESOURCE_TYPE resource on the TARGET_RESOURCE_ADDRESS of type PARENT_RESOURCE_TYPE with resource name not provided - * - */ - testcase TC_CSE_DMR_CRE_001_CNT_CB() runs on Tester system CseSystem { + testcase TC_CSE_REG_RET_002_CST() runs on Tester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createContainerBase; - var ResponsePrimitive v_responsePrimitive; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_createRequest.primitiveContent.container.resourceName := omit; - v_ae1.start(f_CSE_DMR_CRE_001(int3, v_createRequest, -)); //Container + var template PrimitiveContent v_contentResponse; + + v_contentResponse.cSEBase := mw_contentCSEBase_rc1; + v_contentResponse.cSEBase.cseType := ?; + + v_ae1.start(f_CSE_REG_RET_002(v_contentResponse)); v_ae1.done; - - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.container.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); - } - } - } - - testcase TC_CSE_DMR_CRE_001_CNT_AE() runs on Tester system CseSystem { - // Local variables - var template RequestPrimitive v_createRequest := m_createContainerBase; - var ResponsePrimitive v_responsePrimitive; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_createRequest.primitiveContent.container.resourceName := omit; - v_ae1.start(f_CSE_DMR_CRE_001(int3, v_createRequest, m_createAeAux(omit,omit)));//Container - v_ae1.done; - - - - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.container.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); - } - } - - } - testcase TC_CSE_DMR_CRE_001_CNT_CNT() runs on Tester system CseSystem { - // Local variables - var template RequestPrimitive v_createRequest := m_createContainerBase; - var ResponsePrimitive v_responsePrimitive; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_createRequest.primitiveContent.container.resourceName := omit; + testcase TC_CSE_REG_RET_002_NL() runs on Tester system CseSystem { + //Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template PrimitiveContent v_contentResponse; + + v_contentResponse.cSEBase := mw_contentCSEBase_rc1; + v_contentResponse.cSEBase.nodeLink := ?; + + v_ae1.start(f_CSE_REG_RET_002(v_contentResponse)); + v_ae1.done; + } + + function f_CSE_REG_RET_002(template PrimitiveContent p_contentResponse) runs on AeSimu { + //Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + + // Test control - v_ae1.start(f_CSE_DMR_CRE_001(int3, v_createRequest, m_createContainerBase));//Container - v_ae1.done; - + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.container.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); - } - } + mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(v_aeIndex)))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Response OK for retrieving for attribute"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } - } + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + } //end f_CSE_REG_RET_002 - testcase TC_CSE_DMR_CRE_001_GRP_CB() runs on Tester system CseSystem { - // Local variables - var template RequestPrimitive v_createRequest := m_createGroupBase; - var ResponsePrimitive v_responsePrimitive; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_createRequest.primitiveContent.group_.resourceName := omit; + } //end g_CSE_REG_RET_002 + + /** + * @desc Check that the IUT accepts a retrieval request of <AE> resource with attributes multiplicity equals to 1 + * + */ + + testcase TC_CSE_REG_RET_003() runs on AeSimu system CseSystem { + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var template PrimitiveContent v_contentResponse; + + // Test control - v_ae1.start(f_CSE_DMR_CRE_001(int9, v_createRequest, -));//Group - v_ae1.done; - - - - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.group_.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + // Test Body + v_contentResponse.aE := mw_contentAeBase; + + mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(v_aeIndex))));//TODO Maybe PX_SUPER_AE_ID + + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Response OK for retrieving"); } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); } - - } - - testcase TC_CSE_DMR_CRE_001_GRP_AE() runs on Tester system CseSystem { - // Local variables - var template RequestPrimitive v_createRequest := m_createGroupBase; - var ResponsePrimitive v_responsePrimitive; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_createRequest.primitiveContent.group_.resourceName := omit; - - v_ae1.start(f_CSE_DMR_CRE_001(int9, v_createRequest, m_createAeAux(omit,omit)));//Group - v_ae1.done; - - - - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.group_.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); - } - } - + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end TC_CSE_REG_RET_003 + + /** + * @desc Check that the IUT accepts a retrieval request of <AE> resource with optional ATTRIBUTE + * + */ + + group g_CSE_REG_RET_004 { - testcase TC_CSE_DMR_CRE_001_ACP_CB() runs on Tester system CseSystem { + testcase TC_CSE_REG_RET_004_LBL() runs on Tester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createAcpBase; - var ResponsePrimitive v_responsePrimitive; + var Labels v_labels_1 := {"VALUE_1"}; + var template RequestPrimitive v_createRequest := m_createAe(PX_APP_ID); var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template PrimitiveContent v_contentResponse; - v_createRequest.primitiveContent.accessControlPolicy.resourceName := omit; - - v_ae1.start(f_CSE_DMR_CRE_001(int1, v_createRequest, -));//AccessControlPolicy + v_createRequest.primitiveContent.aE.labels := v_labels_1; + + v_contentResponse.aE := mw_contentAeBase; + v_contentResponse.aE.labels := ?; + + v_ae1.start(f_CSE_REG_RET_004(v_createRequest, v_contentResponse)); v_ae1.done; - + } + + testcase TC_CSE_REG_RET_004_APN() runs on Tester system CseSystem { + //Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createAe(PX_APP_ID); + var template PrimitiveContent v_contentResponse; - - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.accessControlPolicy.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); - } - } - + v_createRequest.primitiveContent.aE.appName := "AeAppName"; + + v_contentResponse.aE := mw_contentAeBase; + v_contentResponse.aE.appName := ?; + + v_ae1.start(f_CSE_REG_RET_004(v_createRequest,v_contentResponse)); + v_ae1.done; } - testcase TC_CSE_DMR_CRE_001_ACP_AE() runs on Tester system CseSystem { - // Local variables - var template RequestPrimitive v_createRequest := m_createAcpBase; - var ResponsePrimitive v_responsePrimitive; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_createRequest.primitiveContent.accessControlPolicy.resourceName := omit; + testcase TC_CSE_REG_RET_004_POA() runs on Tester system CseSystem { + //Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createAe(PX_APP_ID); + var template PrimitiveContent v_contentResponse; + + v_createRequest.primitiveContent.aE.pointOfAccess := {PX_AE1_ADDRESS}; - v_ae1.start(f_CSE_DMR_CRE_001(int1, v_createRequest, m_createAeAux(omit,omit)));//AccessControlPolicy - v_ae1.done; - + v_contentResponse.aE := mw_contentAeBase; + v_contentResponse.aE.pointOfAccess := ?; + + v_ae1.start(f_CSE_REG_RET_004(v_createRequest, v_contentResponse)); + v_ae1.done; + } + + testcase TC_CSE_REG_RET_004_NL() runs on Tester system CseSystem { + //Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createAe(PX_APP_ID); + var template PrimitiveContent v_contentResponse; - - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.accessControlPolicy.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + v_createRequest.primitiveContent.aE.nodeLink := "http://127.0.0.1/"; + + v_contentResponse.aE := mw_contentAeBase; + v_contentResponse.aE.nodeLink := ?; + + v_ae1.start(f_CSE_REG_RET_004(v_createRequest,v_contentResponse)); + v_ae1.done; + } + + testcase TC_CSE_REG_RET_004_CSZ() runs on Tester system CseSystem { + //Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createAe(PX_APP_ID); + var template PrimitiveContent v_contentResponse; + + v_createRequest.primitiveContent.aE.contentSerialization := {applicationxml}; + + v_contentResponse.aE := mw_contentAeBase; + v_contentResponse.aE.contentSerialization := ?; + + v_ae1.start(f_CSE_REG_RET_004(v_createRequest,v_contentResponse)); + v_ae1.done; + } + + function f_CSE_REG_RET_004(template RequestPrimitive p_createRequestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu { + //Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_createResource(int2, p_createRequestPrimitive, -1); + + mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(v_aeIndex))));//TODO Maybe PX_SUPER_AE_ID + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Response OK for retrieving for attribute"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + } //end f_CSE_REG_RET_004 + + } //end g_CSE_REG_RET_004 + + /** + * @desc Check that the IUT accepts a retrieval request of <CSEBase> resource including the cseType attribute + * + */ + testcase TC_CSE_REG_RET_005() runs on AeSimu system CseSystem { + + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var template PrimitiveContent v_contentResponse; + + // Test control + if(not(PICS_IN_CSE)) { + setverdict(inconc, __SCOPE__ & ": IUT shall be IN-CSE to run this test case"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + // Test Body + v_contentResponse.cSEBase := mw_contentCSEBase_rc1; + v_contentResponse.cSEBase.cseType := int1; + + mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(v_aeIndex))));//TODO Maybe PX_SUPER_AE_ID + + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": cseType attribute is set to 1 (IN_CSE)"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end TC_CSE_REG_RET_BV_005 + + /** + * @desc Check that the IUT accepts a retrieval request of <remoteCSE> resource + * + */ + testcase TC_CSE_REG_RET_006() runs on CseSimu system CseSystem { + //Local variables + //Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var ResourceType v_resourceType := int16; //remoteCSE + var template PrimitiveContent v_contentResponse; + + // Test control + + // Test component configuration + f_cf04Up(); + + // Test adapter configuration + + // Preamble + if(PICS_IN_CSE){ + vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase); + + v_contentResponse.remoteCSE := mw_contentRemoteCSEBase; + + mccPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(vc_remoteCseIndex)))); + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Response OK for retrieving"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } + + } else if (PICS_MN_CSE) { + vc_remoteCseIndex := f_cse_registrationRemoteCse(m_createRemoteCSEBase); + + v_contentResponse.remoteCSE := mw_contentRemoteCSEBase; + + mccPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(vc_remoteCseIndex)))); + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Response OK for retrieving"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } + } + + // Postamble + f_cse_postamble_deleteResourcesCSE(); + + // Tear down + f_cf04Down(); + + }//end TC_CSE_REG_RET_006 + + /** + * @desc Check that the IUT accepts an retrieval request of <remoteCSE> resource with optional ATTRIBUTE + * + */ + group g_CSE_REG_RET_007 { + + testcase TC_CSE_REG_RET_007_LBL() runs on Tester system CseSystem { + // Local variables + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + var Labels v_labels_1 := {"VALUE_1"}; + var template RequestPrimitive v_createRequest := m_createRemoteCSEBase; + var template PrimitiveContent v_contentResponse; + + v_createRequest.primitiveContent.remoteCSE.labels := v_labels_1; + + v_contentResponse.remoteCSE := mw_contentRemoteCSEBase; + v_contentResponse.remoteCSE.labels := ?; + + v_cse1.start(f_CSE_REG_RET_007(v_createRequest, v_contentResponse)); + v_cse1.done; + } + + testcase TC_CSE_REG_RET_007_CST() runs on Tester system CseSystem { + // Local variables + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + var template RequestPrimitive v_createRequest := m_createRemoteCSEBase; + var template PrimitiveContent v_contentResponse; + + v_createRequest.primitiveContent.remoteCSE.cseType := int1; + + v_contentResponse.remoteCSE := mw_contentRemoteCSEBase; + v_contentResponse.remoteCSE.cseType := ?; + + v_cse1.start(f_CSE_REG_RET_007(v_createRequest, v_contentResponse)); + v_cse1.done; + } + + testcase TC_CSE_REG_RET_007_POA() runs on Tester system CseSystem { + // Local variables + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + var template RequestPrimitive v_createRequest := m_createRemoteCSEBase; + var template PrimitiveContent v_contentResponse; + + v_createRequest.primitiveContent.remoteCSE.pointOfAccess := {"http://" & PX_CSE1_ADDRESS & "/"}; + + v_contentResponse.remoteCSE := mw_contentRemoteCSEBase; + v_contentResponse.remoteCSE.pointOfAccess := ?; + + v_cse1.start(f_CSE_REG_RET_007(v_createRequest, v_contentResponse)); + v_cse1.done; + } + + testcase TC_CSE_REG_RET_007_NL() runs on Tester system CseSystem { + // Local variables + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + var template RequestPrimitive v_createRequest := m_createRemoteCSEBase; + var template PrimitiveContent v_contentResponse; + + v_createRequest.primitiveContent.remoteCSE.nodeLink := c_defaultNodeID; + + v_contentResponse.remoteCSE := mw_contentRemoteCSEBase; + v_contentResponse.remoteCSE.nodeLink := ?; + + v_cse1.start(f_CSE_REG_RET_007(v_createRequest, v_contentResponse)); + v_cse1.done; + } + + function f_CSE_REG_RET_007(template RequestPrimitive p_createRequestPrimitive, template PrimitiveContent p_contentResponse) runs on CseSimu { + var MsgIn v_response; + var RequestPrimitive v_request; + var ResourceType v_resourceType := int16; //remoteCSE + var template PrimitiveContent v_contentResponse; + + // Test control + + // Test component configuration + f_cf04Up(); + + // Test adapter configuration + + // Preamble + if(PICS_IN_CSE){ + vc_remoteCseIndex := f_cse_registerRemoteCse(p_createRequestPrimitive); + mccPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(vc_remoteCseIndex)))); + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Response OK for retrieving for attribute"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } + } else if (PICS_MN_CSE){ + vc_remoteCseIndex := f_cse_registrationRemoteCse(p_createRequestPrimitive); + mccPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(vc_remoteCseIndex)))); + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Response OK for retrieving for attribute"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } + } + + //Postamble + f_cse_postamble_deleteResourcesCSE(); + + // Tear down + f_cf04Down(); + } // f_CSE_REG_RET_007 + + } //end g_CSE_REG_RET_007 + + /** + * @desc Check that the IUT accepts a retrieval request of <CSEBase> resource and responds with supportedResourceTypes attribute containing a list of the supported resources and pointOfAccess containing the list of physical addresses to be used by Registree to connect to this CSE (e.g. IP address, FQDN). + * + */ + testcase TC_CSE_REG_RET_008() runs on AeSimu system CseSystem { + + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var template PrimitiveContent v_contentResponse; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + // Test Body + v_contentResponse.cSEBase := mw_contentCSEBase_rc1; + + mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(v_aeIndex))));//TODO Maybe PX_SUPER_AE_ID + + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response { + tc_ac.stop; + + if (v_response.primitive.responsePrimitive.primitiveContent.cSEBase.supportedResourceType == PX_SRT) { + setverdict(pass, __SCOPE__ & ": supportedResourceTypes attribute is set according to PX_SRT"); + }else{ + setverdict(fail, __SCOPE__ & ": supportedResourceTypes attribute is not set according to PX_SRT"); + } + + if (v_response.primitive.responsePrimitive.primitiveContent.cSEBase.pointOfAccess==PX_POA){ + setverdict(pass, __SCOPE__ & ": supportedResourceTypes attribute is set according to PX_POA"); + }else{ + setverdict(fail, __SCOPE__ & ": supportedResourceTypes attribute is not set according to PX_POA"); + } + + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end TC_CSE_REG_RET_008 + + /** + * @desc Check that the IUT sends a <remoteCSE> retrieve request on TARGET_REMOTE_CSE_ADDRESS + * + */ + testcase TC_CSE_REG_RET_009() runs on CseSimu system CseSystem { + //Local variables + //Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var ResourceType v_resourceType := int16; //remoteCSE + var template PrimitiveContent v_contentResponse; + var template UtTriggerPrimitive v_utRequest; + var charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request containing To set to " & PX_CSE1_ADDRESS; + + // Test control + if(not(PICS_MN_CSE)) { + setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE to run this test case"); + stop; + } + + // Test component configuration + f_cf04Up(); + + // Test adapter configuration + + // Preamble + vc_remoteCseIndex := f_cse_registrationRemoteCse(m_createRemoteCSEBase); + + //Send Trigger Message + v_utRequest := m_utRetrieveResource(f_getLocalResourceAddress(vc_remoteCseIndex), PX_CSE_ID); + v_utRequest.from_ := "UNINITIALIZED"; + f_sendUtPrimitive(v_utRequest, v_action); + + tc_ac.start; + alt { + [] mccPortIn.receive(mw_request(mw_retrieveResource(f_getResourceAddress()))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Retrieve Request received successfully"); + } + [] mccPortIn.receive { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error Retrieve request was not received"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while waiting to receive Retrieve request"); + } + } + // Postamble + f_cse_postamble_deleteResourcesCSE(); + + // Tear down + f_cf04Down(); + + }//end TC_CSE_REG_RET_009 + + /** + * @desc Check that IUT accepts a <remoteCSE> retrieve request + * + */ + testcase TC_CSE_REG_RET_010() runs on CseSimu system CseSystem { + //Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var ResourceType v_resourceType := int16; //remoteCSE + var template PrimitiveContent v_contentResponse; + var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE; + + // Test control + + // Test component configuration + f_cf04Up(); + + // Test adapter configuration + + // Preamble + vc_remoteCseIndex := f_cse_registrationRemoteCse(m_createRemoteCSEBase); + + v_contentResponse.remoteCSE := mw_contentRemoteCSEBase; + + mccPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(vc_remoteCseIndex)))); + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Response OK for retrieving"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } + // Postamble + f_cse_postamble_deleteResourcesCSE(); + + // Tear down + f_cf04Down(); + + }//end TC_CSE_REG_RET_010 + + }//end group Retrieve + + group Update{ + + /** + * @desc Check that the IUT rejects the update request of <CSEBase> resource. + * + */ + testcase TC_CSE_REG_UPD_001() runs on AeSimu system CseSystem { + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var Labels v_labels_1 := {"VALUE_1"}; + var template RequestPrimitive v_updateRequest := m_updateCSEBaseBase; + const integer c_cseBaseIndex := -1; + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + // Test Body + v_updateRequest.primitiveContent.cSEBase.labels := v_labels_1; + v_request := f_getUpdateRequestPrimitive(int5, c_cseBaseIndex, v_updateRequest); + + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": CSEBase update rejected."); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int4005))) -> value v_response{ + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while updating CSEBase with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating CSEBase"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }; //end TC_CSE_REG_UPD_BI_001 + + /** + * @desc Check that the IUT accepts an update request of <remoteCSE> resource with OPTIONAL_ATTRIBUTE. + * + */ + + group g_CSE_REG_UPD_002 { + + testcase TC_CSE_REG_UPD_002_ET() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + + v_updateRequest.primitiveContent.remoteCSE.expirationTime := "20301231T012345"; + + v_cse1.start(f_CSE_REG_UPD_002(v_updateRequest)); + v_cse1.done; + + } + + testcase TC_CSE_REG_UPD_002_LBL() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + + v_updateRequest.primitiveContent.remoteCSE.labels := {"MyLabel"}; + + v_cse1.start(f_CSE_REG_UPD_002(v_updateRequest)); + v_cse1.done; + + } + + testcase TC_CSE_REG_UPD_002_POA() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + + v_updateRequest.primitiveContent.remoteCSE.pointOfAccess := {"http://" & PX_CSE1_ADDRESS & "/"}; + + v_cse1.start(f_CSE_REG_UPD_002(v_updateRequest)); + v_cse1.done; + + } + + testcase TC_CSE_REG_UPD_002_NL() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + + v_updateRequest.primitiveContent.remoteCSE.nodeLink := c_defaultNodeID; + + v_cse1.start(f_CSE_REG_UPD_002(v_updateRequest)); + v_cse1.done; + + } + + testcase TC_CSE_REG_UPD_002_RR() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + + v_updateRequest.primitiveContent.remoteCSE.requestReachability := true; + + v_cse1.start(f_CSE_REG_UPD_002(v_updateRequest)); + v_cse1.done; + + } + + function f_CSE_REG_UPD_002(template RequestPrimitive p_requestPrimitive) runs on CseSimu { + //Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var ResourceType v_resourceType := int16; //remoteCSE + // Test control + + // Test component configuration + f_cf04Up(); + + // Test adapter configuration + + // Preamble + vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase); + + // Test Body + v_request := f_getUpdateRequestPrimitive(int16, vc_remoteCseIndex, p_requestPrimitive); + + mccPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitive(int2004, f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Accepted updation for resource type remoteCSE containing attribute "); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveOK(f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Accepted updation for resource type remoteCSE without containing attribute "); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Rejected updation of resource type remoteCSE containing attribute"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource type remoteCSE"); + } + } + + // Postamble + f_cse_postamble_deleteResourcesCSE(); + + // Tear down + f_cf04Down(); + + }//end f_CSE_REG_UPD_002 + } //end g_CSE_REG_UPD_002 + + /** + * @desc Check that IUT sends a <remoteCSE> update request with OPTIONAL_ATTRIBUTE attribute. + * + */ + group g_CSE_REG_UPD_003 { + + testcase TC_CSE_REG_UPD_003_ET() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; + var AttributeList c_optionalAttribute; + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + + v_updateRequest.primitiveContent.remoteCSE.expirationTime := "20301231T012345"; + c_optionalAttribute := {"expirationTime"}; + + v_cse1.start(f_CSE_REG_UPD_003(v_updateRequest, c_optionalAttribute)); + v_cse1.done; + + } + + testcase TC_CSE_REG_UPD_003_LBL() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; + var AttributeList c_optionalAttribute; + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + + v_updateRequest.primitiveContent.remoteCSE.labels := {"MyLabel"}; + c_optionalAttribute := {"labels"}; + + v_cse1.start(f_CSE_REG_UPD_003(v_updateRequest, c_optionalAttribute)); + v_cse1.done; + + } + + testcase TC_CSE_REG_UPD_003_POA() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; + var AttributeList c_optionalAttribute; + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + + v_updateRequest.primitiveContent.remoteCSE.pointOfAccess := {"http://" & PX_CSE1_ADDRESS & "/"}; + c_optionalAttribute := {"pointofAccess"}; + + v_cse1.start(f_CSE_REG_UPD_003(v_updateRequest, c_optionalAttribute)); + v_cse1.done; + + } + + testcase TC_CSE_REG_UPD_003_NL() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; + var AttributeList c_optionalAttribute; + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + + v_updateRequest.primitiveContent.remoteCSE.nodeLink := c_defaultNodeID; + c_optionalAttribute := {"nodeLink"}; + + v_cse1.start(f_CSE_REG_UPD_003(v_updateRequest, c_optionalAttribute)); + v_cse1.done; + + } + + testcase TC_CSE_REG_UPD_003_RR() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; + var AttributeList c_optionalAttribute; + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + + v_updateRequest.primitiveContent.remoteCSE.requestReachability := true; + c_optionalAttribute := {"requestReachability"}; + + v_cse1.start(f_CSE_REG_UPD_003(v_updateRequest, c_optionalAttribute)); + v_cse1.done; + + } + + function f_CSE_REG_UPD_003(template RequestPrimitive p_requestPrimitive, in AttributeList p_attribute) runs on CseSimu { + // Local variables + //Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var ResourceType v_resourceType := int16; //remoteCSE + var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE; + var charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request containing To set to " & PX_CSE1_ADDRESS & " and Content containing remoteCSE resource containing a valid attribute " & p_attribute[0]; // Test control + if(not(PICS_MN_CSE)) { + setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE to run this test case"); + stop; + } + + // Test component configuration + f_cf04Up(); + + // Test adapter configuration + + // Preamble + vc_remoteCseIndex := f_cse_registrationRemoteCse(m_createRemoteCSEBase); + + //Send Trigger Message + v_utRequest.to_ := f_getResourceAddress(); + v_utRequest.from_ := "UNINITIALIZED"; + f_sendUtPrimitive(v_utRequest, v_action); + + // Test Body + v_request := f_getUpdateRequestPrimitive(int16, vc_remoteCseIndex, p_requestPrimitive); + + tc_ac.start; + alt { + [] mccPortIn.receive(mw_request(v_request)) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Received request for updation for resource type remoteCSE containing attribute " & p_attribute[0]); + f_setResource(v_request.primitiveContent,int16); + } + [] mccPortIn.receive { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error: Did not receive update request for resource type remoteCSE"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource type remoteCSE"); + } + } + + // Postamble + f_cse_postamble_deleteResourcesCSE(); + + // Tear down + f_cf04Down(); + + }//end f_CSE_REG_UPD_003 + } //end g_CSE_REG_UPD_003 + + }// end group Update + + group Delete{ + + /** + * @desc Check that the IUT rejects the delete request of <CSEBase> resource. + * + */ + testcase TC_CSE_REG_DEL_001() runs on AeSimu system CseSystem { + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + // Test Body + v_request := valueof(m_delete(f_getResourceAddress(), f_getOriginator())); + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": CSEBase deletion rejected."); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int4005))) -> value v_response{ + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while deleting CSEBase with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while deleting CSEBase"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end TC_CSE_REG_DEL_001 + + /** + * @desc Check that IUT accepts a <remoteCSE> delete request on TARGET_REMOTE_CSE_ADDRESS, and deletes the <remoteCSE> resource + * + */ + testcase TC_CSE_REG_DEL_002() runs on CseSimu system CseSystem { + //Local variables + var RequestPrimitive v_request; + // Test control + + // Test component configuration + f_cf04Up(); + + // Test adapter configuration + + // Preamble + vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE); + + // Test Body + v_request := valueof(m_delete(f_getResourceAddress(vc_remoteCseIndex), f_getOriginator(vc_remoteCseIndex))); + + mccPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitive(int2002))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Deletion of <remoteCSE> resource has been accepted"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while deleting <remoteCSE> resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while deleting resource"); + } + } + +// Check if the resource has been deleted or not + if(f_cse_isResourcePresent(vc_remoteCseIndex)) { + setverdict(fail, __SCOPE__ & ":INFO: Resource not deleted"); + } else { + setverdict(pass, __SCOPE__ & ":INFO: Resource deleted"); + } + + // Postamble + f_cse_postamble_deleteResourcesCSE(); + + // Tear down + f_cf04Down(); + + }//end TC_CSE_REG_DEL_002 + + /** + * @desc Check that the IUT accepts an AE de-registration + * + */ + testcase TC_CSE_REG_DEL_003() runs on AeSimu system CseSystem { + //Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + // Test Body + v_request := valueof(m_delete(f_getResourceAddress(v_aeIndex), f_getOriginator(v_aeIndex))); + + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": AE has been de-registered successfully"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while de-registering AE"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while de-registering AE"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end TC_CSE_REG_DEL_003 + + /** + * @desc Check that IUT sends a <remoteCSE> delete request on TARGET_REMOTE_CSE_ADDRESS + * + */ + testcase TC_CSE_REG_DEL_004() runs on CseSimu system CseSystem { + //Local variables + var template UtTriggerPrimitive v_utRequest := m_utDeleteRequest; + var UtTriggerAckPrimitive v_trigger_response; + var integer v_auxInteger; + var charstring v_action := __SCOPE__ & ": Please, send a valid DELETE Request containing To set to " & PX_CSE1_ADDRESS; + + //Test control + if(not(PICS_MN_CSE)) { + setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE to run this test case"); + stop; + } + + // Test component configuration + f_cf04Up(); + + // Test adapter configuration + + // Preamble + vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE); + + //Send Trigger Message + v_auxInteger := f_setResource(valueof(m_primitiveContentRemoteCSE(m_contentCreateRemoteCSE(omit,omit,omit,omit))), int16); + v_utRequest.to_ := f_getResourceAddress(v_auxInteger); + v_utRequest.from_ := "UNINITIALIZED"; + f_sendUtPrimitive(v_utRequest, v_action); + + // Test Body + tc_ac.start; + alt { + [] mccPortIn.receive(mw_request(mw_deleteRequest( f_getResourceAddress(vc_remoteCseIndex), PX_CSE_ID))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": <remoteCSE> delete request has been received"); + } + [] mccPortIn.receive { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while receiving <remoteCSE> delete request"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while receiving <remoteCSE> delete request"); + } + } + + // Postamble + f_cse_postamble_deleteResourcesCSE(); + + // Tear down + f_cf04Down(); + + }//end TC_CSE_REG_DEL_004 + + }// end group Delete + + }//end Registration + + group Data_Management_and_Repository { + + group Create { + + group g_CSE_DMR_CRE_001 { + + /** + * @desc Check that the IUT accepts the creation of a RESOURCE_TYPE resource on the TARGET_RESOURCE_ADDRESS of type PARENT_RESOURCE_TYPE with resource name not provided + * + */ + testcase TC_CSE_DMR_CRE_001_CNT_CB() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createContainerBase; + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_createRequest.primitiveContent.container.resourceName := omit; + v_ae1.start(f_CSE_DMR_CRE_001(int3, v_createRequest, -)); //Container + v_ae1.done; + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.container.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } + } + + } + + testcase TC_CSE_DMR_CRE_001_CNT_AE() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createContainerBase; + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_createRequest.primitiveContent.container.resourceName := omit; + v_ae1.start(f_CSE_DMR_CRE_001(int3, v_createRequest, m_createAeAux(omit,omit)));//Container + v_ae1.done; + + + + if(getverdict == pass){ + v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.container.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } + } + + } + + testcase TC_CSE_DMR_CRE_001_CNT_CNT() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createContainerBase; + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_createRequest.primitiveContent.container.resourceName := omit; + + v_ae1.start(f_CSE_DMR_CRE_001(int3, v_createRequest, m_createContainerBase));//Container + v_ae1.done; + + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.container.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } + } + + } + + testcase TC_CSE_DMR_CRE_001_GRP_CB() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createGroupBase; + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_createRequest.primitiveContent.group_.resourceName := omit; + + v_ae1.start(f_CSE_DMR_CRE_001(int9, v_createRequest, -));//Group + v_ae1.done; + + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.group_.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } + } + + } + + testcase TC_CSE_DMR_CRE_001_GRP_AE() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createGroupBase; + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_createRequest.primitiveContent.group_.resourceName := omit; + + v_ae1.start(f_CSE_DMR_CRE_001(int9, v_createRequest, m_createAeAux(omit,omit)));//Group + v_ae1.done; + + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.group_.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } + } + + } + + testcase TC_CSE_DMR_CRE_001_ACP_CB() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createAcpBase; + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_createRequest.primitiveContent.accessControlPolicy.resourceName := omit; + + v_ae1.start(f_CSE_DMR_CRE_001(int1, v_createRequest, -));//AccessControlPolicy + v_ae1.done; + + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.accessControlPolicy.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } + } + + } + + testcase TC_CSE_DMR_CRE_001_ACP_AE() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createAcpBase; + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_createRequest.primitiveContent.accessControlPolicy.resourceName := omit; + + v_ae1.start(f_CSE_DMR_CRE_001(int1, v_createRequest, m_createAeAux(omit,omit)));//AccessControlPolicy + v_ae1.done; + + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.accessControlPolicy.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } + } + + } + + testcase TC_CSE_DMR_CRE_001_SCH_CB() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createScheduleBase; + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_createRequest.primitiveContent.schedule.resourceName := omit; + v_ae1.start(f_CSE_DMR_CRE_001(int18, v_createRequest, -));//Schedule + v_ae1.done; + + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.schedule.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } + } + + } + + testcase TC_CSE_DMR_CRE_001_SCH_AE() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createScheduleBase; + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_createRequest.primitiveContent.schedule.resourceName := omit; + v_ae1.start(f_CSE_DMR_CRE_001(int18, v_createRequest, m_createAeAux(omit,omit)));//Schedule + v_ae1.done; + + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.schedule.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } + } + + } + + testcase TC_CSE_DMR_CRE_001_SCH_SUB() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createScheduleBase; + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_createRequest.primitiveContent.schedule.resourceName := omit; + v_ae1.start(f_CSE_DMR_CRE_001(int18, v_createRequest, m_createSubscriptionBase));//Schedule + v_ae1.done; + + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.schedule.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } + } + + } + + testcase TC_CSE_DMR_CRE_001_PCH_AE() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createPollingChannelBase; + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + + v_createRequest.primitiveContent.pollingChannel.resourceName := omit; + + v_ae1.start(f_CSE_DMR_CRE_001(int15, v_createRequest, m_createAeAux(omit,omit)));//PollingChannel + v_ae1.done; + + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.pollingChannel.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } + } + + } + + testcase TC_CSE_DMR_CRE_001_SUB_CB() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createSubscriptionBase; + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_createRequest.primitiveContent.subscription.resourceName := omit; + v_ae1.start(f_CSE_DMR_CRE_001(int23, v_createRequest, -));//Subscription + v_ae1.done; + + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.subscription.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } + } + + } + + testcase TC_CSE_DMR_CRE_001_SUB_AE() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createSubscriptionBase; + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_createRequest.primitiveContent.subscription.resourceName := omit; + v_ae1.start(f_CSE_DMR_CRE_001(int23, v_createRequest, m_createAeAux(omit,omit)));//Subscription + v_ae1.done; + + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.subscription.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } + } + + } + + testcase TC_CSE_DMR_CRE_001_SUB_CNT() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createSubscriptionBase; + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_createRequest.primitiveContent.subscription.resourceName := omit; + v_ae1.start(f_CSE_DMR_CRE_001(int23, v_createRequest, m_createContainerBase));//Subscription + v_ae1.done; + + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.subscription.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } + } + + } + + testcase TC_CSE_DMR_CRE_001_SUB_ACP() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createSubscriptionBase; + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_createRequest.primitiveContent.subscription.resourceName := omit; + v_ae1.start(f_CSE_DMR_CRE_001(int23, v_createRequest, m_createAcpBase));//Subscription + v_ae1.done; + + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.subscription.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } + } + } + + testcase TC_CSE_DMR_CRE_001_SUB_SCH() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createSubscriptionBase; + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_createRequest.primitiveContent.subscription.resourceName := omit; + v_ae1.start(f_CSE_DMR_CRE_001(int23, v_createRequest, m_createScheduleBase));//Subscription + v_ae1.done; + + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.subscription.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } + } + } + + testcase TC_CSE_DMR_CRE_001_SUB_GRP() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createSubscriptionBase; + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_createRequest.primitiveContent.subscription.resourceName := omit; + v_ae1.start(f_CSE_DMR_CRE_001(int23, v_createRequest, m_createGroupBase));//Subscription + v_ae1.done; + + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.subscription.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } + } + } + + testcase TC_CSE_DMR_CRE_001_SUB_CSR() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createSubscriptionBase; + var ResponsePrimitive v_responsePrimitive; + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + + v_createRequest.primitiveContent.subscription.resourceName := omit; + v_cse1.start(f_CSE_DMR_CRE_001_cseSimu(int23, v_createRequest));//Subscription + v_cse1.done; + + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_cse1); + if(not ispresent(v_responsePrimitive.primitiveContent.subscription.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } + } + } + + testcase TC_CSE_DMR_CRE_001_NOD_CB() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createNodeBase; + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_createRequest.primitiveContent.node.resourceName := omit; + + v_ae1.start(f_CSE_DMR_CRE_001(int14, v_createRequest, -));//Node + v_ae1.done; + + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.node.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } + } + + } + + testcase TC_CSE_DMR_CRE_001_MGC_CB() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createMgmtCmdBase; + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_createRequest.primitiveContent.mgmtResource.resourceName := omit; + v_ae1.start(f_CSE_DMR_CRE_001(int12, v_createRequest, -));//Management Command + v_ae1.done; + + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.mgmtResource.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } + } + + } + + testcase TC_CSE_DMR_CRE_001_LCP_CB() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createLocationPolicyBase; + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_createRequest.primitiveContent.locationPolicy.resourceName := omit; + v_ae1.start(f_CSE_DMR_CRE_001(int10, v_createRequest, -));//Location Policy + v_ae1.done; + + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.locationPolicy.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } + } + + } + + testcase TC_CSE_DMR_CRE_001_STCG_CB() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createStatsConfigBase; + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_createRequest.primitiveContent.statsConfig.resourceName := omit; + v_ae1.start(f_CSE_DMR_CRE_001(int22, v_createRequest, -));//Stats Config + v_ae1.done; + + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.statsConfig.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } + } + } + + testcase TC_CSE_DMR_CRE_001_STCL_CB() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createStatsCollectBase; + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_createRequest.primitiveContent.statsCollect.resourceName := omit; + + v_ae1.start(f_CSE_DMR_CRE_001(int21, v_createRequest, -));//Stats Collect + v_ae1.done; + + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.statsCollect.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } + } + + } + + testcase TC_CSE_DMR_CRE_001_MSSP_CB() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createM2mServiceSubscriptionProfileBase; + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_createRequest.primitiveContent.m2mServiceSubscriptionProfile.resourceName := omit; + v_ae1.start(f_CSE_DMR_CRE_001(int11, v_createRequest, -));//Subscription Profile + v_ae1.done; + + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.m2mServiceSubscriptionProfile.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); } } + } + + testcase TC_CSE_DMR_CRE_001_ASAR_CB() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createServiceSubscribedAppRuleBase; + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_createRequest.primitiveContent.serviceSubscribedAppRule.resourceName := omit; + v_ae1.start(f_CSE_DMR_CRE_001(int19, v_createRequest, -));//Service Subscribed App + v_ae1.done; + + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.serviceSubscribedAppRule.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } } - - testcase TC_CSE_DMR_CRE_001_SCH_CB() runs on Tester system CseSystem { + + } + + testcase TC_CSE_DMR_CRE_001_CIN_CNT() runs on Tester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createScheduleBase; + var template RequestPrimitive v_createRequest := m_createContentInstanceBase; var ResponsePrimitive v_responsePrimitive; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - v_createRequest.primitiveContent.schedule.resourceName := omit; - v_ae1.start(f_CSE_DMR_CRE_001(int18, v_createRequest, -));//Schedule + v_createRequest.primitiveContent.contentInstance.resourceName := omit; + v_ae1.start(f_CSE_DMR_CRE_001(int4, v_createRequest, m_createContainerBase));//ContentInstance v_ae1.done; - + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.schedule.resourceName)){ + if(not ispresent(v_responsePrimitive.primitiveContent.contentInstance.resourceName)){ setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); } } - + } - testcase TC_CSE_DMR_CRE_001_SCH_AE() runs on Tester system CseSystem { + function f_CSE_DMR_CRE_001(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, in template (omit) RequestPrimitive p_parentRequestPrimitive := omit) runs on AeSimu return ResponsePrimitive { + + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_parentIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; + var integer v_acpAuxIndex := -1; + var PoaList v_poaList := {"http://" & PX_AE2_ADDRESS & "/"}; + + // Test control + + // Test component configuration + f_cf01Up(true); + + // Test adapter configuration + + // Preamble + + if(ispresent(p_parentRequestPrimitive)) { + if(match(int23, p_parentRequestPrimitive.resourceType)){ + vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", v_poaList), -1)); // AE2 is registred + vc_ae2.done; + v_ae2Index := f_getResource(vc_ae2); + p_parentRequestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_ae2Index)}; + vc_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler()); + } + if(ischosen(p_parentRequestPrimitive.primitiveContent.group_)){ + + f_cse_preamble_registerAe(); + + } + v_parentIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_parentIndex); + + + + } else {//Resource under CSEBase + + if(p_resourceType != int1) { + + v_acpAuxIndex := f_cse_createAccessControlPolicyAux(-, -, -); + + p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[v_acpAuxIndex].resource.accessControlPolicy.resourceID}); + } + + if(ischosen(p_requestPrimitive.primitiveContent.group_)){ + + f_cse_preamble_registerAe(); + + } + + } + + // Test Body + + if(match(int23, p_requestPrimitive.resourceType)){ + vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", v_poaList), -1)); // AE2 is registred + vc_ae2.done; + v_ae2Index := f_getResource(vc_ae2); + p_requestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_ae2Index)}; + vc_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler()); + } + + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); + + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfully"); + 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 vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(p_resourceType))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); + } + } + + f_checkAeSimuStatus(); + + //Check to see if the resource is present or not + if (f_isResourcePresent(v_resourceIndex)){ + setverdict(pass, __SCOPE__ & ":INFO: Resource created"); + } else { + setverdict(fail, __SCOPE__ & ":ERROR: Resource not created"); + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + return vc_response.primitive.responsePrimitive; + + }//end f_CSE_DMR_CRE_001 + + function f_CSE_DMR_CRE_001_cseSimu(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on CseSimu return ResponsePrimitive { + + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_parentIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae1Index := -1; + var integer v_acpAuxIndex := -1; + var PoaList v_poaList := {"http://" & PX_AE1_ADDRESS & "/"}; + + // Test control + + // Test component configuration + f_cf02UpCseSimuMaster(); + + // Test adapter configuration + + // Preamble + vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase); + + if(match(int23, p_resourceType)){ + vc_ae1.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE1_ID_STEM, "MyAe", v_poaList), -1)); // AE1 is registered + vc_ae1.done; + v_ae1Index := f_getResource(vc_ae1); + p_requestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_ae1Index)}; + vc_ae1.start(f_cse_notifyProcedure_subscriptionVerificationHandler()); + } + + // Test Body + + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, vc_remoteCseIndex); + + mccPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfully"); + f_checkAttributesToBeSaved(p_resourceType, v_request, vc_response.primitive.responsePrimitive); + v_resourceIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, p_resourceType, vc_remoteCseIndex); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(p_resourceType))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); + } + } + + f_checkCseSimuStatus(); + + //Check to see if the resource is present or not + if (f_isResourcePresentCseSimu(v_resourceIndex)){ + setverdict(pass, __SCOPE__ & ":INFO: Resource created"); + } else { + setverdict(fail, __SCOPE__ & ":ERROR: Resource not created"); + } + + // Postamble + f_cse_postamble_deleteResourcesCSE(); + + // Tear down + f_cf02DownCseSimuMaster(); + + return vc_response.primitive.responsePrimitive; + + }//end f_CSE_DMR_CRE_001_cseSimu + + } // end g_CSE_DMR_CRE_001 + + + group g_CSE_DMR_CRE_002 { + + /** + * @desc Check that the IUT accepts the creation of a RESOURCE_TYPE resource with a non-existing resource name provided by AE + * + */ + testcase TC_CSE_DMR_CRE_002_CNT() runs on Tester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createScheduleBase; var ResponsePrimitive v_responsePrimitive; var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DMR_CRE_002(int3, m_createContainerBase));//container + v_ae1.done; - v_createRequest.primitiveContent.schedule.resourceName := omit; - v_ae1.start(f_CSE_DMR_CRE_001(int18, v_createRequest, m_createAeAux(omit,omit)));//Schedule + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.container.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } else { + if(v_responsePrimitive.primitiveContent.container.resourceName != c_defaultContainerResourceName){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not correct"); + } + } + } + + } + + testcase TC_CSE_DMR_CRE_002_GRP() runs on Tester system CseSystem { + // Local variables + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DMR_CRE_002(int9, m_createGroupBase));//group v_ae1.done; - + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); + if(not ispresent(v_responsePrimitive.primitiveContent.group_.resourceName)){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } else { + if(v_responsePrimitive.primitiveContent.group_.resourceName != c_defaultGroupResourceName){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not correct"); + } + } + } + } + + testcase TC_CSE_DMR_CRE_002_ACP() runs on Tester system CseSystem { + // Local variables + var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DMR_CRE_002(int1, m_createAcpBase ));//accessControlPolicy + v_ae1.done; + + + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.schedule.resourceName)){ + if(not ispresent(v_responsePrimitive.primitiveContent.accessControlPolicy.resourceName)){ setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } else { + if(v_responsePrimitive.primitiveContent.accessControlPolicy.resourceName != c_defaultAccessControlPolicyResourceName){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not correct"); + } } } - } - - testcase TC_CSE_DMR_CRE_001_SCH_SUB() runs on Tester system CseSystem { + + testcase TC_CSE_DMR_CRE_002_SCH() runs on Tester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createScheduleBase; var ResponsePrimitive v_responsePrimitive; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_createRequest.primitiveContent.schedule.resourceName := omit; - v_ae1.start(f_CSE_DMR_CRE_001(int18, v_createRequest, m_createSubscriptionBase));//Schedule + + v_ae1.start(f_CSE_DMR_CRE_002(int18, m_createScheduleBase));//Schedule v_ae1.done; @@ -2194,21 +4621,19 @@ module OneM2M_Testcases_CSE { if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); if(not ispresent(v_responsePrimitive.primitiveContent.schedule.resourceName)){ setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } else { + if(v_responsePrimitive.primitiveContent.schedule.resourceName != c_defaultScheduleResourceName){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not correct"); + } } } - } - - testcase TC_CSE_DMR_CRE_001_PCH_AE() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_002_PCH() runs on Tester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createPollingChannelBase; var ResponsePrimitive v_responsePrimitive; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - - v_createRequest.primitiveContent.pollingChannel.resourceName := omit; - - v_ae1.start(f_CSE_DMR_CRE_001(int15, v_createRequest, m_createAeAux(omit,omit)));//PollingChannel + + v_ae1.start(f_CSE_DMR_CRE_002(int15, m_createPollingChannelBase));//Pollingchannel v_ae1.done; @@ -2216,1763 +4641,1649 @@ module OneM2M_Testcases_CSE { if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); if(not ispresent(v_responsePrimitive.primitiveContent.pollingChannel.resourceName)){ setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } else { + if(v_responsePrimitive.primitiveContent.pollingChannel.resourceName != c_defaultPollingChannelResourceName){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not correct"); + } } } - } - testcase TC_CSE_DMR_CRE_001_SUB_CB() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_002_SUB() runs on Tester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; var ResponsePrimitive v_responsePrimitive; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_createRequest.primitiveContent.subscription.resourceName := omit; - v_ae1.start(f_CSE_DMR_CRE_001(int23, v_createRequest, -));//Subscription + + v_ae1.start(f_CSE_DMR_CRE_002(int23, m_createSubscriptionBase));//Subscription v_ae1.done; - + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); if(not ispresent(v_responsePrimitive.primitiveContent.subscription.resourceName)){ setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } else { + if(v_responsePrimitive.primitiveContent.subscription.resourceName != c_defaultSubscriptionResourceName){ + setverdict(fail, __SCOPE__, ": Error, resourceName attribute not correct"); + } } } - } - testcase TC_CSE_DMR_CRE_001_SUB_AE() runs on Tester system CseSystem { + function f_CSE_DMR_CRE_002(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu return ResponsePrimitive{//system CseSystem { MRO system keyword not supported on functions in Titan + // Local variables - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var ResponsePrimitive v_responsePrimitive; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_resourceIndex := -1; + + // Test control + + // Test component configuration + f_cf01Up(true); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_createRequest.primitiveContent.subscription.resourceName := omit; - v_ae1.start(f_CSE_DMR_CRE_001(int23, v_createRequest, m_createAeAux(omit,omit)));//Subscription - v_ae1.done; + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + + // Test Body + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex); - - - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.subscription.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfully"); + 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 vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(p_resourceType))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); + } + } + + f_checkAeSimuStatus(); + + //Check to see if the resource is present or not + if(f_isResourcePresent(v_resourceIndex)){ + setverdict(pass, __SCOPE__ & ":INFO: Resource created"); + } else { + setverdict(fail, __SCOPE__ & ":ERROR: Resource not created"); + } + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + return vc_response.primitive.responsePrimitive; + + }//end f_CSE_DMR_CRE_002 + + + }// end group g_CSE_DMR_CRE_002 + + group g_CSE_DMR_CRE_003 { + + /** + * @desc Check that the IUT rejects the creation of a RESOURCE_TYPE resource with an existing resource name provided by AE + * + */ + testcase TC_CSE_DMR_CRE_003_CNT() runs on Tester system CseSystem { + // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DMR_CRE_003(int3, m_createContainerBase));//container + v_ae1.done; } + + testcase TC_CSE_DMR_CRE_003_GRP() runs on Tester system CseSystem { + // Local variables - testcase TC_CSE_DMR_CRE_001_SUB_CNT() runs on Tester system CseSystem { + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DMR_CRE_003(int9, m_createGroupBase));//group + v_ae1.done; + } + + testcase TC_CSE_DMR_CRE_003_ACP() runs on Tester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var ResponsePrimitive v_responsePrimitive; + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DMR_CRE_003(int1, m_createAcpBase));//accessControlPolicy + v_ae1.done; + } + + testcase TC_CSE_DMR_CRE_003_SCH() runs on Tester system CseSystem { + // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DMR_CRE_003(int18, m_createScheduleBase));//Schedule + v_ae1.done; + } + testcase TC_CSE_DMR_CRE_003_PCH() runs on Tester system CseSystem { + // Local variables + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DMR_CRE_003(int15, m_createPollingChannelBase));//Pollingchannel + v_ae1.done; + } + + testcase TC_CSE_DMR_CRE_003_SUB() runs on Tester system CseSystem { + // Local variables + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DMR_CRE_003(int23, m_createSubscriptionBase));//Subscription + v_ae1.done; + } + + + function f_CSE_DMR_CRE_003(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu {//system CseSystem { MRO system keyword not supported on functions in Titan + + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; + + // Test control + + // Test component configuration + f_cf01Up(true); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi) + + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); + + if(p_resourceType == int23){ + vc_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler()); + } + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex); + + // Test Body + v_request.requestIdentifier := "Existing resource"; + + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4105))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Resource already exists"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating an already existing resource"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Creating a resource that already exists"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end f_CSE_DMR_CRE_003 + + }// end group g_CSE_DMR_CRE_003 + + group g_CSE_DMR_CRE_004 { + + /** + * @desc Check that the IUT rejects the creation of a RESOURCE_TYPE resource when AE has no privileges + * + */ + testcase TC_CSE_DMR_CRE_004_CNT() runs on Tester system CseSystem { + // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_createRequest.primitiveContent.subscription.resourceName := omit; - v_ae1.start(f_CSE_DMR_CRE_001(int23, v_createRequest, m_createContainerBase));//Subscription + + v_ae1.start(f_CSE_DMR_CRE_004(int3, m_createContainerBase));//container v_ae1.done; + } + + testcase TC_CSE_DMR_CRE_004_GRP() runs on Tester system CseSystem { + // Local variables - - - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.subscription.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); - } - } + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + v_ae1.start(f_CSE_DMR_CRE_004(int9, m_createGroupBase));//group + v_ae1.done; } - testcase TC_CSE_DMR_CRE_001_SUB_ACP() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_004_ACP() runs on Tester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_createRequest.primitiveContent.subscription.resourceName := omit; - v_ae1.start(f_CSE_DMR_CRE_001(int23, v_createRequest, m_createAcpBase));//Subscription + + v_ae1.start(f_CSE_DMR_CRE_004(int1, m_createAcpBase));//accessControlPolicy v_ae1.done; - - - - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.subscription.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); - } - } } - - testcase TC_CSE_DMR_CRE_001_SUB_SCH() runs on Tester system CseSystem { + + testcase TC_CSE_DMR_CRE_004_SCH() runs on Tester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var ResponsePrimitive v_responsePrimitive; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - v_createRequest.primitiveContent.subscription.resourceName := omit; - v_ae1.start(f_CSE_DMR_CRE_001(int23, v_createRequest, m_createScheduleBase));//Subscription + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DMR_CRE_004(int18, m_createScheduleBase));//Schedule v_ae1.done; - - - - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.subscription.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); - } - } } - - testcase TC_CSE_DMR_CRE_001_SUB_GRP() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_004_PCH() runs on Tester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_createRequest.primitiveContent.subscription.resourceName := omit; - v_ae1.start(f_CSE_DMR_CRE_001(int23, v_createRequest, m_createGroupBase));//Subscription + + v_ae1.start(f_CSE_DMR_CRE_004(int15, m_createPollingChannelBase));//Pollingchannel v_ae1.done; - - - - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.subscription.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); - } - } } - testcase TC_CSE_DMR_CRE_001_NOD_CB() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_004_SUB() runs on Tester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createNodeBase; - var ResponsePrimitive v_responsePrimitive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_createRequest.primitiveContent.node.resourceName := omit; - v_ae1.start(f_CSE_DMR_CRE_001(int14, v_createRequest, -));//Node + v_ae1.start(f_CSE_DMR_CRE_004(int23, m_createSubscriptionBase));//Subscription v_ae1.done; - - + } + + + function f_CSE_DMR_CRE_004(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu {//system CseSystem { MRO system keyword not supported on functions in Titan + + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_acpAuxIndex := -1; + var integer v_aeIndex := -1; + + // Test control + if(not(PICS_ACP_SUPPORT)) { + setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + if (p_resourceType != int23) { + v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int62);//c_RUDNDi) + } else { + v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int60);//c_UDNDi); + } - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.node.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -); + + // Test Body + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex); + + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Access denied to create a resource"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating a resource without privileges"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Resource created without creation privileges"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource"); } + } + + f_checkAeSimuStatus(); + + //Check to see if the resource is NOT present + if(f_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ + setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); + } else { + setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); } - } - - testcase TC_CSE_DMR_CRE_001_MGC_CB() runs on Tester system CseSystem { + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end f_CSE_DMR_CRE_004 + + }// end group g_CSE_DMR_CRE_004 + + group g_CSE_DMR_CRE_005 { + + /** + * @desc Check that the IUT rejects the CREATE Request of container resource when the RW ATTRIBUTE is provided with an invalid value + * + */ + testcase TC_CSE_DMR_CRE_005_MNI() runs on Tester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createMgmtCmdBase; - var ResponsePrimitive v_responsePrimitive; + var template RequestPrimitive v_createRequest := m_createContainerBase; + var AttributeAux v_invalidAttribute; var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_createRequest.primitiveContent.container.maxNrOfInstances := 0; + v_invalidAttribute := {name := "maxNrOfInstances", value_ := "-1"}; - v_createRequest.primitiveContent.mgmtResource.resourceName := omit; - v_ae1.start(f_CSE_DMR_CRE_001(int12, v_createRequest, -));//Management Command + v_ae1.start(f_CSE_DMR_CRE_005(int3, v_createRequest, v_invalidAttribute)); v_ae1.done; + } + + testcase TC_CSE_DMR_CRE_005_MBS() runs on Tester system CseSystem { + // Local variables + var template RequestPrimitive v_createRequest := m_createContainerBase; + var AttributeAux v_invalidAttribute; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.mgmtResource.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); - } - } + v_createRequest.primitiveContent.container.maxByteSize := 0; + v_invalidAttribute := {name := "maxByteSize", value_ := "-1"}; + v_ae1.start(f_CSE_DMR_CRE_005(int3, v_createRequest, v_invalidAttribute)); + v_ae1.done; + } - testcase TC_CSE_DMR_CRE_001_LCP_CB() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_005_MIA() runs on Tester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createLocationPolicyBase; - var ResponsePrimitive v_responsePrimitive; + var template RequestPrimitive v_createRequest := m_createContainerBase; + var AttributeAux v_invalidAttribute; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - v_createRequest.primitiveContent.locationPolicy.resourceName := omit; - v_ae1.start(f_CSE_DMR_CRE_001(int10, v_createRequest, -));//Location Policy + v_createRequest.primitiveContent.container.maxInstanceAge := 0; + v_invalidAttribute := {name := "maxInstanceAge", value_ := "-1"}; + + v_ae1.start(f_CSE_DMR_CRE_005(int3, v_createRequest, v_invalidAttribute)); v_ae1.done; - - - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.locationPolicy.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + } + + function f_CSE_DMR_CRE_005(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, in AttributeAux p_invalidAttribute) runs on AeSimu { + + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + // Test Body + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex); + + mcaPort.send(m_request(v_request, {p_invalidAttribute})); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Creation rejected for resource type " & int2str(enum2int(p_resourceType)) & " containing an invalid value for attribute " & p_invalidAttribute.name); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Accepted creation of resource type " & int2str(enum2int(p_resourceType)) & " containing an invalid value for attribute" & p_invalidAttribute.name); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); + } + } + + f_checkAeSimuStatus(); + + //Check to see if the resource is NOT present + if(f_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ + setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); + } else { + setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); } - } - } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end f_CSE_DMR_CRE_005 + + }// end group g_CSE_DMR_CRE_005 + + group g_CSE_DMR_CRE_006 { - testcase TC_CSE_DMR_CRE_001_STCG_CB() runs on Tester system CseSystem { + /** + * @desc Check that the IUT returns a default value to RW ATTRIBUTE in the response of a <container> CREATE Request where no a RW ATTRIBUTE is provided by AE + * + */ + testcase TC_CSE_DMR_CRE_006_MNI() runs on Tester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createStatsConfigBase; + var template RequestPrimitive v_createRequest := m_createContainerBase; var ResponsePrimitive v_responsePrimitive; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - v_createRequest.primitiveContent.statsConfig.resourceName := omit; - v_ae1.start(f_CSE_DMR_CRE_001(int22, v_createRequest, -));//Stats Config + v_ae1.start(f_CSE_DMR_CRE_006(int3, v_createRequest)); v_ae1.done; - + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.statsConfig.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); - } - } + if(not ispresent(v_responsePrimitive.primitiveContent.container.maxNrOfInstances)){ + setverdict(fail, __SCOPE__, ": Error, maxNrOfInstances attribute not provided"); + } + } } - testcase TC_CSE_DMR_CRE_001_STCL_CB() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_006_MBS() runs on Tester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createStatsCollectBase; + var template RequestPrimitive v_createRequest := m_createContainerBase; var ResponsePrimitive v_responsePrimitive; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_createRequest.primitiveContent.statsCollect.resourceName := omit; - v_ae1.start(f_CSE_DMR_CRE_001(int21, v_createRequest, -));//Stats Collect + v_ae1.start(f_CSE_DMR_CRE_006(int3, v_createRequest)); v_ae1.done; - + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.statsCollect.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); - } - } - + if(not ispresent(v_responsePrimitive.primitiveContent.container.maxByteSize)){ + setverdict(fail, __SCOPE__, ": Error, maxByteSize attribute not provided"); + } + } + } - testcase TC_CSE_DMR_CRE_001_MSSP_CB() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_006_MIA() runs on Tester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createM2mServiceSubscriptionProfileBase; + var template RequestPrimitive v_createRequest := m_createContainerBase; var ResponsePrimitive v_responsePrimitive; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_createRequest.primitiveContent.m2mServiceSubscriptionProfile.resourceName := omit; - v_ae1.start(f_CSE_DMR_CRE_001(int11, v_createRequest, -));//Subscription Profile + + v_ae1.start(f_CSE_DMR_CRE_006(int3, v_createRequest)); v_ae1.done; - + if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.m2mServiceSubscriptionProfile.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); - } - } - + if(not ispresent(v_responsePrimitive.primitiveContent.container.maxInstanceAge)){ + setverdict(fail, __SCOPE__, ": Error, maxInstanceAge attribute not provided"); + } + } } - - testcase TC_CSE_DMR_CRE_001_ASAR_CB() runs on Tester system CseSystem { - // Local variables - var template RequestPrimitive v_createRequest := m_createServiceSubscribedAppRuleBase; - var ResponsePrimitive v_responsePrimitive; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_createRequest.primitiveContent.serviceSubscribedAppRule.resourceName := omit; - v_ae1.start(f_CSE_DMR_CRE_001(int19, v_createRequest, -));//Service Subscribed App - v_ae1.done; + + function f_CSE_DMR_CRE_006(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu return ResponsePrimitive { + + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - - - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.serviceSubscribedAppRule.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); + // Test Body + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex); + + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] 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))); + 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 vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Creation rejected of resource type " & int2str(enum2int(p_resourceType))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); + } + } + + f_checkAeSimuStatus(); + + //Check to see if the resource is present or not + if(f_isResourcePresent(v_resourceIndex)){ + setverdict(pass, __SCOPE__ & ":INFO: Resource created"); + } else { + setverdict(fail, __SCOPE__ & ":ERROR: Resource not created"); } - } - - } - - testcase TC_CSE_DMR_CRE_001_CIN_CNT() runs on Tester system CseSystem { - // Local variables - var template RequestPrimitive v_createRequest := m_createContentInstanceBase; - var ResponsePrimitive v_responsePrimitive; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); - v_createRequest.primitiveContent.contentInstance.resourceName := omit; - v_ae1.start(f_CSE_DMR_CRE_001(int4, v_createRequest, m_createContainerBase));//ContentInstance - v_ae1.done; + return vc_response.primitive.responsePrimitive; + + }//end f_CSE_DMR_CRE_006 - - - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.contentInstance.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); - } - } - - } + }// end group g_CSE_DMR_CRE_006 + + group g_CSE_DMR_CRE_007 { - function f_CSE_DMR_CRE_001(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, in template (omit) RequestPrimitive p_parentRequestPrimitive := omit) runs on AeSimu return ResponsePrimitive { - + /** + * @desc Check that the IUT responds with error when the newly created <contentInstance> results in that the field value of attribute currentNrOfInstances exceeds the field value of maxNrOfInstances in the parent container resource. + * + */ + testcase TC_CSE_DMR_CRE_007() runs on AeSimu system CseSystem { // Local variables + var template RequestPrimitive v_createRequest := m_createContainerBase; var MsgIn v_response; var RequestPrimitive v_request; - var integer v_parentIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; - var integer v_acpAuxIndex := -1; - var PoaList v_poaList := {"http://" & PX_AE2_ADDRESS & "/"}; - + var integer v_aeIndex := -1; + var integer v_containerIndex := -1; + const integer c_maxNumberOfInstances := 0; // Test control - + // Test component configuration - f_cf01Up(true); - + f_cf01Up(); + // Test adapter configuration - + // Preamble - - if(ispresent(p_parentRequestPrimitive)) { - if(match(int23, p_parentRequestPrimitive.resourceType)){ - vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", v_poaList), -1)); // AE2 is registred - vc_ae2.done; - v_ae2Index := f_getResource(vc_ae2); - p_parentRequestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_ae2Index)}; - vc_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler()); - } - if(ischosen(p_parentRequestPrimitive.primitiveContent.group_)){ - - f_cse_preamble_registerAe(); - - } - v_parentIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_parentIndex); - - - - } else {//Resource under CSEBase + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - if(p_resourceType != int1) { - - v_acpAuxIndex := f_cse_createAccessControlPolicyAux(-, -, -); - - p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[v_acpAuxIndex].resource.accessControlPolicy.resourceID}); - } - - if(ischosen(p_requestPrimitive.primitiveContent.group_)){ - - f_cse_preamble_registerAe(); - - } + v_createRequest.primitiveContent.container.maxNrOfInstances := c_maxNumberOfInstances; - } - - // Test Body - - if(match(int23, p_requestPrimitive.resourceType)){ - vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", v_poaList), -1)); // AE2 is registred - vc_ae2.done; - v_ae2Index := f_getResource(vc_ae2); - p_requestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_ae2Index)}; - vc_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler()); - } - - v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); - + v_containerIndex := f_cse_createResource(int3, v_createRequest, v_aeIndex); + + // Test Body + v_request := f_getCreateRequestPrimitive(int4, m_createContentInstance(f_getResourceAddress(v_containerIndex), "MyValue"), v_containerIndex); + mcaPort.send(m_request(v_request)); tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value vc_response { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int5207))) -> value v_response { tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfully"); - f_checkAttributesToBeSaved(p_resourceType, v_request, vc_response.primitive.responsePrimitive); - v_resourceIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_parentIndex); + setverdict(pass, __SCOPE__ & ": Maximun number of instances exceeded"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + setverdict(fail, __SCOPE__ & ": Bad responseStatusCode in response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(p_resourceType))); + setverdict(fail, __SCOPE__ & ": Accepted creation of contentInstance exceding maximum number of instances"); + } [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); + setverdict(fail, __SCOPE__ & ": No answer while creating resource type 4"); } } - + f_checkAeSimuStatus(); - - //Check to see if the resource is present or not - if (f_isResourcePresent(v_resourceIndex)){ - setverdict(pass, __SCOPE__ & ":INFO: Resource created"); + + //Check to see if the resource is NOT present + if(f_isResourceNotPresent(v_containerIndex, f_getResourceName(v_request.primitiveContent))){ + setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); } else { - setverdict(fail, __SCOPE__ & ":ERROR: Resource not created"); + setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); } - + // Postamble f_cse_postamble_deleteResources(); // Tear down f_cf01Down(); + + }//end TC_CSE_DMR_CRE_007 - return vc_response.primitive.responsePrimitive; - - }//end f_CSE_DMR_CRE_001 - - } // end g_CSE_DMR_CRE_001 - + }// end group g_CSE_DMR_CRE_007 - group g_CSE_DMR_CRE_002 { + group g_CSE_DMR_CRE_008 { /** - * @desc Check that the IUT accepts the creation of a RESOURCE_TYPE resource with a non-existing resource name provided by AE + * @desc Checks that the IUT accepts a newly created contentInstance when the currentByteSize exceeds the field value set in maxByteSize in the parent container resource by removing enough of the oldest <contentInstance> resources to allow the creation of the new <contentInstance> resource. * */ - testcase TC_CSE_DMR_CRE_002_CNT() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_008() runs on AeSimu system CseSystem { // Local variables - var ResponsePrimitive v_responsePrimitive; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_002(int3, m_createContainerBase));//container - v_ae1.done; - - + var template RequestPrimitive v_createRequest := m_createContainerBase; + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_containerIndex := -1; + const integer c_maxByteSize := 0; + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.container.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); - } else { - if(v_responsePrimitive.primitiveContent.container.resourceName != c_defaultContainerResourceName){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not correct"); - } + v_createRequest.primitiveContent.container.maxByteSize := c_maxByteSize; + + v_containerIndex := f_cse_createResource(int3, v_createRequest, v_aeIndex); + + // Test Body + v_request := f_getCreateRequestPrimitive(int4, m_createContentInstanceBase, v_containerIndex); + + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int5207))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Maximun byte size exceeded"); } - } - - } - - testcase TC_CSE_DMR_CRE_002_GRP() runs on Tester system CseSystem { - // Local variables - var ResponsePrimitive v_responsePrimitive; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_002(int9, m_createGroupBase));//group - v_ae1.done; - - - - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.group_.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); - } else { - if(v_responsePrimitive.primitiveContent.group_.resourceName != c_defaultGroupResourceName){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not correct"); - } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Bad responseStatusCode in response"); } - } - } - - testcase TC_CSE_DMR_CRE_002_ACP() runs on Tester system CseSystem { - // Local variables - var ResponsePrimitive v_responsePrimitive; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_002(int1, m_createAcpBase ));//accessControlPolicy - v_ae1.done; - - - - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.accessControlPolicy.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); - } else { - if(v_responsePrimitive.primitiveContent.accessControlPolicy.resourceName != c_defaultAccessControlPolicyResourceName){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not correct"); - } + + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Accepted creation of contentInstance exceding maximum byte size"); + } - } - } - - testcase TC_CSE_DMR_CRE_002_SCH() runs on Tester system CseSystem { - // Local variables - var ResponsePrimitive v_responsePrimitive; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_002(int18, m_createScheduleBase));//Schedule - v_ae1.done; - - - - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.schedule.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); - } else { - if(v_responsePrimitive.primitiveContent.schedule.resourceName != c_defaultScheduleResourceName){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not correct"); - } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource type 4"); } - } - } - testcase TC_CSE_DMR_CRE_002_PCH() runs on Tester system CseSystem { - // Local variables - var ResponsePrimitive v_responsePrimitive; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_002(int15, m_createPollingChannelBase));//Pollingchannel - v_ae1.done; + } + + f_checkAeSimuStatus(); - - - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.pollingChannel.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); - } else { - if(v_responsePrimitive.primitiveContent.pollingChannel.resourceName != c_defaultPollingChannelResourceName){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not correct"); - } - } + //Check to see if the resource is present or not + if(f_isResourceNotPresent(v_containerIndex, f_getResourceName(v_request.primitiveContent))){ + setverdict(pass, __SCOPE__ & ":INFO: Resource created"); + } else { + setverdict(fail, __SCOPE__ & ":ERROR: Resource not created"); } - } - - testcase TC_CSE_DMR_CRE_002_SUB() runs on Tester system CseSystem { - // Local variables - var ResponsePrimitive v_responsePrimitive; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_002(int23, m_createSubscriptionBase));//Subscription - v_ae1.done; + + // Postamble + f_cse_postamble_deleteResources(); - - - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.subscription.resourceName)){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided"); - } else { - if(v_responsePrimitive.primitiveContent.subscription.resourceName != c_defaultSubscriptionResourceName){ - setverdict(fail, __SCOPE__, ": Error, resourceName attribute not correct"); - } - } - } - } + // Tear down + f_cf01Down(); + + }//end TC_CSE_DMR_CRE_008 + + }// end group g_CSE_DMR_CRE_008 + + group g_CSE_DMR_CRE_009 { - function f_CSE_DMR_CRE_002(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu return ResponsePrimitive{//system CseSystem { MRO system keyword not supported on functions in Titan - + /** + * @desc Check that the IUT increaments and then copies the field value of attribute stateTag in parent container resource when contentInstance resource is created as the direct child of the parent container + * + */ + testcase TC_CSE_DMR_CRE_009() runs on AeSimu system CseSystem { // Local variables + var template RequestPrimitive v_createRequest := m_createContainerBase; var MsgIn v_response; - var RequestPrimitive v_request; var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - var integer v_resourceIndex := -1; - + var integer v_containerIndex := -1; + var integer v_contentInstanceIndex := -1; + var template PrimitiveContent v_contentResponse; + // Test control // Test component configuration - f_cf01Up(true); + f_cf01Up(); // Test adapter configuration // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - + v_containerIndex := f_cse_createResource(int3, v_createRequest, v_aeIndex); + + v_contentInstanceIndex := f_cse_createResource(int4, m_createContentInstanceBase, v_containerIndex); + // Test Body - v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex); + mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_containerIndex), f_getOriginator(v_containerIndex)))); + + v_contentResponse.container := mw_contentContainerBase; - mcaPort.send(m_request(v_request)); tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value vc_response { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response { tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfully"); - f_checkAttributesToBeSaved(p_resourceType, v_request, vc_response.primitive.responsePrimitive); - v_resourceIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_aeIndex); + setverdict(pass, __SCOPE__ & ": Response OK for retrieving"); + if(v_response.primitive.responsePrimitive.primitiveContent.container.stateTag == vc_resourcesList[v_containerIndex].resource.container.stateTag + 1) { + setverdict(pass, __SCOPE__ & ": stateTag attribute increased after creation of contentInstance resource"); + } else { + setverdict(fail, __SCOPE__ & ": stateTag attribute not incremented correctly after creation of contentInstance resource"); + } } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Wrong response status code"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(p_resourceType))); + setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); } [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); } } - f_checkAeSimuStatus(); - - //Check to see if the resource is present or not - if(f_isResourcePresent(v_resourceIndex)){ - setverdict(pass, __SCOPE__ & ":INFO: Resource created"); - } else { - setverdict(fail, __SCOPE__ & ":ERROR: Resource not created"); - } // Postamble f_cse_postamble_deleteResources(); - + // Tear down f_cf01Down(); + + }//end TC_CSE_DMR_CRE_009 - return vc_response.primitive.responsePrimitive; - - }//end f_CSE_DMR_CRE_002 - - - }// end group g_CSE_DMR_CRE_002 + }// end group g_CSE_DMR_CRE_009 - group g_CSE_DMR_CRE_003 { + group g_CSE_DMR_CRE_010 { /** - * @desc Check that the IUT rejects the creation of a RESOURCE_TYPE resource with an existing resource name provided by AE + * @desc Check that the IUT rejects the CREATE Request of a container resource named “la†as a direct child of a container resource * */ - testcase TC_CSE_DMR_CRE_003_CNT() runs on Tester system CseSystem { - // Local variables - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_003(int3, m_createContainerBase));//container - v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_003_GRP() runs on Tester system CseSystem { - // Local variables - - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_003(int9, m_createGroupBase));//group - v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_003_ACP() runs on Tester system CseSystem { - // Local variables - - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_003(int1, m_createAcpBase));//accessControlPolicy - v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_003_SCH() runs on Tester system CseSystem { - // Local variables - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_003(int18, m_createScheduleBase));//Schedule - v_ae1.done; - } - testcase TC_CSE_DMR_CRE_003_PCH() runs on Tester system CseSystem { - // Local variables - - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_003(int15, m_createPollingChannelBase));//Pollingchannel - v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_003_SUB() runs on Tester system CseSystem { - // Local variables - - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_003(int23, m_createSubscriptionBase));//Subscription - v_ae1.done; - } - - - function f_CSE_DMR_CRE_003(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu {//system CseSystem { MRO system keyword not supported on functions in Titan - + testcase TC_CSE_DMR_CRE_010() runs on AeSimu system CseSystem { // Local variables + var template RequestPrimitive v_createRequest := m_createContainerBase; var MsgIn v_response; var RequestPrimitive v_request; var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; - + var integer v_containerIndex := -1; + // Test control - + // Test component configuration - f_cf01Up(true); - + f_cf01Up(); + // Test adapter configuration - + // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi) - - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - if(p_resourceType == int23){ - vc_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler()); - } - v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex); - + v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + // Test Body - v_request.requestIdentifier := "Existing resource"; - + v_createRequest.primitiveContent.container.resourceName := c_resourceShortNameLatest; + + v_request := f_getCreateRequestPrimitive(int3, v_createRequest, v_containerIndex); + mcaPort.send(m_request(v_request)); tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4105))) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) -> value v_response { tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Resource already exists"); + setverdict(pass, __SCOPE__ & ": Not allowed to create a contentInstance resource named 'la'"); + } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating an already existing resource"); + setverdict(fail, __SCOPE__ & ": Rejected creation of contentInstance named 'la' with wrong ResponseStatusCode"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Creating a resource that already exists"); + setverdict(fail, __SCOPE__ & ": Accepted creation of contentInstance named 'la'"); + } [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + setverdict(fail, __SCOPE__ & ": No answer while creating resource type 4"); } } - + + f_checkAeSimuStatus(); + + //Check to see if the resource is NOT present + if(f_isResourceNotPresent(v_containerIndex, f_getResourceName(v_request.primitiveContent))){ + setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); + } else { + setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); + } + // Postamble f_cse_postamble_deleteResources(); - + // Tear down f_cf01Down(); - - }//end f_CSE_DMR_CRE_003 - - }// end group g_CSE_DMR_CRE_003 + + }//end TC_CSE_DMR_CRE_010 + + }// end group g_CSE_DMR_CRE_010 - group g_CSE_DMR_CRE_004 { + group g_CSE_DMR_CRE_011 { /** - * @desc Check that the IUT rejects the creation of a RESOURCE_TYPE resource when AE has no privileges + * @desc Check that the IUT rejects the CREATE Request of a container resource named “ol†as a direct child of a container resource * */ - testcase TC_CSE_DMR_CRE_004_CNT() runs on Tester system CseSystem { - // Local variables - - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_004(int3, m_createContainerBase));//container - v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_004_GRP() runs on Tester system CseSystem { - // Local variables - - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_004(int9, m_createGroupBase));//group - v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_004_ACP() runs on Tester system CseSystem { - // Local variables - - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_004(int1, m_createAcpBase));//accessControlPolicy - v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_004_SCH() runs on Tester system CseSystem { - // Local variables - - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_004(int18, m_createScheduleBase));//Schedule - v_ae1.done; - } - testcase TC_CSE_DMR_CRE_004_PCH() runs on Tester system CseSystem { - // Local variables - - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_004(int15, m_createPollingChannelBase));//Pollingchannel - v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_004_SUB() runs on Tester system CseSystem { - // Local variables - - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_004(int23, m_createSubscriptionBase));//Subscription - v_ae1.done; - } - - - function f_CSE_DMR_CRE_004(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu {//system CseSystem { MRO system keyword not supported on functions in Titan - + testcase TC_CSE_DMR_CRE_011() runs on AeSimu system CseSystem { // Local variables + var template RequestPrimitive v_createRequest := m_createContainerBase; var MsgIn v_response; var RequestPrimitive v_request; - var integer v_acpAuxIndex := -1; var integer v_aeIndex := -1; - + var integer v_containerIndex := -1; + // Test control - if(not(PICS_ACP_SUPPORT)) { - setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); - stop; - } - + // Test component configuration - f_cf01Up(); - + f_cf01Up(); + // Test adapter configuration - + // Preamble - if (p_resourceType != int23) { - v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int62);//c_RUDNDi) - } else { - v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int60);//c_UDNDi); - } - - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -); + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + // Test Body - v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex); + v_createRequest.primitiveContent.container.resourceName := c_resourceShortNameOldest; + v_request := f_getCreateRequestPrimitive(int3, v_createRequest, v_containerIndex); + mcaPort.send(m_request(v_request)); tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) -> value v_response { tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Access denied to create a resource"); + setverdict(pass, __SCOPE__ & ": Not allowed to create a contentInstance resource named 'ol'"); + } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating a resource without privileges"); + setverdict(fail, __SCOPE__ & ": Rejected creation of contentInstance named 'ol' with wrong ResponseStatusCode"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Resource created without creation privileges"); + setverdict(fail, __SCOPE__ & ": Accepted creation of contentInstance named 'ol'"); + } [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + setverdict(fail, __SCOPE__ & ": No answer while creating resource type 4"); } } - + f_checkAeSimuStatus(); //Check to see if the resource is NOT present - if(f_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ + if(f_isResourceNotPresent(v_containerIndex, f_getResourceName(v_request.primitiveContent))){ setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); } else { setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); } - + // Postamble f_cse_postamble_deleteResources(); - + // Tear down f_cf01Down(); - - }//end f_CSE_DMR_CRE_004 - - }// end group g_CSE_DMR_CRE_004 + + }//end TC_CSE_DMR_CRE_011 + + }// end group g_CSE_DMR_CRE_011 - group g_CSE_DMR_CRE_005 { - + group g_CSE_DMR_CRE_012 { + /** - * @desc Check that the IUT rejects the CREATE Request of container resource when the RW ATTRIBUTE is provided with an invalid value + * @desc Check that the IUT accepts the creation of a RESOURCE_TYPE resource with the optional attribute OPTIONAL_ATTRIBUTE provided * */ - testcase TC_CSE_DMR_CRE_005_MNI() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_012_CNT_ACPI() runs on Tester system CseSystem { // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createContainerBase; - var AttributeAux v_invalidAttribute; + const AttributeList c_optionalAttribute := {"accessControlPolicyIDs"}; + + v_createRequest.primitiveContent.container.accessControlPolicyIDs := {"NotInitialized"}; + + v_ae1.start(f_CSE_DMR_CRE_012(int3, v_createRequest, c_optionalAttribute)); + v_ae1.done; + } + + testcase TC_CSE_DMR_CRE_012_CNT_ET() runs on Tester system CseSystem { + // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_createRequest.primitiveContent.container.maxNrOfInstances := 0; - v_invalidAttribute := {name := "maxNrOfInstances", value_ := "-1"}; + var template RequestPrimitive v_createRequest := m_createContainerBase; + const AttributeList c_optionalAttribute := {"expirationTime"}; - v_ae1.start(f_CSE_DMR_CRE_005(int3, v_createRequest, v_invalidAttribute)); + v_createRequest.primitiveContent.container.expirationTime := "20301231T012345"; + + v_ae1.start(f_CSE_DMR_CRE_012(int3, v_createRequest, c_optionalAttribute)); v_ae1.done; + } - testcase TC_CSE_DMR_CRE_005_MBS() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_012_CNT_LBL() runs on Tester system CseSystem { // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createContainerBase; - var AttributeAux v_invalidAttribute; + const AttributeList c_optionalAttribute := {"labels"}; + + v_createRequest.primitiveContent.container.labels := {"MyLabel"}; + + v_ae1.start(f_CSE_DMR_CRE_012(int3, v_createRequest, c_optionalAttribute)); + v_ae1.done; + + } + + testcase TC_CSE_DMR_CRE_012_CNT_MNI() runs on Tester system CseSystem { + // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createContainerBase; + const AttributeList c_optionalAttribute := {"maxNrOfInstances"}; - v_createRequest.primitiveContent.container.maxByteSize := 0; - v_invalidAttribute := {name := "maxByteSize", value_ := "-1"}; + v_createRequest.primitiveContent.container.maxNrOfInstances := 0; - v_ae1.start(f_CSE_DMR_CRE_005(int3, v_createRequest, v_invalidAttribute)); + v_ae1.start(f_CSE_DMR_CRE_012(int3, v_createRequest, c_optionalAttribute)); v_ae1.done; - + } - testcase TC_CSE_DMR_CRE_005_MIA() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_012_CNT_MBS() runs on Tester system CseSystem { // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createContainerBase; - var AttributeAux v_invalidAttribute; + const AttributeList c_optionalAttribute := {"maxByteSize"}; + + v_createRequest.primitiveContent.container.maxByteSize := 0; + + v_ae1.start(f_CSE_DMR_CRE_012(int3, v_createRequest, c_optionalAttribute)); + v_ae1.done; + + } + + testcase TC_CSE_DMR_CRE_012_CNT_MIA() runs on Tester system CseSystem { + // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createContainerBase; + const AttributeList c_optionalAttribute := {"maxInstanceAge"}; v_createRequest.primitiveContent.container.maxInstanceAge := 0; - v_invalidAttribute := {name := "maxInstanceAge", value_ := "-1"}; - v_ae1.start(f_CSE_DMR_CRE_005(int3, v_createRequest, v_invalidAttribute)); + v_ae1.start(f_CSE_DMR_CRE_012(int3, v_createRequest, c_optionalAttribute)); v_ae1.done; } - - function f_CSE_DMR_CRE_005(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, in AttributeAux p_invalidAttribute) runs on AeSimu { - - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - - // Test control - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + testcase TC_CSE_DMR_CRE_012_CNT_CR() runs on Tester system CseSystem { + // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createContainerBase; + const AttributeList c_optionalAttribute := {"creator"}; - // Test Body - v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex); - - mcaPort.send(m_request(v_request, {p_invalidAttribute})); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Creation rejected for resource type " & int2str(enum2int(p_resourceType)) & " containing an invalid value for attribute " & p_invalidAttribute.name); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Accepted creation of resource type " & int2str(enum2int(p_resourceType)) & " containing an invalid value for attribute" & p_invalidAttribute.name); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); - } - } - - f_checkAeSimuStatus(); - - //Check to see if the resource is NOT present - if(f_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ - setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); - } else { - setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); - } + v_createRequest.primitiveContent.container.creator := "Unitialized"; - - // Postamble - f_cse_postamble_deleteResources(); - - // Tear down - f_cf01Down(); - - }//end f_CSE_DMR_CRE_005 + v_ae1.start(f_CSE_DMR_CRE_012(int3, v_createRequest, c_optionalAttribute)); + v_ae1.done; - }// end group g_CSE_DMR_CRE_005 - - group g_CSE_DMR_CRE_006 { + } - /** - * @desc Check that the IUT returns a default value to RW ATTRIBUTE in the response of a <container> CREATE Request where no a RW ATTRIBUTE is provided by AE - * - */ - testcase TC_CSE_DMR_CRE_006_MNI() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_012_CIN_ET() runs on Tester system CseSystem {//TODO + // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createContentInstanceBase; + const AttributeList c_optionalAttribute := {"expirationTime"}; + + v_createRequest.primitiveContent.contentInstance.expirationTime := "20301231T012345"; + + v_ae1.start(f_CSE_DMR_CRE_012(int4, v_createRequest, c_optionalAttribute)); + v_ae1.done; + } + + testcase TC_CSE_DMR_CRE_012_CIN_LBL() runs on Tester system CseSystem {//TODO + // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createContentInstanceBase; + const AttributeList c_optionalAttribute := {"labels"}; + + v_createRequest.primitiveContent.contentInstance.labels := {"MyLabel"}; + + v_ae1.start(f_CSE_DMR_CRE_012(int4, v_createRequest, c_optionalAttribute)); + v_ae1.done; + + } + + testcase TC_CSE_DMR_CRE_012_CIN_CR() runs on Tester system CseSystem {//TODO + // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createContentInstanceBase; + const AttributeList c_optionalAttribute := {"creator"}; + + v_createRequest.primitiveContent.contentInstance.creator := "NotInitialized"; + + v_ae1.start(f_CSE_DMR_CRE_012(int4, v_createRequest, c_optionalAttribute)); + v_ae1.done; + + } + + testcase TC_CSE_DMR_CRE_012_CIN_CNF() runs on Tester system CseSystem {//TODO + // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createContentInstanceBase; + const AttributeList c_optionalAttribute := {"contentInfo"}; + + v_createRequest.primitiveContent.contentInstance.contentInfo := "MyContentInfo"; + + v_ae1.start(f_CSE_DMR_CRE_012(int4, v_createRequest, c_optionalAttribute)); + v_ae1.done; + + } + + testcase TC_CSE_DMR_CRE_012_CIN_OR() runs on Tester system CseSystem {//TODO + // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createContentInstanceBase; + const AttributeList c_optionalAttribute := {"ontologyRef"}; + + v_createRequest.primitiveContent.contentInstance.ontologyRef := "MyOntologyRef"; + + v_ae1.start(f_CSE_DMR_CRE_012(int4, v_createRequest, c_optionalAttribute)); + v_ae1.done; + + } + + testcase TC_CSE_DMR_CRE_012_ACP_ET() runs on Tester system CseSystem { + // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createAcpBase; + const AttributeList c_optionalAttribute := {"expirationTime"}; + + v_createRequest.primitiveContent.accessControlPolicy.expirationTime := "20301231T012345"; + + v_ae1.start(f_CSE_DMR_CRE_012(int1, v_createRequest, c_optionalAttribute)); + v_ae1.done; + + } + + testcase TC_CSE_DMR_CRE_012_ACP_LBL() runs on Tester system CseSystem { + // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createAcpBase; + const AttributeList c_optionalAttribute := {"labels"}; + + v_createRequest.primitiveContent.accessControlPolicy.labels := {"MyLabel"}; + + v_ae1.start(f_CSE_DMR_CRE_012(int1, v_createRequest, c_optionalAttribute)); + v_ae1.done; + + } + + testcase TC_CSE_DMR_CRE_012_SUB_ACPI() runs on Tester system CseSystem { + // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createSubscriptionBase; + const AttributeList c_optionalAttribute := {"accessControlPolicyIDs"}; + + v_createRequest.primitiveContent.subscription.accessControlPolicyIDs := {"NotInitialized"}; + + v_ae1.start(f_CSE_DMR_CRE_012(int23, v_createRequest, c_optionalAttribute)); + v_ae1.done; + } + + testcase TC_CSE_DMR_CRE_012_SUB_ET() runs on Tester system CseSystem { + // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createSubscriptionBase; + const AttributeList c_optionalAttribute := {"expirationTime"}; + + v_createRequest.primitiveContent.subscription.expirationTime := "20301231T012345"; + + v_ae1.start(f_CSE_DMR_CRE_012(int23, v_createRequest, c_optionalAttribute)); + v_ae1.done; + + } + + testcase TC_CSE_DMR_CRE_012_SUB_LBL() runs on Tester system CseSystem { + // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createSubscriptionBase; + const AttributeList c_optionalAttribute := {"labels"}; + + v_createRequest.primitiveContent.subscription.labels := {"MyLabel"}; + + v_ae1.start(f_CSE_DMR_CRE_012(int23, v_createRequest, c_optionalAttribute)); + v_ae1.done; + + } + + testcase TC_CSE_DMR_CRE_012_SUB_ENC() runs on Tester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createContainerBase; - var ResponsePrimitive v_responsePrimitive; var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createSubscriptionBase; + const AttributeList c_optionalAttribute := {"eventNotificationCriteria"}; - v_ae1.start(f_CSE_DMR_CRE_006(int3, v_createRequest)); + v_createRequest.primitiveContent.subscription.eventNotificationCriteria := valueof(m_eventNotificationCriteria({int1}, -)); + + v_ae1.start(f_CSE_DMR_CRE_012(int23, v_createRequest, c_optionalAttribute)); v_ae1.done; - - - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.container.maxNrOfInstances)){ - setverdict(fail, __SCOPE__, ": Error, maxNrOfInstances attribute not provided"); - } - } } - testcase TC_CSE_DMR_CRE_006_MBS() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_012_SUB_EXC() runs on Tester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createContainerBase; - var ResponsePrimitive v_responsePrimitive; var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createSubscriptionBase; + const AttributeList c_optionalAttribute := {"expirationCounter"}; - v_ae1.start(f_CSE_DMR_CRE_006(int3, v_createRequest)); + v_createRequest.primitiveContent.subscription.expirationCounter := 1; + + v_ae1.start(f_CSE_DMR_CRE_012(int23, v_createRequest, c_optionalAttribute)); v_ae1.done; - - - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.container.maxByteSize)){ - setverdict(fail, __SCOPE__, ": Error, maxByteSize attribute not provided"); - } - } - } - testcase TC_CSE_DMR_CRE_006_MIA() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_012_SUB_GPI() runs on Tester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createContainerBase; - var ResponsePrimitive v_responsePrimitive; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_006(int3, v_createRequest)); + var template RequestPrimitive v_createRequest := m_createSubscriptionBase; + const AttributeList c_optionalAttribute := {"groupID"}; + + v_createRequest.primitiveContent.subscription.groupID := "MyGroupID"; + + v_ae1.start(f_CSE_DMR_CRE_012(int23, v_createRequest, c_optionalAttribute)); v_ae1.done; - - - if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); - if(not ispresent(v_responsePrimitive.primitiveContent.container.maxInstanceAge)){ - setverdict(fail, __SCOPE__, ": Error, maxInstanceAge attribute not provided"); - } - } } - - function f_CSE_DMR_CRE_006(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu return ResponsePrimitive { - - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - - // Test control - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + testcase TC_CSE_DMR_CRE_012_SUB_NFU() runs on Tester system CseSystem { + // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createSubscriptionBase; + const AttributeList c_optionalAttribute := {"notificationForwardingURI"}; - // Test Body - v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex); - - mcaPort.send(m_request(v_request)); - tc_ac.start; - alt { - [] 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))); - 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 vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Creation rejected of resource type " & int2str(enum2int(p_resourceType))); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); - } - } - - f_checkAeSimuStatus(); - - //Check to see if the resource is present or not - if(f_isResourcePresent(v_resourceIndex)){ - setverdict(pass, __SCOPE__ & ":INFO: Resource created"); - } else { - setverdict(fail, __SCOPE__ & ":ERROR: Resource not created"); - } - - // Postamble - f_cse_postamble_deleteResources(); - - // Tear down - f_cf01Down(); + v_createRequest.primitiveContent.subscription.notificationForwardingURI := "MyForwardingURI"; - return vc_response.primitive.responsePrimitive; - - }//end f_CSE_DMR_CRE_006 + v_ae1.start(f_CSE_DMR_CRE_012(int23, v_createRequest, c_optionalAttribute)); + v_ae1.done; - }// end group g_CSE_DMR_CRE_006 - - group g_CSE_DMR_CRE_007 { + } - /** - * @desc Check that the IUT responds with error when the newly created <contentInstance> results in that the field value of attribute currentNrOfInstances exceeds the field value of maxNrOfInstances in the parent container resource. - * - */ - testcase TC_CSE_DMR_CRE_007() runs on AeSimu system CseSystem { + testcase TC_CSE_DMR_CRE_012_SUB_BN() runs on Tester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createContainerBase; - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_containerIndex := -1; - const integer c_maxNumberOfInstances := 0; - // Test control - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - - v_createRequest.primitiveContent.container.maxNrOfInstances := c_maxNumberOfInstances; - - v_containerIndex := f_cse_createResource(int3, v_createRequest, v_aeIndex); - - // Test Body - v_request := f_getCreateRequestPrimitive(int4, m_createContentInstance(f_getResourceAddress(v_containerIndex), "MyValue"), v_containerIndex); - - mcaPort.send(m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int5207))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Maximun number of instances exceeded"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Bad responseStatusCode in response"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Accepted creation of contentInstance exceding maximum number of instances"); - - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource type 4"); - } - } - - f_checkAeSimuStatus(); - - //Check to see if the resource is NOT present - if(f_isResourceNotPresent(v_containerIndex, f_getResourceName(v_request.primitiveContent))){ - setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); - } else { - setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); - } - - // Postamble - f_cse_postamble_deleteResources(); + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createSubscriptionBase; + const AttributeList c_optionalAttribute := {"batchNotify"}; - // Tear down - f_cf01Down(); - - }//end TC_CSE_DMR_CRE_007 + v_createRequest.primitiveContent.subscription.batchNotify := {0, "PT1S"}; - }// end group g_CSE_DMR_CRE_007 - - group g_CSE_DMR_CRE_008 { + v_ae1.start(f_CSE_DMR_CRE_012(int23, v_createRequest, c_optionalAttribute)); + v_ae1.done; + } - /** - * @desc Checks that the IUT accepts a newly created contentInstance when the currentByteSize exceeds the field value set in maxByteSize in the parent container resource by removing enough of the oldest <contentInstance> resources to allow the creation of the new <contentInstance> resource. - * - */ - testcase TC_CSE_DMR_CRE_008() runs on AeSimu system CseSystem { + testcase TC_CSE_DMR_CRE_012_SUB_RL() runs on Tester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createContainerBase; - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_containerIndex := -1; - const integer c_maxByteSize := 0; - // Test control - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createSubscriptionBase; + const AttributeList c_optionalAttribute := {"rateLimit"}; - v_createRequest.primitiveContent.container.maxByteSize := c_maxByteSize; - - v_containerIndex := f_cse_createResource(int3, v_createRequest, v_aeIndex); - - // Test Body - v_request := f_getCreateRequestPrimitive(int4, m_createContentInstanceBase, v_containerIndex); - - mcaPort.send(m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int5207))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Maximun byte size exceeded"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Bad responseStatusCode in response"); - } - - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Accepted creation of contentInstance exceding maximum byte size"); - - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource type 4"); - } - } - - f_checkAeSimuStatus(); + v_createRequest.primitiveContent.subscription.rateLimit := {0, omit}; - //Check to see if the resource is present or not - if(f_isResourceNotPresent(v_containerIndex, f_getResourceName(v_request.primitiveContent))){ - setverdict(pass, __SCOPE__ & ":INFO: Resource created"); - } else { - setverdict(fail, __SCOPE__ & ":ERROR: Resource not created"); - } - - // Postamble - f_cse_postamble_deleteResources(); + v_ae1.start(f_CSE_DMR_CRE_012(int23, v_createRequest, c_optionalAttribute)); + v_ae1.done; - // Tear down - f_cf01Down(); - - }//end TC_CSE_DMR_CRE_008 + } + + testcase TC_CSE_DMR_CRE_012_SUB_PSN() runs on Tester system CseSystem { + // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createSubscriptionBase; + const AttributeList c_optionalAttribute := {"preSubscriptionNotify"}; + + v_createRequest.primitiveContent.subscription.preSubscriptionNotify := 1; - }// end group g_CSE_DMR_CRE_008 - - group g_CSE_DMR_CRE_009 { + v_ae1.start(f_CSE_DMR_CRE_012(int23, v_createRequest, c_optionalAttribute)); + v_ae1.done; + + } - /** - * @desc Check that the IUT increaments and then copies the field value of attribute stateTag in parent container resource when contentInstance resource is created as the direct child of the parent container - * - */ - testcase TC_CSE_DMR_CRE_009() runs on AeSimu system CseSystem { + testcase TC_CSE_DMR_CRE_012_SUB_PN() runs on Tester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createContainerBase; - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_containerIndex := -1; - var integer v_contentInstanceIndex := -1; - var template PrimitiveContent v_contentResponse; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createSubscriptionBase; + const AttributeList c_optionalAttribute := {"pendingNotification"}; + + v_createRequest.primitiveContent.subscription.pendingNotification := int1; + + v_ae1.start(f_CSE_DMR_CRE_012(int23, v_createRequest, c_optionalAttribute)); + v_ae1.done; + } - // Test control - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + testcase TC_CSE_DMR_CRE_012_SUB_NSP() runs on Tester system CseSystem { + // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createSubscriptionBase; + const AttributeList c_optionalAttribute := {"notificationStoragePriority"}; - v_containerIndex := f_cse_createResource(int3, v_createRequest, v_aeIndex); + v_createRequest.primitiveContent.subscription.notificationStoragePriority := 1; - v_contentInstanceIndex := f_cse_createResource(int4, m_createContentInstanceBase, v_containerIndex); + v_ae1.start(f_CSE_DMR_CRE_012(int23, v_createRequest, c_optionalAttribute)); + v_ae1.done; + + } - // Test Body - mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_containerIndex), f_getOriginator(v_containerIndex)))); + testcase TC_CSE_DMR_CRE_012_SUB_LN() runs on Tester system CseSystem { + // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createSubscriptionBase; + const AttributeList c_optionalAttribute := {"latestNotify"}; - v_contentResponse.container := mw_contentContainerBase; + v_createRequest.primitiveContent.subscription.latestNotify := true; - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Response OK for retrieving"); - if(v_response.primitive.responsePrimitive.primitiveContent.container.stateTag == vc_resourcesList[v_containerIndex].resource.container.stateTag + 1) { - setverdict(pass, __SCOPE__ & ": stateTag attribute increased after creation of contentInstance resource"); - } else { - setverdict(fail, __SCOPE__ & ": stateTag attribute not incremented correctly after creation of contentInstance resource"); - } - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); - } - } - - // Postamble - f_cse_postamble_deleteResources(); + v_ae1.start(f_CSE_DMR_CRE_012(int23, v_createRequest, c_optionalAttribute)); + v_ae1.done; - // Tear down - f_cf01Down(); - - }//end TC_CSE_DMR_CRE_009 + } + + testcase TC_CSE_DMR_CRE_012_SUB_NCT() runs on Tester system CseSystem { + // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createSubscriptionBase; + const AttributeList c_optionalAttribute := {"notificationContentType"}; - }// end group g_CSE_DMR_CRE_009 - - group g_CSE_DMR_CRE_010 { + v_createRequest.primitiveContent.subscription.notificationContentType := int1; + + v_ae1.start(f_CSE_DMR_CRE_012(int23, v_createRequest, c_optionalAttribute)); + v_ae1.done; + + } - /** - * @desc Check that the IUT rejects the CREATE Request of a container resource named “la†as a direct child of a container resource - * - */ - testcase TC_CSE_DMR_CRE_010() runs on AeSimu system CseSystem { + testcase TC_CSE_DMR_CRE_012_SUB_NEC() runs on Tester system CseSystem { // Local variables - var template RequestPrimitive v_createRequest := m_createContainerBase; - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_containerIndex := -1; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createSubscriptionBase; + const AttributeList c_optionalAttribute := {"notificationEventCat"}; - // Test control - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + v_createRequest.primitiveContent.subscription.notificationEventCat := {alt_1 := 100}; - v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + v_ae1.start(f_CSE_DMR_CRE_012(int23, v_createRequest, c_optionalAttribute)); + v_ae1.done; + + } - // Test Body - v_createRequest.primitiveContent.container.resourceName := c_resourceShortNameLatest; + testcase TC_CSE_DMR_CRE_012_SUB_CR() runs on Tester system CseSystem { + // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createSubscriptionBase; + const AttributeList c_optionalAttribute := {"creator"}; - v_request := f_getCreateRequestPrimitive(int3, v_createRequest, v_containerIndex); + v_createRequest.primitiveContent.subscription.creator := "MyCreator"; + + v_ae1.start(f_CSE_DMR_CRE_012(int23, v_createRequest, c_optionalAttribute)); + v_ae1.done; + + } - mcaPort.send(m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Not allowed to create a contentInstance resource named 'la'"); - - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Rejected creation of contentInstance named 'la' with wrong ResponseStatusCode"); + testcase TC_CSE_DMR_CRE_012_SUB_SU() runs on Tester system CseSystem { + // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_createRequest := m_createSubscriptionBase; + const AttributeList c_optionalAttribute := {"subscriberURI"}; + + v_createRequest.primitiveContent.subscription.subscriberURI := "MySubscriberURI"; + + v_ae1.start(f_CSE_DMR_CRE_012(int23, v_createRequest, c_optionalAttribute)); + v_ae1.done; + + } + + function f_CSE_DMR_CRE_012(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, in AttributeList p_optionalAttribute) runs on AeSimu { + + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_containerIndex := -1; + var integer v_parentIndex := -1; + var integer v_acpAuxIndex := -1; + var integer v_ae2Index := -1; + const XSD.NCName c_accessControlPolicyIDs := "accessControlPolicyIDs"; + var integer v_resourceIndex := -1; + + // Test control + if(p_optionalAttribute[0] == c_accessControlPolicyIDs) { + if(not(PICS_ACP_SUPPORT)) { + setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); + stop; + } } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Accepted creation of contentInstance named 'la'"); - + + // Test component configuration + f_cf01Up(true); + + // Test adapter configuration + + // Preamble + if (p_optionalAttribute[0] == c_accessControlPolicyIDs) { + v_acpAuxIndex := f_cse_preamble_createAcpAux();//c_CRUDNDi) + } + + v_parentIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + + + if(p_resourceType == int4) { + v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_parentIndex); + v_parentIndex := v_containerIndex; } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource type 4"); + + // Test Body + if(p_optionalAttribute[0] == "creator") { + p_requestPrimitive.primitiveContent.container.creator := vc_resourcesList[v_parentIndex].resource.aE.aE_ID; } - } - - f_checkAeSimuStatus(); + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); - //Check to see if the resource is NOT present - if(f_isResourceNotPresent(v_containerIndex, f_getResourceName(v_request.primitiveContent))){ - setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); - } else { - setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); - } - - // Postamble - f_cse_postamble_deleteResources(); - - // Tear down - f_cf01Down(); - - }//end TC_CSE_DMR_CRE_010 + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] 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[0]); + 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 { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Accepted creation for resource type " & int2str(enum2int(p_resourceType)) & " with incorrect attributes"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Rejected creation of resource type " & int2str(enum2int(p_resourceType))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); + } + } + + f_checkAeSimuStatus(); + + //Check to see if the resource is present or not + if(f_isResourcePresent(v_resourceIndex)) { + setverdict(pass, __SCOPE__ & ":INFO: Resource created"); + } else { + setverdict(fail, __SCOPE__ & ":ERROR: Resource not created"); + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end f_CSE_DMR_CRE_012 - }// end group g_CSE_DMR_CRE_010 - - group g_CSE_DMR_CRE_011 { + }// end group g_CSE_DMR_CRE_012 + + group g_CSE_DMR_CRE_013{ /** - * @desc Check that the IUT rejects the CREATE Request of a container resource named “ol†as a direct child of a container resource + * @desc Check that the IUT rejects the CREATE Request of a contentInstance resource with error “NOT_ACCEPTABLE†when contentSize exceeds maxByteSize * */ - testcase TC_CSE_DMR_CRE_011() runs on AeSimu system CseSystem { + testcase TC_CSE_DMR_CRE_013() runs on AeSimu system CseSystem { // Local variables var template RequestPrimitive v_createRequest := m_createContainerBase; var MsgIn v_response; var RequestPrimitive v_request; var integer v_aeIndex := -1; var integer v_containerIndex := -1; - + const integer c_maxByteSize := 0; // Test control - + // Test component configuration f_cf01Up(); - + // Test adapter configuration - + // Preamble v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - - v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - + + v_createRequest.primitiveContent.container.maxByteSize := c_maxByteSize; + + v_containerIndex := f_cse_createResource(int3, v_createRequest, v_aeIndex); + // Test Body - v_createRequest.primitiveContent.container.resourceName := c_resourceShortNameOldest; - - v_request := f_getCreateRequestPrimitive(int3, v_createRequest, v_containerIndex); - + v_request := f_getCreateRequestPrimitive(int4, m_createContentInstanceBase, v_containerIndex); + mcaPort.send(m_request(v_request)); tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int5207))) -> value v_response { tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Not allowed to create a contentInstance resource named 'ol'"); - + setverdict(pass, __SCOPE__ & ": Maximum byte size exceeded"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Rejected creation of contentInstance named 'ol' with wrong ResponseStatusCode"); + setverdict(fail, __SCOPE__ & ": Bad responseStatusCode in response"); } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Accepted creation of contentInstance named 'ol'"); - + setverdict(fail, __SCOPE__ & ": Accepted creation of contentInstance exceding maximum byte size"); } [] tc_ac.timeout { setverdict(fail, __SCOPE__ & ": No answer while creating resource type 4"); } } - - f_checkAeSimuStatus(); - - //Check to see if the resource is NOT present - if(f_isResourceNotPresent(v_containerIndex, f_getResourceName(v_request.primitiveContent))){ - setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); - } else { - setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); - } - + // Postamble f_cse_postamble_deleteResources(); - + // Tear down f_cf01Down(); - - }//end TC_CSE_DMR_CRE_011 - - }// end group g_CSE_DMR_CRE_011 + + }//end TC_CSE_DMR_CRE_013 + + }// end group g_CSE_DMR_CRE_013 - group g_CSE_DMR_CRE_012 { + group g_CSE_DMR_CRE_014{ /** - * @desc Check that the IUT returns successfully after a CREATE request an empty content of created resource when the ResultContent set to 0 (Nothing) + * @desc Check that the IUT updates the currentByteSize attribute in a <container> parent resource when a new <contentInstance> resource is created. * */ - testcase TC_CSE_DMR_CRE_012_CNT() runs on Tester system CseSystem { - // Local variables - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_012(int3, m_createContainerBase));//Container - v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_012_GRP() runs on Tester system CseSystem { - // Local variables - - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_012(int9, m_createGroupBase));//Group - v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_012_ACP() runs on Tester system CseSystem { - // Local variables - - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_012(int1, m_createAcpBase));//AccessControlPolicy - v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_012_SCH() runs on Tester system CseSystem { - // Local variables - - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_012(int18, m_createScheduleBase));//Schedule - v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_012_PCH() runs on Tester system CseSystem { - // Local variables - - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_012(int15, m_createPollingChannelBase));//PollingChannel - v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_012_SUB() runs on Tester system CseSystem { - // Local variables - - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_ae1.start(f_CSE_DMR_CRE_012(int23, m_createSubscriptionBase));//Subscription - v_ae1.done; - } - - function f_CSE_DMR_CRE_012(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu { - + testcase TC_CSE_DMR_CRE_014() runs on AeSimu system CseSystem { // Local variables + var template RequestPrimitive v_createRequest; var MsgIn v_response; var RequestPrimitive v_request; var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - + var integer v_containerIndex := -1; + var integer v_contentInstanceIndex := -1; + const integer c_maxByteSize := 512; // Test control - + // Test component configuration - f_cf01Up(true); - + f_cf01Up(); + // Test adapter configuration - + // Preamble v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - - // Test Body - v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex); - v_request.resultContent := int0;//Attributes + + v_createRequest.primitiveContent.container.maxByteSize := c_maxByteSize; + + v_createRequest := m_createContainerBase; + + v_containerIndex := f_cse_createResource(int3, v_createRequest, v_aeIndex); + + v_contentInstanceIndex := f_cse_createResource(int4, v_createRequest, v_containerIndex); + + // Test Body + v_request := f_getCreateRequestPrimitive(int4, m_createContentInstanceBase, v_containerIndex); //Default content: "AnyValue" (8 bytes length) + mcaPort.send(m_request(v_request)); tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, omit))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": No content provided with RC set to 0"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(omit))) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); + setverdict(pass, __SCOPE__ & ": ContentInstance resource created"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Content provided with RC set to 0"); + setverdict(fail, __SCOPE__ & ": Wrong response status code"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating resource"); + setverdict(fail, __SCOPE__ & ": Error when creating contentInstance resource"); } [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + setverdict(fail, __SCOPE__ & ": No answer while creating resource type 4"); } } - - // Postamble - f_cse_postamble_deleteResources(); - - // Tear down - f_cf01Down(); - - }//end f_CSE_DMR_CRE_012 - - } // end g_CSE_DMR_CRE_012 - - group g_CSE_DMR_CRE_013 { - - /** - * @desc Check that the IUT returns successfully after a CREATE request only hierarchichal address of the created resource when the Result Content is set to 2 (hierarchical address) - * - */ - testcase TC_CSE_DMR_CRE_013_CNT() runs on Tester system CseSystem { - // Local variables - var template PrimitiveContent v_contentResponse; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_contentResponse.uRI := mw_contentContainer_rc2; - - v_ae1.start(f_CSE_DMR_CRE_013(int3, m_createContainerBase, v_contentResponse));//Container - v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_013_GRP() runs on Tester system CseSystem { - // Local variables - var template PrimitiveContent v_contentResponse; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_contentResponse.uRI := mw_contentGroup_rc2; - - v_ae1.start(f_CSE_DMR_CRE_013(int9, m_createGroupBase, v_contentResponse));//Group - v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_013_ACP() runs on Tester system CseSystem { - // Local variables - var template PrimitiveContent v_contentResponse; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_contentResponse.uRI := mw_contentAcp_rc2; - - v_ae1.start(f_CSE_DMR_CRE_013(int1, m_createAcpBase,v_contentResponse));//AccessControlPolicy - v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_013_SCH() runs on Tester system CseSystem { - // Local variables - var template PrimitiveContent v_contentResponse; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_contentResponse.uRI := mw_contentSchedule_rc2; - - v_ae1.start(f_CSE_DMR_CRE_013(int18, m_createScheduleBase, v_contentResponse));//Schedule - v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_013_PCH() runs on Tester system CseSystem { - // Local variables - var template PrimitiveContent v_contentResponse; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_contentResponse.uRI := mw_contentPollingChannel_rc2; - v_ae1.start(f_CSE_DMR_CRE_013(int15, m_createPollingChannelBase, v_contentResponse));//PollingChannel - v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_013_SUB() runs on Tester system CseSystem { - // Local variables - var template PrimitiveContent v_contentResponse; - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_contentResponse.uRI := mw_contentSubscription_rc2; + //Check currentByteSize + mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_containerIndex), f_getOriginator(v_containerIndex)))); - v_ae1.start(f_CSE_DMR_CRE_013(int23, m_createSubscriptionBase, v_contentResponse));//Subscription - v_ae1.done; - } - - function f_CSE_DMR_CRE_013(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu { - - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - - // Test control - - // Test component configuration - f_cf01Up(true); - - // Test adapter configuration - - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - - // Test Body - v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex); - v_request.resultContent := int2;//Attributes - - mcaPort.send(m_request(v_request)); tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, p_contentResponse))) -> value v_response { - tc_ac.stop; - if(f_isHierarchical(v_response.primitive.responsePrimitive.primitiveContent.uRI)) { - setverdict(pass, __SCOPE__ & ": Response returning correctly only the hierarchical address of the created resource"); - } else { - setverdict(fail, __SCOPE__ & ": Response returning the address of the created resource with wrong format"); - } - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong content provided with RC set to 2"); + if(v_response.primitive.responsePrimitive.primitiveContent.container.currentByteSize == 8) { //Default content: "AnyValue" (8 bytes length) + setverdict(pass, __SCOPE__ & ": CurrentByteSize attribute in content resource is incremented successfully"); + } + else{ + setverdict(fail, __SCOPE__ & ": CurrentByteSize attribute in content resource not incremented successfully"); + } } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating resource"); + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); } [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); } } - + // Postamble f_cse_postamble_deleteResources(); - + // Tear down f_cf01Down(); - - - }//end f_CSE_DMR_CRE_013 - - } // end g_CSE_DMR_CRE_013 - - group g_CSE_DMR_CRE_014 { + + }//end TC_CSE_DMR_CRE_014 + + }// end group g_CSE_DMR_CRE_014 + + group g_CSE_DMR_CRE_015 { /** - * @desc Check that the IUT returns successfully after a CREATE request only attributes and hierarchichal address of the created resource when Result Content is set 3 (attributes and hierarchichal address) + * @desc Check that the IUT returns successfully after a CREATE request an empty content of created resource when the ResultContent set to 0 (Nothing) * */ - testcase TC_CSE_DMR_CRE_014_CNT() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_015_CNT() runs on Tester system CseSystem { // Local variables - var template PrimitiveContent v_contentResponse; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_contentResponse.resource := mw_contentContainer_rc3; - - v_ae1.start(f_CSE_DMR_CRE_014(int3, m_createContainerBase, v_contentResponse));//Container + + v_ae1.start(f_CSE_DMR_CRE_015(int3, m_createContainerBase));//Container v_ae1.done; } - testcase TC_CSE_DMR_CRE_014_GRP() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_015_GRP() runs on Tester system CseSystem { // Local variables - var template PrimitiveContent v_contentResponse; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_contentResponse.resource := mw_contentGroup_rc3; - - v_ae1.start(f_CSE_DMR_CRE_014(int9, m_createGroupBase, v_contentResponse));//Group + + v_ae1.start(f_CSE_DMR_CRE_015(int9, m_createGroupBase));//Group v_ae1.done; } - testcase TC_CSE_DMR_CRE_014_ACP() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_015_ACP() runs on Tester system CseSystem { // Local variables - var template PrimitiveContent v_contentResponse; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_contentResponse.resource := mw_contentAcp_rc3; - - v_ae1.start(f_CSE_DMR_CRE_014(int1, m_createAcpBase,v_contentResponse));//AccessControlPolicy + + v_ae1.start(f_CSE_DMR_CRE_015(int1, m_createAcpBase));//AccessControlPolicy v_ae1.done; } - testcase TC_CSE_DMR_CRE_014_SCH() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_015_SCH() runs on Tester system CseSystem { // Local variables - var template PrimitiveContent v_contentResponse; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_contentResponse.resource := mw_contentSchedule_rc3; - - v_ae1.start(f_CSE_DMR_CRE_014(int18, m_createScheduleBase, v_contentResponse));//Schedule + + v_ae1.start(f_CSE_DMR_CRE_015(int18, m_createScheduleBase));//Schedule v_ae1.done; } - testcase TC_CSE_DMR_CRE_014_PCH() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_015_PCH() runs on Tester system CseSystem { // Local variables - var template PrimitiveContent v_contentResponse; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_contentResponse.resource := mw_contentPollingChannel_rc3; - - v_ae1.start(f_CSE_DMR_CRE_014(int15, m_createPollingChannelBase, v_contentResponse));//PollingChannel + + v_ae1.start(f_CSE_DMR_CRE_015(int15, m_createPollingChannelBase));//PollingChannel v_ae1.done; } - testcase TC_CSE_DMR_CRE_014_SUB() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_015_SUB() runs on Tester system CseSystem { // Local variables - var template PrimitiveContent v_contentResponse; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; - - v_contentResponse.resource := mw_contentSubscription_rc3; - - v_ae1.start(f_CSE_DMR_CRE_014(int23, m_createSubscriptionBase, v_contentResponse));//Subscription + + v_ae1.start(f_CSE_DMR_CRE_015(int23, m_createSubscriptionBase));//Subscription v_ae1.done; } - function f_CSE_DMR_CRE_014(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu { + function f_CSE_DMR_CRE_015(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu { // Local variables var MsgIn v_response; @@ -3989,31 +6300,27 @@ module OneM2M_Testcases_CSE { // Preamble v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - + // Test Body v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex); - v_request.resultContent := int3;//Attributes + Hierarchichal Address + v_request.resultContent := int0;//Attributes mcaPort.send(m_request(v_request)); tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, p_contentResponse))) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, omit))) -> value v_response { tc_ac.stop; - if(f_isHierarchical(v_response.primitive.responsePrimitive.primitiveContent.resource.uRI)) { - setverdict(pass, __SCOPE__ & ": Response returning correctly the hierarchical address of the created resource and resource representation"); - } else { - setverdict(fail, __SCOPE__ & ": Response returning the address of the created resource with wrong format"); - } + setverdict(pass, __SCOPE__ & ": No content provided with RC set to 0"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(omit))) -> value v_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Wrong response status code"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong content provided with RC set to 3"); + setverdict(fail, __SCOPE__ & ": Content provided with RC set to 0"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { tc_ac.stop; @@ -4030,597 +6337,375 @@ module OneM2M_Testcases_CSE { // Tear down f_cf01Down(); - }//end f_CSE_DMR_CRE_014 + }//end f_CSE_DMR_CRE_015 - } // end g_CSE_DMR_CRE_014 - - group g_CSE_DMR_CRE_015 { + } // end g_CSE_DMR_CRE_015 + + group g_CSE_DMR_CRE_016 { /** - * @desc Check that the IUT accepts the creation of a RESOURCE_TYPE resource with the optional attribute OPTIONAL_ATTRIBUTE provided + * @desc Check that the IUT returns successfully after a CREATE request only hierarchichal address of the created resource when the Result Content is set to 2 (hierarchical address) * - */ - testcase TC_CSE_DMR_CRE_015_CNT_ACPI() runs on Tester system CseSystem { - // Local variables - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createContainerBase; - const AttributeAux c_optionalAttribute := {"accessControlPolicyIDs", omit}; - - v_createRequest.primitiveContent.container.accessControlPolicyIDs := {"NotInitialized"}; - - v_ae1.start(f_CSE_DMR_CRE_015(int3, v_createRequest, c_optionalAttribute)); - v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_015_CNT_ET() runs on Tester system CseSystem { - // Local variables - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createContainerBase; - const AttributeAux c_optionalAttribute := {"expirationTime", omit}; - - v_createRequest.primitiveContent.container.expirationTime := "20301231T012345"; - - v_ae1.start(f_CSE_DMR_CRE_015(int3, v_createRequest, c_optionalAttribute)); - v_ae1.done; - - } - - testcase TC_CSE_DMR_CRE_015_CNT_LBL() runs on Tester system CseSystem { - // Local variables - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createContainerBase; - const AttributeAux c_optionalAttribute := {"labels", omit}; - - v_createRequest.primitiveContent.container.labels := {"MyLabel"}; - - v_ae1.start(f_CSE_DMR_CRE_015(int3, v_createRequest, c_optionalAttribute)); - v_ae1.done; - - } - - testcase TC_CSE_DMR_CRE_015_CNT_MNI() runs on Tester system CseSystem { - // Local variables - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createContainerBase; - const AttributeAux c_optionalAttribute := {"maxNrOfInstances", omit}; - - v_createRequest.primitiveContent.container.maxNrOfInstances := 0; - - v_ae1.start(f_CSE_DMR_CRE_015(int3, v_createRequest, c_optionalAttribute)); - v_ae1.done; - - } - - testcase TC_CSE_DMR_CRE_015_CNT_MBS() runs on Tester system CseSystem { - // Local variables - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createContainerBase; - const AttributeAux c_optionalAttribute := {"maxByteSize", omit}; - - v_createRequest.primitiveContent.container.maxByteSize := 0; - - v_ae1.start(f_CSE_DMR_CRE_015(int3, v_createRequest, c_optionalAttribute)); - v_ae1.done; - - } - - testcase TC_CSE_DMR_CRE_015_CNT_MIA() runs on Tester system CseSystem { - // Local variables - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createContainerBase; - const AttributeAux c_optionalAttribute := {"maxInstanceAge", omit}; - - v_createRequest.primitiveContent.container.maxInstanceAge := 0; - - v_ae1.start(f_CSE_DMR_CRE_015(int3, v_createRequest, c_optionalAttribute)); - v_ae1.done; - - } - - testcase TC_CSE_DMR_CRE_015_CNT_OR() runs on Tester system CseSystem { - // Local variables - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createContainerBase; - const AttributeAux c_optionalAttribute := {"ontologyRef", omit}; - - v_createRequest.primitiveContent.container.ontologyRef := "MyOntologyRef"; - - v_ae1.start(f_CSE_DMR_CRE_015(int3, v_createRequest, c_optionalAttribute)); - v_ae1.done; - - } - - testcase TC_CSE_DMR_CRE_015_CIN_ET() runs on Tester system CseSystem {//TODO - // Local variables - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createContentInstanceBase; - const AttributeAux c_optionalAttribute := {"expirationTime", omit}; - - v_createRequest.primitiveContent.contentInstance.expirationTime := "20301231T012345"; - - v_ae1.start(f_CSE_DMR_CRE_015(int4, v_createRequest, c_optionalAttribute)); - v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_015_CIN_LBL() runs on Tester system CseSystem {//TODO - // Local variables - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createContentInstanceBase; - const AttributeAux c_optionalAttribute := {"labels", omit}; - - v_createRequest.primitiveContent.contentInstance.labels := {"MyLabel"}; - - v_ae1.start(f_CSE_DMR_CRE_015(int4, v_createRequest, c_optionalAttribute)); - v_ae1.done; - - } - - testcase TC_CSE_DMR_CRE_015_CIN_CR() runs on Tester system CseSystem {//TODO - // Local variables - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createContentInstanceBase; - const AttributeAux c_optionalAttribute := {"creator", omit}; - - v_createRequest.primitiveContent.contentInstance.creator := "MyCreator"; - - v_ae1.start(f_CSE_DMR_CRE_015(int4, v_createRequest, c_optionalAttribute)); - v_ae1.done; - - } - - testcase TC_CSE_DMR_CRE_015_CIN_CNF() runs on Tester system CseSystem {//TODO - // Local variables - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createContentInstanceBase; - const AttributeAux c_optionalAttribute := {"contentInfo", omit}; - - v_createRequest.primitiveContent.contentInstance.contentInfo := "MyContentInfo"; - - v_ae1.start(f_CSE_DMR_CRE_015(int4, v_createRequest, c_optionalAttribute)); - v_ae1.done; - - } - - testcase TC_CSE_DMR_CRE_015_CIN_OR() runs on Tester system CseSystem {//TODO - // Local variables - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createContentInstanceBase; - const AttributeAux c_optionalAttribute := {"ontologyRef", omit}; - - v_createRequest.primitiveContent.contentInstance.ontologyRef := "MyOntologyRef"; - - v_ae1.start(f_CSE_DMR_CRE_015(int4, v_createRequest, c_optionalAttribute)); - v_ae1.done; - - } - - testcase TC_CSE_DMR_CRE_015_ACP_ET() runs on Tester system CseSystem { - // Local variables - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createAcpBase; - const AttributeAux c_optionalAttribute := {"expirationTime", omit}; - - v_createRequest.primitiveContent.accessControlPolicy.expirationTime := "20301231T012345"; - - v_ae1.start(f_CSE_DMR_CRE_015(int1, v_createRequest, c_optionalAttribute)); - v_ae1.done; - - } - - testcase TC_CSE_DMR_CRE_015_ACP_LBL() runs on Tester system CseSystem { - // Local variables - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createAcpBase; - const AttributeAux c_optionalAttribute := {"labels", omit}; - - v_createRequest.primitiveContent.accessControlPolicy.labels := {"MyLabel"}; - - v_ae1.start(f_CSE_DMR_CRE_015(int1, v_createRequest, c_optionalAttribute)); - v_ae1.done; - - } - - testcase TC_CSE_DMR_CRE_015_SUB_ACPI() runs on Tester system CseSystem { - // Local variables - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - const AttributeAux c_optionalAttribute := {"accessControlPolicyIDs", omit}; - - v_createRequest.primitiveContent.subscription.accessControlPolicyIDs := {"NotInitialized"}; - - v_ae1.start(f_CSE_DMR_CRE_015(int23, v_createRequest, c_optionalAttribute)); - v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_015_SUB_ET() runs on Tester system CseSystem { - // Local variables - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - const AttributeAux c_optionalAttribute := {"expirationTime", omit}; - - v_createRequest.primitiveContent.subscription.expirationTime := "20301231T012345"; - - v_ae1.start(f_CSE_DMR_CRE_015(int23, v_createRequest, c_optionalAttribute)); - v_ae1.done; - - } - - testcase TC_CSE_DMR_CRE_015_SUB_LBL() runs on Tester system CseSystem { - // Local variables - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - const AttributeAux c_optionalAttribute := {"labels", omit}; - - v_createRequest.primitiveContent.subscription.labels := {"MyLabel"}; - - v_ae1.start(f_CSE_DMR_CRE_015(int23, v_createRequest, c_optionalAttribute)); - v_ae1.done; - - } - - testcase TC_CSE_DMR_CRE_015_SUB_ENC() runs on Tester system CseSystem { + */ + testcase TC_CSE_DMR_CRE_016_CNT() runs on Tester system CseSystem { // Local variables + var template PrimitiveContent v_contentResponse; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - const AttributeAux c_optionalAttribute := {"eventNotificationCriteria", omit}; - - v_createRequest.primitiveContent.subscription.eventNotificationCriteria := valueof(m_eventNotificationCriteria({int1}, -)); - - v_ae1.start(f_CSE_DMR_CRE_015(int23, v_createRequest, c_optionalAttribute)); + + v_contentResponse.uRI := mw_contentContainer_rc2; + + v_ae1.start(f_CSE_DMR_CRE_016(int3, m_createContainerBase, v_contentResponse));//Container v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_015_SUB_EXC() runs on Tester system CseSystem { + + testcase TC_CSE_DMR_CRE_016_GRP() runs on Tester system CseSystem { // Local variables + var template PrimitiveContent v_contentResponse; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - const AttributeAux c_optionalAttribute := {"expirationCounter", omit}; - - v_createRequest.primitiveContent.subscription.expirationCounter := 1; - - v_ae1.start(f_CSE_DMR_CRE_015(int23, v_createRequest, c_optionalAttribute)); + + v_contentResponse.uRI := mw_contentGroup_rc2; + + v_ae1.start(f_CSE_DMR_CRE_016(int9, m_createGroupBase, v_contentResponse));//Group v_ae1.done; - } - testcase TC_CSE_DMR_CRE_015_SUB_GPI() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_016_ACP() runs on Tester system CseSystem { // Local variables + var template PrimitiveContent v_contentResponse; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - const AttributeAux c_optionalAttribute := {"groupID", omit}; - - v_createRequest.primitiveContent.subscription.groupID := "MyGroupID"; + + v_contentResponse.uRI := mw_contentAcp_rc2; - v_ae1.start(f_CSE_DMR_CRE_015(int23, v_createRequest, c_optionalAttribute)); + v_ae1.start(f_CSE_DMR_CRE_016(int1, m_createAcpBase,v_contentResponse));//AccessControlPolicy v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_015_SUB_NFU() runs on Tester system CseSystem { + + testcase TC_CSE_DMR_CRE_016_SCH() runs on Tester system CseSystem { // Local variables + var template PrimitiveContent v_contentResponse; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - const AttributeAux c_optionalAttribute := {"notificationForwardingURI", omit}; - - v_createRequest.primitiveContent.subscription.notificationForwardingURI := "MyForwardingURI"; + + v_contentResponse.uRI := mw_contentSchedule_rc2; - v_ae1.start(f_CSE_DMR_CRE_015(int23, v_createRequest, c_optionalAttribute)); + v_ae1.start(f_CSE_DMR_CRE_016(int18, m_createScheduleBase, v_contentResponse));//Schedule v_ae1.done; - } - testcase TC_CSE_DMR_CRE_015_SUB_BN() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_016_PCH() runs on Tester system CseSystem { // Local variables + var template PrimitiveContent v_contentResponse; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - const AttributeAux c_optionalAttribute := {"batchNotify", omit}; - - v_createRequest.primitiveContent.subscription.batchNotify := {0, "PT1S"}; + + v_contentResponse.uRI := mw_contentPollingChannel_rc2; - v_ae1.start(f_CSE_DMR_CRE_015(int23, v_createRequest, c_optionalAttribute)); + v_ae1.start(f_CSE_DMR_CRE_016(int15, m_createPollingChannelBase, v_contentResponse));//PollingChannel v_ae1.done; } - testcase TC_CSE_DMR_CRE_015_SUB_RL() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_016_SUB() runs on Tester system CseSystem { // Local variables + var template PrimitiveContent v_contentResponse; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - const AttributeAux c_optionalAttribute := {"rateLimit", omit}; - - v_createRequest.primitiveContent.subscription.rateLimit := {0, omit}; - - v_ae1.start(f_CSE_DMR_CRE_015(int23, v_createRequest, c_optionalAttribute)); + + v_contentResponse.uRI := mw_contentSubscription_rc2; + + v_ae1.start(f_CSE_DMR_CRE_016(int23, m_createSubscriptionBase, v_contentResponse));//Subscription v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_015_SUB_PSN() runs on Tester system CseSystem { + + function f_CSE_DMR_CRE_016(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu { + // Local variables - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - const AttributeAux c_optionalAttribute := {"preSubscriptionNotify", omit}; - - v_createRequest.primitiveContent.subscription.preSubscriptionNotify := 1; - - v_ae1.start(f_CSE_DMR_CRE_015(int23, v_createRequest, c_optionalAttribute)); - v_ae1.done; + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + + // Test control + + // Test component configuration + f_cf01Up(true); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - } + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - testcase TC_CSE_DMR_CRE_015_SUB_PN() runs on Tester system CseSystem { - // Local variables - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - const AttributeAux c_optionalAttribute := {"pendingNotification", omit}; + // Test Body + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex); + v_request.resultContent := int2;//Attributes - v_createRequest.primitiveContent.subscription.pendingNotification := int1; + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, p_contentResponse))) -> value v_response { + tc_ac.stop; + if(f_isHierarchical(v_response.primitive.responsePrimitive.primitiveContent.uRI)) { + setverdict(pass, __SCOPE__ & ": Response returning correctly only the hierarchical address of the created resource"); + } else { + setverdict(fail, __SCOPE__ & ": Response returning the address of the created resource with wrong format"); + } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong content provided with RC set to 2"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); - v_ae1.start(f_CSE_DMR_CRE_015(int23, v_createRequest, c_optionalAttribute)); - v_ae1.done; - } + // Tear down + f_cf01Down(); + + + }//end f_CSE_DMR_CRE_016 + + } // end g_CSE_DMR_CRE_016 + + group g_CSE_DMR_CRE_017 { - testcase TC_CSE_DMR_CRE_015_SUB_NSP() runs on Tester system CseSystem { + /** + * @desc Check that the IUT returns successfully after a CREATE request only attributes and hierarchichal address of the created resource when Result Content is set 3 (attributes and hierarchichal address) + * + */ + testcase TC_CSE_DMR_CRE_017_CNT() runs on Tester system CseSystem { // Local variables + var template PrimitiveContent v_contentResponse; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - const AttributeAux c_optionalAttribute := {"notificationStoragePriority", omit}; - - v_createRequest.primitiveContent.subscription.notificationStoragePriority := 1; - - v_ae1.start(f_CSE_DMR_CRE_015(int23, v_createRequest, c_optionalAttribute)); + + v_contentResponse.resource := mw_contentContainer_rc3; + + v_ae1.start(f_CSE_DMR_CRE_017(int3, m_createContainerBase, v_contentResponse));//Container v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_015_SUB_LN() runs on Tester system CseSystem { + + testcase TC_CSE_DMR_CRE_017_GRP() runs on Tester system CseSystem { // Local variables + var template PrimitiveContent v_contentResponse; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - const AttributeAux c_optionalAttribute := {"latestNotify", omit}; - - v_createRequest.primitiveContent.subscription.latestNotify := true; - - v_ae1.start(f_CSE_DMR_CRE_015(int23, v_createRequest, c_optionalAttribute)); + + v_contentResponse.resource := mw_contentGroup_rc3; + + v_ae1.start(f_CSE_DMR_CRE_017(int9, m_createGroupBase, v_contentResponse));//Group v_ae1.done; - } - testcase TC_CSE_DMR_CRE_015_SUB_NCT() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_017_ACP() runs on Tester system CseSystem { // Local variables + var template PrimitiveContent v_contentResponse; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - const AttributeAux c_optionalAttribute := {"notificationContentType", omit}; - - v_createRequest.primitiveContent.subscription.notificationContentType := int1; + + v_contentResponse.resource := mw_contentAcp_rc3; - v_ae1.start(f_CSE_DMR_CRE_015(int23, v_createRequest, c_optionalAttribute)); + v_ae1.start(f_CSE_DMR_CRE_017(int1, m_createAcpBase,v_contentResponse));//AccessControlPolicy v_ae1.done; - } - - testcase TC_CSE_DMR_CRE_015_SUB_NEC() runs on Tester system CseSystem { + + testcase TC_CSE_DMR_CRE_017_SCH() runs on Tester system CseSystem { // Local variables + var template PrimitiveContent v_contentResponse; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - const AttributeAux c_optionalAttribute := {"notificationEventCat", omit}; - - v_createRequest.primitiveContent.subscription.notificationEventCat := {alt_1 := 100}; + + v_contentResponse.resource := mw_contentSchedule_rc3; - v_ae1.start(f_CSE_DMR_CRE_015(int23, v_createRequest, c_optionalAttribute)); + v_ae1.start(f_CSE_DMR_CRE_017(int18, m_createScheduleBase, v_contentResponse));//Schedule v_ae1.done; - } - testcase TC_CSE_DMR_CRE_015_SUB_CR() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_017_PCH() runs on Tester system CseSystem { // Local variables + var template PrimitiveContent v_contentResponse; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - const AttributeAux c_optionalAttribute := {"creator", omit}; - - v_createRequest.primitiveContent.subscription.creator := "MyCreator"; + + v_contentResponse.resource := mw_contentPollingChannel_rc3; - v_ae1.start(f_CSE_DMR_CRE_015(int23, v_createRequest, c_optionalAttribute)); + v_ae1.start(f_CSE_DMR_CRE_017(int15, m_createPollingChannelBase, v_contentResponse));//PollingChannel v_ae1.done; - } - testcase TC_CSE_DMR_CRE_015_SUB_SU() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_017_SUB() runs on Tester system CseSystem { // Local variables + var template PrimitiveContent v_contentResponse; var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - const AttributeAux c_optionalAttribute := {"subscriberURI", omit}; - - v_createRequest.primitiveContent.subscription.subscriberURI := "MySubscriberURI"; - - v_ae1.start(f_CSE_DMR_CRE_015(int23, v_createRequest, c_optionalAttribute)); + + v_contentResponse.resource := mw_contentSubscription_rc3; + + v_ae1.start(f_CSE_DMR_CRE_017(int23, m_createSubscriptionBase, v_contentResponse));//Subscription v_ae1.done; - } - function f_CSE_DMR_CRE_015(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, in AttributeAux p_optionalAttribute) runs on AeSimu { + function f_CSE_DMR_CRE_017(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_containerIndex := -1; - var integer v_parentIndex := -1; - var integer v_acpAuxIndex := -1; - var integer v_ae2Index := -1; - const XSD.NCName c_accessControlPolicyIDs := "accessControlPolicyIDs"; - var integer v_resourceIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; - // Test control - if(match(c_accessControlPolicyIDs,p_optionalAttribute.name)) { - if(not(PICS_ACP_SUPPORT)) { - setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); - stop; - } - } - - // Test component configuration - f_cf01Up(true); - - // Test adapter configuration - - // Preamble - if (match(c_accessControlPolicyIDs, p_optionalAttribute.name)) { - v_acpAuxIndex := f_cse_preamble_createAcpAux();//c_CRUDNDi) - } - - v_parentIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - - - if(p_resourceType == int4) { - v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_parentIndex); - v_parentIndex := v_containerIndex; - } - - // Test Body - v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); - - mcaPort.send(m_request(v_request)); - tc_ac.start; - alt { - [] 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 { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Accepted creation for resource type " & int2str(enum2int(p_resourceType)) & " with incorrect attributes"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Rejected creation of resource type " & int2str(enum2int(p_resourceType))); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); + // Test control + + // Test component configuration + f_cf01Up(true); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + + // Test Body + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex); + v_request.resultContent := int3;//Attributes + Hierarchichal Address + + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, p_contentResponse))) -> value v_response { + tc_ac.stop; + if(f_isHierarchical(v_response.primitive.responsePrimitive.primitiveContent.resource.uRI)) { + setverdict(pass, __SCOPE__ & ": Response returning correctly the hierarchical address of the created resource and resource representation"); + } else { + setverdict(fail, __SCOPE__ & ": Response returning the address of the created resource with wrong format"); } - } - - f_checkAeSimuStatus(); - - //Check to see if the resource is present or not - if(f_isResourcePresent(v_resourceIndex)) { - setverdict(pass, __SCOPE__ & ":INFO: Resource created"); - } else { - setverdict(fail, __SCOPE__ & ":ERROR: Resource not created"); } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong content provided with RC set to 3"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); - - // Tear down - f_cf01Down(); - - }//end f_CSE_DMR_CRE_015 - - }// end group g_CSE_DMR_CRE_015 + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end f_CSE_DMR_CRE_017 + + } // end g_CSE_DMR_CRE_017 - group g_CSE_DMR_CRE_016 { + + group g_CSE_DMR_CRE_020 { /** * @desc Check that the IUT accepts the creation of a RESOURCE_TYPE resource with the optional attribute announceTo provided * */ - testcase TC_CSE_DMR_CRE_016_ACP() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_020_ACP() runs on Tester system CseSystem { // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createAcpBase; v_createRequest.primitiveContent.accessControlPolicy.announceTo := {f_getAnnouncementTargetPoA()}; - v_ae1.start(f_CSE_DMR_CRE_016(int1, v_createRequest, mw_createAccessControlPolicyAnnc));//AccessControlPolicy + v_ae1.start(f_CSE_DMR_CRE_020(int1, v_createRequest, mw_createAccessControlPolicyAnnc));//AccessControlPolicy v_ae1.done; } - testcase TC_CSE_DMR_CRE_016_CNT() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_020_CNT() runs on Tester system CseSystem { // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createContainerBase; v_createRequest.primitiveContent.container.announceTo := {f_getAnnouncementTargetPoA()}; - v_ae1.start(f_CSE_DMR_CRE_016(int3, v_createRequest, mw_createContainerAnncBase));//Container + v_ae1.start(f_CSE_DMR_CRE_020(int3, v_createRequest, mw_createContainerAnncBase));//Container v_ae1.done; } - testcase TC_CSE_DMR_CRE_016_CIN() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_020_CIN() runs on Tester system CseSystem { // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createContentInstanceBase; v_createRequest.primitiveContent.contentInstance.announceTo := {f_getAnnouncementTargetPoA()}; - v_ae1.start(f_CSE_DMR_CRE_016(int4, v_createRequest, mw_createContentInstanceAnncBase));//ContentInstance + v_ae1.start(f_CSE_DMR_CRE_020(int4, v_createRequest, mw_createContentInstanceAnncBase));//ContentInstance v_ae1.done; } - testcase TC_CSE_DMR_CRE_016_GRP() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_020_GRP() runs on Tester system CseSystem { // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createGroupBase; v_createRequest.primitiveContent.group_.announceTo := {f_getAnnouncementTargetPoA()}; - v_ae1.start(f_CSE_DMR_CRE_016(int9, v_createRequest, mw_createGroupAnncBase));//Group + v_ae1.start(f_CSE_DMR_CRE_020(int9, v_createRequest, mw_createGroupAnncBase));//Group v_ae1.done; } - testcase TC_CSE_DMR_CRE_016_LCP() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_020_LCP() runs on Tester system CseSystem { // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createLocationPolicy(int1, omit, omit, omit, omit); v_createRequest.primitiveContent.locationPolicy.announceTo := {f_getAnnouncementTargetPoA()}; - v_ae1.start(f_CSE_DMR_CRE_016(int10, v_createRequest, mw_createLocationPolicyAnncBase));//LocationPolicy + v_ae1.start(f_CSE_DMR_CRE_020(int10, v_createRequest, mw_createLocationPolicyAnncBase));//LocationPolicy v_ae1.done; } - testcase TC_CSE_DMR_CRE_016_MGO() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_020_MGO() runs on Tester system CseSystem { // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createMgmtObjBase; v_createRequest.primitiveContent.mgmtResource.announceTo := {f_getAnnouncementTargetPoA()}; - v_ae1.start(f_CSE_DMR_CRE_016(int13, v_createRequest, mw_createMgmtObjAnncBase));//MgmtObj + v_ae1.start(f_CSE_DMR_CRE_020(int13, v_createRequest, mw_createMgmtObjAnncBase));//MgmtObj v_ae1.done; } - testcase TC_CSE_DMR_CRE_016_NOD() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_020_NOD() runs on Tester system CseSystem { // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createNodeBase; v_createRequest.primitiveContent.node.announceTo := {f_getAnnouncementTargetPoA()}; - v_ae1.start(f_CSE_DMR_CRE_016(int14, v_createRequest, mw_createNodeAnnc));//Node + v_ae1.start(f_CSE_DMR_CRE_020(int14, v_createRequest, mw_createNodeAnnc));//Node v_ae1.done; } - testcase TC_CSE_DMR_CRE_016_SCH() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_020_SCH() runs on Tester system CseSystem { // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createScheduleBase; v_createRequest.primitiveContent.schedule.announceTo := {f_getAnnouncementTargetPoA()}; - v_ae1.start(f_CSE_DMR_CRE_016(int18, v_createRequest, mw_createScheduleAnncBase));//Schedule + v_ae1.start(f_CSE_DMR_CRE_020(int18, v_createRequest, mw_createScheduleAnncBase));//Schedule v_ae1.done; } - function f_CSE_DMR_CRE_016(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template (present) RequestPrimitive p_requestAnnc) runs on AeSimu { + function f_CSE_DMR_CRE_020(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template (present) RequestPrimitive p_requestAnnc) runs on AeSimu { // Local variables var MsgIn v_response; @@ -4648,8 +6733,8 @@ module OneM2M_Testcases_CSE { mcaPort.send(m_request(v_request)); - vc_cseSimu.start(f_cse_receiveCreateRequest(p_requestAnnc)); - vc_cseSimu.done; + vc_cse1.start(f_cse_receiveCreateRequest(p_requestAnnc)); + vc_cse1.done; // Postamble f_cse_postamble_deleteResources(); @@ -4657,17 +6742,17 @@ module OneM2M_Testcases_CSE { // Tear down f_cf02Down(); - }//end f_CSE_DMR_CRE_016 + }//end f_CSE_DMR_CRE_020 - } // end g_CSE_DMR_CRE_016 + } // end g_CSE_DMR_CRE_020 - group g_CSE_DMR_CRE_017 { + group g_CSE_DMR_CRE_021 { /** * @desc Check that the IUT accepts the creation of a RESOURCE_TYPE resource with the optional attribute announcedAttribute provided * */ - testcase TC_CSE_DMR_CRE_017_CNT() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_021_CNT() runs on Tester system CseSystem { // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createContainerBase; @@ -4679,7 +6764,7 @@ module OneM2M_Testcases_CSE { v_createRequest.primitiveContent.container.maxByteSize := maxByteSize; v_createRequest.primitiveContent.container.announcedAttribute := {"maxByteSize"}; //Correct value? Shall be indicated in TP? - v_ae1.start(f_CSE_DMR_CRE_017(int3, v_createRequest, mw_createContainerAnncBase()));//Container + v_ae1.start(f_CSE_DMR_CRE_021(int3, v_createRequest, mw_createContainerAnncBase()));//Container v_ae1.done; if(getverdict == pass){ @@ -4697,7 +6782,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_CRE_017_CIN() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_021_CIN() runs on Tester system CseSystem { // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createContentInstanceBase; @@ -4709,7 +6794,7 @@ module OneM2M_Testcases_CSE { v_createRequest.primitiveContent.contentInstance.contentSize := v_contentSize; v_createRequest.primitiveContent.contentInstance.announcedAttribute := {"contentSize"}; //Correct value? Shall be indicated in TP? - v_ae1.start(f_CSE_DMR_CRE_017(int4, v_createRequest, mw_createContentInstanceAnncBase()));//ContentInstance + v_ae1.start(f_CSE_DMR_CRE_021(int4, v_createRequest, mw_createContentInstanceAnncBase()));//ContentInstance v_ae1.done; if(getverdict == pass){ @@ -4727,7 +6812,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_CRE_017_GRP() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_021_GRP() runs on Tester system CseSystem { // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createGroupBase; @@ -4738,7 +6823,7 @@ module OneM2M_Testcases_CSE { v_createRequest.primitiveContent.group_.maxNrOfMembers := maxNrOfMembers; v_createRequest.primitiveContent.group_.announcedAttribute := {"maxNrOfMembers"}; //Correct value? Shall be indicated in TP? - v_ae1.start(f_CSE_DMR_CRE_017(int9, v_createRequest, mw_createGroupAnncBase()));//Group + v_ae1.start(f_CSE_DMR_CRE_021(int9, v_createRequest, mw_createGroupAnncBase()));//Group v_ae1.done; if(getverdict == pass){ @@ -4756,7 +6841,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_CRE_017_LCP() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_021_LCP() runs on Tester system CseSystem { // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createLocationPolicy(int1, omit, omit, omit, omit); @@ -4767,7 +6852,7 @@ module OneM2M_Testcases_CSE { v_createRequest.primitiveContent.locationPolicy.locationSource := locationSource; v_createRequest.primitiveContent.locationPolicy.announcedAttribute := {"locationSource"}; //Correct value? Shall be indicated in TP? - v_ae1.start(f_CSE_DMR_CRE_017(int10, v_createRequest, mw_createLocationPolicyAnncBase()));//LocationPolicy + v_ae1.start(f_CSE_DMR_CRE_021(int10, v_createRequest, mw_createLocationPolicyAnncBase()));//LocationPolicy v_ae1.done; if(getverdict == pass){ @@ -4785,7 +6870,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_CRE_017_MGO() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_021_MGO() runs on Tester system CseSystem { // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createMgmtObjBase; @@ -4796,7 +6881,7 @@ module OneM2M_Testcases_CSE { v_createRequest.primitiveContent.mgmtResource.description := description; v_createRequest.primitiveContent.mgmtResource.announcedAttribute := {"description"}; //Correct value? Shall be indicated in TP? - v_ae1.start(f_CSE_DMR_CRE_017(int13, v_createRequest, mw_createMgmtObjAnncBase()));//MgmtObj + v_ae1.start(f_CSE_DMR_CRE_021(int13, v_createRequest, mw_createMgmtObjAnncBase()));//MgmtObj v_ae1.done; if(getverdict == pass){ @@ -4814,7 +6899,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_CRE_017_NOD() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_021_NOD() runs on Tester system CseSystem { // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createNodeBase; @@ -4824,11 +6909,11 @@ module OneM2M_Testcases_CSE { //TODO node to be done. hostedCSELink attribute (OA) to be added!!! - v_ae1.start(f_CSE_DMR_CRE_017(int14, v_createRequest, mw_createNodeAnnc));//Node + v_ae1.start(f_CSE_DMR_CRE_021(int14, v_createRequest, mw_createNodeAnnc));//Node v_ae1.done; } - testcase TC_CSE_DMR_CRE_017_SCH() runs on Tester system CseSystem { + testcase TC_CSE_DMR_CRE_021_SCH() runs on Tester system CseSystem { // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_createRequest := m_createScheduleBase; @@ -4839,7 +6924,7 @@ module OneM2M_Testcases_CSE { v_createRequest.primitiveContent.schedule.scheduleElement := scheduleElement; //Correct value? Shall be indicated in TP? v_createRequest.primitiveContent.schedule.announcedAttribute := {"scheduleElement"}; //Correct value? Shall be indicated in TP? - v_ae1.start(f_CSE_DMR_CRE_017(int18, v_createRequest, mw_createScheduleAnncBase()));//Schedule + v_ae1.start(f_CSE_DMR_CRE_021(int18, v_createRequest, mw_createScheduleAnncBase()));//Schedule v_ae1.done; if(getverdict == pass){ @@ -4857,7 +6942,7 @@ module OneM2M_Testcases_CSE { } } - function f_CSE_DMR_CRE_017(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template (present) RequestPrimitive p_requestAnnc) runs on AeSimu{ + function f_CSE_DMR_CRE_021(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template (present) RequestPrimitive p_requestAnnc) runs on AeSimu{ // Local variables var MsgIn v_anncRequest; @@ -4878,15 +6963,15 @@ module OneM2M_Testcases_CSE { // Preamble if (PX_IUT_IS_MN_CSE == true) { - vc_cseSimu.start(f_cse_registrationRemoteCse(m_createRemoteCSEBase)); + vc_cse1.start(f_cse_registrationRemoteCse(m_createRemoteCSEBase)); }else if (PX_IUT_IS_IN_CSE == true) { - vc_cseSimu.start(f_cse_registerRemoteCse(m_createRemoteCSEBase)); + vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSEBase)); } - vc_cseSimu.done; + vc_cse1.done; - vc_cseSimu.start(f_cse_resourceAnnouncementHandler()); + vc_cse1.start(f_cse_resourceAnnouncementHandler()); v_resourceIndex := f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, omit)); - vc_cseSimu.done; + vc_cse1.done; if(p_resourceType == int4) { v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_parentIndex); @@ -4896,11 +6981,11 @@ module OneM2M_Testcases_CSE { // Test Body v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); - vc_cseSimu.start(f_cse_receiveCreateRequest(p_requestAnnc)); + vc_cse1.start(f_cse_receiveCreateRequest(p_requestAnnc)); mcaPort.send(m_request(v_request)); - vc_cseSimu.done; + vc_cse1.done; - vc_request.primitive.requestPrimitive := f_getRemoteCseRequestPrimitive(vc_cseSimu); + vc_request.primitive.requestPrimitive := f_getRequestPrimitive(vc_cse1); // Postamble f_cse_postamble_deleteResources(); @@ -4910,161 +6995,10 @@ module OneM2M_Testcases_CSE { //return v_anncRequest.primitive.requestPrimitive; - }//end f_CSE_DMR_CRE_017 - - } // end g_CSE_DMR_CRE_017 - - group g_CSE_DMR_CRE_020{ - - /** - * @desc Check that the IUT rejects the CREATE Request of a contentInstance resource with error “NOT_ACCEPTABLE†when contentSize exceeds maxByteSize - * - */ - testcase TC_CSE_DMR_CRE_020() runs on AeSimu system CseSystem { - // Local variables - var template RequestPrimitive v_createRequest := m_createContainerBase; - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_containerIndex := -1; - const integer c_maxByteSize := 0; - // Test control - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - - v_createRequest.primitiveContent.container.maxByteSize := c_maxByteSize; - - v_containerIndex := f_cse_createResource(int3, v_createRequest, v_aeIndex); - - // Test Body - v_request := f_getCreateRequestPrimitive(int4, m_createContentInstanceBase, v_containerIndex); + }//end f_CSE_DMR_CRE_021 - mcaPort.send(m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int5207))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Maximum byte size exceeded"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Bad responseStatusCode in response"); - } - - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Accepted creation of contentInstance exceding maximum byte size"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource type 4"); - } - } - - // Postamble - f_cse_postamble_deleteResources(); - - // Tear down - f_cf01Down(); - - }//end TC_CSE_DMR_CRE_020 - - }// end group g_CSE_DMR_CRE_020 - - group g_CSE_DMR_CRE_021{ - - /** - * @desc Check that the IUT updates the currentByteSize attribute in a <container> parent resource when a new <contentInstance> resource is created. - * - */ - testcase TC_CSE_DMR_CRE_021() runs on AeSimu system CseSystem { - // Local variables - var template RequestPrimitive v_createRequest; - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_containerIndex := -1; - var integer v_contentInstanceIndex := -1; - const integer c_maxByteSize := 512; - // Test control - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - - v_createRequest.primitiveContent.container.maxByteSize := c_maxByteSize; - - v_createRequest := m_createContainerBase; + } // end g_CSE_DMR_CRE_021 - v_containerIndex := f_cse_createResource(int3, v_createRequest, v_aeIndex); - - - v_contentInstanceIndex := f_cse_createResource(int4, v_createRequest, v_containerIndex); - - // Test Body - v_request := f_getCreateRequestPrimitive(int4, m_createContentInstanceBase, v_containerIndex); //Default content: "AnyValue" (8 bytes length) - - mcaPort.send(m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": ContentInstance resource created"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error when creating contentInstance resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource type 4"); - } - } - - //Check currentByteSize - mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_containerIndex), f_getOriginator(v_containerIndex)))); - - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - if(v_response.primitive.responsePrimitive.primitiveContent.container.currentByteSize == 8) { //Default content: "AnyValue" (8 bytes length) - setverdict(pass, __SCOPE__ & ": CurrentByteSize attribute in content resource is incremented successfully"); - } - else{ - setverdict(fail, __SCOPE__ & ": CurrentByteSize attribute in content resource not incremented successfully"); - } - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); - } - } - - // Postamble - f_cse_postamble_deleteResources(); - - // Tear down - f_cf01Down(); - - }//end TC_CSE_DMR_CRE_021 - - }// end group g_CSE_DMR_CRE_021 }//end group Create @@ -6418,7 +8352,12 @@ module OneM2M_Testcases_CSE { // Test adapter configuration // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + if(p_resourceType != int2) { //ResourceType != AE + + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + } if(p_resourceType != int1) { @@ -6434,10 +8373,10 @@ module OneM2M_Testcases_CSE { } else { //ResourceType = RemoteCSE - vc_cseSimu.start(f_cse_registerRemoteCse(p_requestPrimitive)); - vc_cseSimu.done; + vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive)); + vc_cse1.done; - v_resourceIndex := f_getRemoteCseResource(vc_cseSimu); + v_resourceIndex := f_getRemoteCseResource(vc_cse1); } @@ -6574,10 +8513,10 @@ module OneM2M_Testcases_CSE { } else { //ResourceType = RemoteCSE - vc_cseSimu.start(f_cse_registerRemoteCse(p_requestPrimitive)); - vc_cseSimu.done; + vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive)); + vc_cse1.done; - v_resourceIndex := f_getRemoteCseResource(vc_cseSimu); + v_resourceIndex := f_getRemoteCseResource(vc_cse1); } @@ -6725,7 +8664,9 @@ module OneM2M_Testcases_CSE { // Test adapter configuration // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + if(p_resourceType != int2) { //ResourceType != AE + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + } if(p_resourceType != int1) { @@ -6740,10 +8681,10 @@ module OneM2M_Testcases_CSE { v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource } else { - vc_cseSimu.start(f_cse_registerRemoteCse(p_requestPrimitive)); - vc_cseSimu.done; + vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive)); + vc_cse1.done; - v_resourceIndex := f_getRemoteCseResource(vc_cseSimu); + v_resourceIndex := f_getRemoteCseResource(vc_cse1); } // Test Body @@ -6894,7 +8835,9 @@ module OneM2M_Testcases_CSE { // Test adapter configuration // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + if(p_resourceType != int2) { //ResourceType != AE + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + } if(p_resourceType != int1) { @@ -6904,15 +8847,15 @@ module OneM2M_Testcases_CSE { } if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource }else{ - vc_cseSimu.start(f_cse_registerRemoteCse(p_requestPrimitive)); - vc_cseSimu.done; + vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive)); + vc_cse1.done; - v_resourceIndex := f_getRemoteCseResource(vc_cseSimu); + v_resourceIndex := f_getRemoteCseResource(vc_cse1); } mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(f_getResourceAddress(v_resourceIndex) , {"pi"}, f_getOriginator(v_aeIndex))));//from AE ID @@ -7147,7 +9090,9 @@ module OneM2M_Testcases_CSE { // Test adapter configuration // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + if(p_resourceType != int2) { //ResourceType != AE + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + } if(p_resourceType != int1) { @@ -7157,15 +9102,15 @@ module OneM2M_Testcases_CSE { } if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource }else{ - vc_cseSimu.start(f_cse_registerRemoteCse(p_requestPrimitive)); - vc_cseSimu.done; + vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive)); + vc_cse1.done; - v_resourceIndex := f_getRemoteCseResource(vc_cseSimu); + v_resourceIndex := f_getRemoteCseResource(vc_cse1); } mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(f_getResourceAddress(v_resourceIndex) , @@ -7288,7 +9233,9 @@ module OneM2M_Testcases_CSE { // Test adapter configuration // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + if(p_resourceType != int2) { //ResourceType != AE + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + } if(p_resourceType != int1) { @@ -7298,15 +9245,15 @@ module OneM2M_Testcases_CSE { } if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource }else{ - vc_cseSimu.start(f_cse_registerRemoteCse(p_requestPrimitive)); - vc_cseSimu.done; + vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive)); + vc_cse1.done; - v_resourceIndex := f_getRemoteCseResource(vc_cseSimu); + v_resourceIndex := f_getRemoteCseResource(vc_cse1); } mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(f_getResourceAddress(v_resourceIndex), @@ -7425,7 +9372,9 @@ module OneM2M_Testcases_CSE { // Test adapter configuration // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + if(p_resourceType != int2) { //ResourceType != AE + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + } if(p_resourceType != int1) { @@ -7435,15 +9384,15 @@ module OneM2M_Testcases_CSE { } if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource }else{ - vc_cseSimu.start(f_cse_registerRemoteCse(p_requestPrimitive)); - vc_cseSimu.done; + vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive)); + vc_cse1.done; - v_resourceIndex := f_getRemoteCseResource(vc_cseSimu); + v_resourceIndex := f_getRemoteCseResource(vc_cse1); } mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(f_getResourceAddress(v_resourceIndex), @@ -11530,12 +13479,12 @@ module OneM2M_Testcases_CSE { } // end g_CSE_DMR_UPD_014 - group g_CSE_DMR_UPD_017{ + group g_CSE_DMR_UPD_015{ /** * @desc Check that the IUT updates successfully the value of the optional attribute OPTIONAL_ATTRIBUTE of the RESOURCE_TYPE resource under CSEBase */ - testcase TC_CSE_DMR_UPD_017_CSR_LBL() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_CSR_LBL() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var Labels v_labels := {"MyLabel"}; var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; @@ -11544,7 +13493,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.remoteCSE.labels := v_labels; - v_ae1.start(f_CSE_DMR_UPD_017(int16, m_createRemoteCSEBase, v_updateRequest));//Remote CSE + v_ae1.start(f_CSE_DMR_UPD_015(int16, m_createRemoteCSEBase, v_updateRequest));//Remote CSE v_ae1.done; @@ -11569,7 +13518,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_CSR_POA() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_CSR_POA() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var PoaList v_poaList := {"http://" & PX_AE2_ADDRESS & "/"}; var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; @@ -11578,7 +13527,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.remoteCSE.pointOfAccess := v_poaList; - v_ae1.start(f_CSE_DMR_UPD_017(int16, m_createRemoteCSEBase, v_updateRequest));//Remote CSE + v_ae1.start(f_CSE_DMR_UPD_015(int16, m_createRemoteCSEBase, v_updateRequest));//Remote CSE v_ae1.done; @@ -11603,7 +13552,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_CSR_NL() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_CSR_NL() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var XSD.AnyURI v_nodeLink := "MyNodeId"; var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; @@ -11612,7 +13561,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.remoteCSE.nodeLink := v_nodeLink; - v_ae1.start(f_CSE_DMR_UPD_017(int16, m_createRemoteCSEBase, v_updateRequest));//Remote CSE + v_ae1.start(f_CSE_DMR_UPD_015(int16, m_createRemoteCSEBase, v_updateRequest));//Remote CSE v_ae1.done; @@ -11637,7 +13586,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_NOD_LBL() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_NOD_LBL() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var Labels v_labels := {"MyLabel"}; var template RequestPrimitive v_updateRequest := m_updateNodeBase; @@ -11646,7 +13595,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.node.labels := v_labels; - v_ae1.start(f_CSE_DMR_UPD_017(int9, m_createNodeBase, v_updateRequest));//Node + v_ae1.start(f_CSE_DMR_UPD_015(int9, m_createNodeBase, v_updateRequest));//Node v_ae1.done; @@ -11671,7 +13620,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_NOD_ACPI() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_NOD_ACPI() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_updateRequest := m_updateNodeBase; var RequestPrimitive v_updateRequestPrimitive; @@ -11679,7 +13628,7 @@ module OneM2M_Testcases_CSE { var PrimitiveContent v_primitiveContentRetrieveResource; - v_ae1.start(f_CSE_DMR_UPD_017(int9, m_createNodeBase, v_updateRequest, true));//Node + v_ae1.start(f_CSE_DMR_UPD_015(int9, m_createNodeBase, v_updateRequest, true));//Node v_ae1.done; @@ -11707,12 +13656,12 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_NOD_HCL() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_NOD_HCL() runs on Tester system CseSystem { /* TO BE DONE */ } - testcase TC_CSE_DMR_UPD_017_AE_LBL() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_AE_LBL() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var Labels v_labels := {"MyLabel"}; var template RequestPrimitive v_updateRequest := m_updateAE; @@ -11721,7 +13670,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.aE.labels := v_labels; - v_ae1.start(f_CSE_DMR_UPD_017(int2, m_createAe(PX_APP_ID), v_updateRequest));//AE + v_ae1.start(f_CSE_DMR_UPD_015(int2, m_createAe(PX_APP_ID), v_updateRequest));//AE v_ae1.done; @@ -11746,14 +13695,14 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_AE_ACPI() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_AE_ACPI() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_updateRequest := m_updateAE; var RequestPrimitive v_updateRequestPrimitive; var ResponsePrimitive v_responsePrimitive; var PrimitiveContent v_primitiveContentRetrieveResource; - v_ae1.start(f_CSE_DMR_UPD_017(int2, m_createAe(PX_APP_ID), v_updateRequest, true));//AE + v_ae1.start(f_CSE_DMR_UPD_015(int2, m_createAe(PX_APP_ID), v_updateRequest, true));//AE v_ae1.done; @@ -11780,7 +13729,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_AE_APN() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_AE_APN() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var XSD.String v_appName := "MyAppName"; var template RequestPrimitive v_updateRequest := m_updateAE; @@ -11788,7 +13737,7 @@ module OneM2M_Testcases_CSE { var PrimitiveContent v_primitiveContentRetrieveResource; v_updateRequest.primitiveContent.aE.appName := v_appName; - v_ae1.start(f_CSE_DMR_UPD_017(int2, m_createAe(PX_APP_ID), v_updateRequest));//AE + v_ae1.start(f_CSE_DMR_UPD_015(int2, m_createAe(PX_APP_ID), v_updateRequest));//AE v_ae1.done; @@ -11813,7 +13762,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_AE_POA() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_AE_POA() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var PoaList v_poaList := {"http://" & PX_AE2_ADDRESS & "/"}; var template RequestPrimitive v_updateRequest := m_updateAE; @@ -11821,7 +13770,7 @@ module OneM2M_Testcases_CSE { var PrimitiveContent v_primitiveContentRetrieveResource; v_updateRequest.primitiveContent.aE.pointOfAccess := v_poaList; - v_ae1.start(f_CSE_DMR_UPD_017(int2, m_createAe(PX_APP_ID), v_updateRequest));//AE + v_ae1.start(f_CSE_DMR_UPD_015(int2, m_createAe(PX_APP_ID), v_updateRequest));//AE v_ae1.done; @@ -11846,7 +13795,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_AE_OR() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_AE_OR() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var XSD.AnyURI v_ontoLogyRef := "MyOntologyRef"; var template RequestPrimitive v_updateRequest := m_updateAE; @@ -11854,7 +13803,7 @@ module OneM2M_Testcases_CSE { var PrimitiveContent v_primitiveContentRetrieveResource; v_updateRequest.primitiveContent.aE.ontologyRef := v_ontoLogyRef; - v_ae1.start(f_CSE_DMR_UPD_017(int2, m_createAe(PX_APP_ID), v_updateRequest));//AE + v_ae1.start(f_CSE_DMR_UPD_015(int2, m_createAe(PX_APP_ID), v_updateRequest));//AE v_ae1.done; @@ -11879,7 +13828,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_CNT_LBL() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_CNT_LBL() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var Labels v_labels := {"MyLabel"}; var template RequestPrimitive v_updateRequest := m_updateContainerBase; @@ -11888,7 +13837,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.container.labels := v_labels; - v_ae1.start(f_CSE_DMR_UPD_017(int3, m_createContainerBase, v_updateRequest));//Container + v_ae1.start(f_CSE_DMR_UPD_015(int3, m_createContainerBase, v_updateRequest));//Container v_ae1.done; @@ -11913,14 +13862,14 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_CNT_ACPI() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_CNT_ACPI() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_updateRequest := m_updateContainerBase; var RequestPrimitive v_updateRequestPrimitive; var ResponsePrimitive v_responsePrimitive; var PrimitiveContent v_primitiveContentRetrieveResource; - v_ae1.start(f_CSE_DMR_UPD_017(int3, m_createContainerBase, v_updateRequest, true));//Container + v_ae1.start(f_CSE_DMR_UPD_015(int3, m_createContainerBase, v_updateRequest, true));//Container v_ae1.done; @@ -11947,7 +13896,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_CNT_MNI() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_CNT_MNI() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var XSD.NonNegativeInteger v_maxNrOfInstances := 5; var template RequestPrimitive v_updateRequest := m_updateContainerBase; @@ -11956,7 +13905,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.container.maxNrOfInstances := v_maxNrOfInstances; - v_ae1.start(f_CSE_DMR_UPD_017(int3, m_createContainerBase, v_updateRequest));//Container + v_ae1.start(f_CSE_DMR_UPD_015(int3, m_createContainerBase, v_updateRequest));//Container v_ae1.done; @@ -11981,7 +13930,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_CNT_MBS() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_CNT_MBS() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var XSD.NonNegativeInteger v_maxByteSize := 512; var template RequestPrimitive v_updateRequest := m_updateContainerBase; @@ -11990,7 +13939,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.container.maxByteSize := v_maxByteSize; - v_ae1.start(f_CSE_DMR_UPD_017(int3, m_createContainerBase, v_updateRequest));//Container + v_ae1.start(f_CSE_DMR_UPD_015(int3, m_createContainerBase, v_updateRequest));//Container v_ae1.done; @@ -12015,7 +13964,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_CNT_MIA() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_CNT_MIA() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var XSD.NonNegativeInteger v_maxInstanceAge := 1; var template RequestPrimitive v_updateRequest := m_updateContainerBase; @@ -12024,7 +13973,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.container.maxInstanceAge := v_maxInstanceAge; - v_ae1.start(f_CSE_DMR_UPD_017(int3, m_createContainerBase, v_updateRequest));//Container + v_ae1.start(f_CSE_DMR_UPD_015(int3, m_createContainerBase, v_updateRequest));//Container v_ae1.done; @@ -12049,7 +13998,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_CNT_OR() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_CNT_OR() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var XSD.AnyURI v_ontoLogyRef := "MyOntologyRef"; var template RequestPrimitive v_updateRequest := m_updateContainerBase; @@ -12058,7 +14007,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.container.ontologyRef := v_ontoLogyRef; - v_ae1.start(f_CSE_DMR_UPD_017(int3, m_createContainerBase, v_updateRequest));//Container + v_ae1.start(f_CSE_DMR_UPD_015(int3, m_createContainerBase, v_updateRequest));//Container v_ae1.done; @@ -12083,7 +14032,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_CNT_LI() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_CNT_LI() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var XSD.AnyURI v_locationID := "MyLocationID"; var template RequestPrimitive v_updateRequest := m_updateContainerBase; @@ -12092,7 +14041,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.container.locationID := v_locationID; - v_ae1.start(f_CSE_DMR_UPD_017(int3, m_createContainerBase, v_updateRequest));//Container + v_ae1.start(f_CSE_DMR_UPD_015(int3, m_createContainerBase, v_updateRequest));//Container v_ae1.done; @@ -12117,7 +14066,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_ACP_LBL() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_ACP_LBL() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var Labels v_labels := {"MyLabel"}; var template RequestPrimitive v_updateRequest := m_updateAcpBase; @@ -12126,7 +14075,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.accessControlPolicy.labels := v_labels; - v_ae1.start(f_CSE_DMR_UPD_017(int1, m_createAcpBase, v_updateRequest));//AccessControlPolicy + v_ae1.start(f_CSE_DMR_UPD_015(int1, m_createAcpBase, v_updateRequest));//AccessControlPolicy v_ae1.done; @@ -12151,14 +14100,14 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_SUB_ACPI() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_SUB_ACPI() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; var RequestPrimitive v_updateRequestPrimitive; var ResponsePrimitive v_responsePrimitive; var PrimitiveContent v_primitiveContentRetrieveResource; - v_ae1.start(f_CSE_DMR_UPD_017(int23, m_createSubscriptionBase, v_updateRequest, true));//Subscription + v_ae1.start(f_CSE_DMR_UPD_015(int23, m_createSubscriptionBase, v_updateRequest, true));//Subscription v_ae1.done; @@ -12185,7 +14134,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_SUB_LBL() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_SUB_LBL() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var Labels v_labels := {"MyLabel"}; var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; @@ -12193,7 +14142,7 @@ module OneM2M_Testcases_CSE { var PrimitiveContent v_primitiveContentRetrieveResource; v_updateRequest.primitiveContent.subscription.labels := v_labels; - v_ae1.start(f_CSE_DMR_UPD_017(int23, m_createSubscriptionBase, v_updateRequest));//Subscription + v_ae1.start(f_CSE_DMR_UPD_015(int23, m_createSubscriptionBase, v_updateRequest));//Subscription v_ae1.done; @@ -12218,7 +14167,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_SUB_ENC() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_SUB_ENC() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var EventNotificationCriteria v_eventNotificationCriteria:= valueof(m_eventNotificationCriteria({int3}, -)); var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; @@ -12226,7 +14175,7 @@ module OneM2M_Testcases_CSE { var PrimitiveContent v_primitiveContentRetrieveResource; v_updateRequest.primitiveContent.subscription.eventNotificationCriteria:=v_eventNotificationCriteria ; - v_ae1.start(f_CSE_DMR_UPD_017(int23, m_createSubscriptionBase, v_updateRequest));//Subscription + v_ae1.start(f_CSE_DMR_UPD_015(int23, m_createSubscriptionBase, v_updateRequest));//Subscription v_ae1.done; @@ -12251,7 +14200,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_SUB_EXC() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_SUB_EXC() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var XSD.PositiveInteger v_expirationCounter:=10; var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; @@ -12259,7 +14208,7 @@ module OneM2M_Testcases_CSE { var PrimitiveContent v_primitiveContentRetrieveResource; v_updateRequest.primitiveContent.subscription.expirationCounter:=v_expirationCounter; - v_ae1.start(f_CSE_DMR_UPD_017(int23, m_createSubscriptionBase, v_updateRequest));//Subscription + v_ae1.start(f_CSE_DMR_UPD_015(int23, m_createSubscriptionBase, v_updateRequest));//Subscription v_ae1.done; @@ -12284,7 +14233,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_SUB_GPI() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_SUB_GPI() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var XSD.AnyURI v_groupID := "MyGroupID"; var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; @@ -12292,7 +14241,7 @@ module OneM2M_Testcases_CSE { var PrimitiveContent v_primitiveContentRetrieveResource; v_updateRequest.primitiveContent.subscription.groupID:=v_groupID; - v_ae1.start(f_CSE_DMR_UPD_017(int23, m_createSubscriptionBase, v_updateRequest));//Subscription + v_ae1.start(f_CSE_DMR_UPD_015(int23, m_createSubscriptionBase, v_updateRequest));//Subscription v_ae1.done; @@ -12317,7 +14266,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_SUB_NFU() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_SUB_NFU() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var XSD.AnyURI v_notificationForwardingURI:= "MyNotificationForwardingURI"; var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; @@ -12325,7 +14274,7 @@ module OneM2M_Testcases_CSE { var PrimitiveContent v_primitiveContentRetrieveResource; v_updateRequest.primitiveContent.subscription.notificationForwardingURI:=v_notificationForwardingURI; - v_ae1.start(f_CSE_DMR_UPD_017(int23, m_createSubscriptionBase, v_updateRequest));//Subscription + v_ae1.start(f_CSE_DMR_UPD_015(int23, m_createSubscriptionBase, v_updateRequest));//Subscription v_ae1.done; @@ -12350,7 +14299,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_SUB_BN() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_SUB_BN() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var BatchNotify v_batchNotify:= {1, "PT1S"}; var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; @@ -12358,7 +14307,7 @@ module OneM2M_Testcases_CSE { var PrimitiveContent v_primitiveContentRetrieveResource; v_updateRequest.primitiveContent.subscription.batchNotify:=v_batchNotify; - v_ae1.start(f_CSE_DMR_UPD_017(int23, m_createSubscriptionBase, v_updateRequest));//Subscription + v_ae1.start(f_CSE_DMR_UPD_015(int23, m_createSubscriptionBase, v_updateRequest));//Subscription v_ae1.done; @@ -12383,7 +14332,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_SUB_RL() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_SUB_RL() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var RateLimit v_rateLimit:= {2, "PT1S"}; var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; @@ -12391,7 +14340,7 @@ module OneM2M_Testcases_CSE { var PrimitiveContent v_primitiveContentRetrieveResource; v_updateRequest.primitiveContent.subscription.rateLimit:=v_rateLimit; - v_ae1.start(f_CSE_DMR_UPD_017(int23, m_createSubscriptionBase, v_updateRequest));//Subscription + v_ae1.start(f_CSE_DMR_UPD_015(int23, m_createSubscriptionBase, v_updateRequest));//Subscription v_ae1.done; @@ -12416,7 +14365,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_SUB_PN() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_SUB_PN() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var PendingNotification v_pendingNotification:=int2; var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; @@ -12424,7 +14373,7 @@ module OneM2M_Testcases_CSE { var PrimitiveContent v_primitiveContentRetrieveResource; v_updateRequest.primitiveContent.subscription.pendingNotification:=v_pendingNotification; - v_ae1.start(f_CSE_DMR_UPD_017(int23, m_createSubscriptionBase, v_updateRequest));//Subscription + v_ae1.start(f_CSE_DMR_UPD_015(int23, m_createSubscriptionBase, v_updateRequest));//Subscription v_ae1.done; @@ -12449,7 +14398,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_SUB_NSP() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_SUB_NSP() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var XSD.PositiveInteger v_notificationStoragePriority:=10; var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; @@ -12457,7 +14406,7 @@ module OneM2M_Testcases_CSE { var PrimitiveContent v_primitiveContentRetrieveResource; v_updateRequest.primitiveContent.subscription.notificationStoragePriority:=v_notificationStoragePriority; - v_ae1.start(f_CSE_DMR_UPD_017(int23, m_createSubscriptionBase, v_updateRequest));//Subscription + v_ae1.start(f_CSE_DMR_UPD_015(int23, m_createSubscriptionBase, v_updateRequest));//Subscription v_ae1.done; @@ -12482,7 +14431,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_SUB_LN() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_SUB_LN() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var XSD.Boolean v_latestNotify:=true; var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; @@ -12490,7 +14439,7 @@ module OneM2M_Testcases_CSE { var PrimitiveContent v_primitiveContentRetrieveResource; v_updateRequest.primitiveContent.subscription.latestNotify:=v_latestNotify; - v_ae1.start(f_CSE_DMR_UPD_017(int23, m_createSubscriptionBase, v_updateRequest));//Subscription + v_ae1.start(f_CSE_DMR_UPD_015(int23, m_createSubscriptionBase, v_updateRequest));//Subscription v_ae1.done; @@ -12515,7 +14464,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_SUB_NEC() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_SUB_NEC() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var EventCat v_eventCat:= {alt_1:= 300}; var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; @@ -12523,7 +14472,7 @@ module OneM2M_Testcases_CSE { var PrimitiveContent v_primitiveContentRetrieveResource; v_updateRequest.primitiveContent.subscription.notificationEventCat:=v_eventCat; - v_ae1.start(f_CSE_DMR_UPD_017(int23, m_createSubscriptionBase, v_updateRequest));//Subscription + v_ae1.start(f_CSE_DMR_UPD_015(int23, m_createSubscriptionBase, v_updateRequest));//Subscription v_ae1.done; @@ -12548,7 +14497,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_GRP_LBL() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_GRP_LBL() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var Labels v_labels := {"MyLabel"}; var template RequestPrimitive v_updateRequest := m_updateGroupBase; @@ -12556,7 +14505,7 @@ module OneM2M_Testcases_CSE { var PrimitiveContent v_primitiveContentRetrieveResource; v_updateRequest.primitiveContent.group_.labels := v_labels; - v_ae1.start(f_CSE_DMR_UPD_017(int9, m_createGroupBase, v_updateRequest));//Group + v_ae1.start(f_CSE_DMR_UPD_015(int9, m_createGroupBase, v_updateRequest));//Group v_ae1.done; @@ -12581,14 +14530,14 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_GRP_ACPI() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_GRP_ACPI() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_updateRequest := m_updateGroupBase; var RequestPrimitive v_updateRequestPrimitive; var ResponsePrimitive v_responsePrimitive; var PrimitiveContent v_primitiveContentRetrieveResource; - v_ae1.start(f_CSE_DMR_UPD_017(int9, m_createGroupBase, v_updateRequest, true));//Group + v_ae1.start(f_CSE_DMR_UPD_015(int9, m_createGroupBase, v_updateRequest, true));//Group v_ae1.done; @@ -12615,7 +14564,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_GRP_MACP() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_GRP_MACP() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var ListOfURIs v_membersAccessControlPolicyIDs := {"NotInitialized"}; var template RequestPrimitive v_updateRequest := m_updateGroupBase; @@ -12623,7 +14572,7 @@ module OneM2M_Testcases_CSE { var PrimitiveContent v_primitiveContentRetrieveResource; v_updateRequest.primitiveContent.group_.membersAccessControlPolicyIDs := v_membersAccessControlPolicyIDs; - v_ae1.start(f_CSE_DMR_UPD_017(int9, m_createGroupBase, v_updateRequest));//Group + v_ae1.start(f_CSE_DMR_UPD_015(int9, m_createGroupBase, v_updateRequest));//Group v_ae1.done; @@ -12648,7 +14597,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_017_GRP_GN() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_015_GRP_GN() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var XSD.String v_groupName:="MyGroupName"; var template RequestPrimitive v_updateRequest := m_updateGroupBase; @@ -12656,7 +14605,7 @@ module OneM2M_Testcases_CSE { var PrimitiveContent v_primitiveContentRetrieveResource; v_updateRequest.primitiveContent.group_.groupName := v_groupName; - v_ae1.start(f_CSE_DMR_UPD_017(int9, m_createGroupBase, v_updateRequest));//Group + v_ae1.start(f_CSE_DMR_UPD_015(int9, m_createGroupBase, v_updateRequest));//Group v_ae1.done; @@ -12681,7 +14630,7 @@ module OneM2M_Testcases_CSE { } } - function f_CSE_DMR_UPD_017(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, boolean p_secondAcp := false) runs on AeSimu { + function f_CSE_DMR_UPD_015(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, boolean p_secondAcp := false) runs on AeSimu { //Local variables var MsgIn v_response; var AcpType v_acpi; @@ -12703,7 +14652,9 @@ module OneM2M_Testcases_CSE { // Test adapter configuration // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + if(p_resourceType != int2) { + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + } if(p_resourceType != int1) { @@ -12727,10 +14678,10 @@ module OneM2M_Testcases_CSE { v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive);//under the CSEBase resource } else { //ResourceType = RemoteCSE - vc_cseSimu.start(f_cse_registerRemoteCse(p_createRequestPrimitive)); - vc_cseSimu.done; + vc_cse1.start(f_cse_registerRemoteCse(p_createRequestPrimitive)); + vc_cse1.done; - v_resourceIndex := f_getRemoteCseResource(vc_cseSimu); + v_resourceIndex := f_getRemoteCseResource(vc_cse1); } //Test Body @@ -12764,16 +14715,16 @@ module OneM2M_Testcases_CSE { // Tear down f_cf02Down(); - } // end function f_CSE_DMR_UPD_017 + } // end function f_CSE_DMR_UPD_015 } // end group g_CSE_DMR_UPD_017 - group g_CSE_DMR_UPD_018 { + group g_CSE_DMR_UPD_016 { /** * @desc Check that the IUT updates successfully the value of the attribute MANDATORY_ATTRIBUTE of the RESOURCE_TYPE resource under CSEBase */ - testcase TC_CSE_DMR_UPD_018_CSR_ET() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_016_CSR_ET() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var Timestamp v_expirationTime := "20001231T012345"; var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; @@ -12782,7 +14733,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.remoteCSE.expirationTime := v_expirationTime; - v_ae1.start(f_CSE_DMR_UPD_018(int16, m_createRemoteCSEBase, v_updateRequest));//Remote CSE + v_ae1.start(f_CSE_DMR_UPD_016(int16, m_createRemoteCSEBase, v_updateRequest));//Remote CSE v_ae1.done; @@ -12807,7 +14758,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_018_CSR_RR() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_016_CSR_RR() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var XSD.Boolean v_requestReachability := true; var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; @@ -12819,7 +14770,7 @@ module OneM2M_Testcases_CSE { - v_ae1.start(f_CSE_DMR_UPD_018(int16, m_createRemoteCSEBase, v_updateRequest));//Remote CSE + v_ae1.start(f_CSE_DMR_UPD_016(int16, m_createRemoteCSEBase, v_updateRequest));//Remote CSE if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { @@ -12840,7 +14791,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_018_NOD_ET() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_016_NOD_ET() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var Timestamp v_expirationTime := "20001231T012345"; var template RequestPrimitive v_updateRequest := m_updateNodeBase; @@ -12849,7 +14800,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.node.expirationTime := v_expirationTime; - v_ae1.start(f_CSE_DMR_UPD_018(int9, m_createNodeBase, v_updateRequest));//Node + v_ae1.start(f_CSE_DMR_UPD_016(int9, m_createNodeBase, v_updateRequest));//Node v_ae1.done; @@ -12874,7 +14825,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_018_NOD_NI() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_016_NOD_NI() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var template RequestPrimitive v_updateRequest := m_updateNodeBase; var XSD.Token v_targetId := "TARGET-ID"; @@ -12883,7 +14834,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.node.nodeID := v_targetId; - v_ae1.start(f_CSE_DMR_UPD_018(int9, m_createNodeBase, v_updateRequest));//Node + v_ae1.start(f_CSE_DMR_UPD_016(int9, m_createNodeBase, v_updateRequest));//Node v_ae1.done; @@ -12908,7 +14859,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_018_AE_ET() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_016_AE_ET() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var Timestamp v_expirationTime := "20001231T012345"; var template RequestPrimitive v_updateRequest := m_updateAE; @@ -12917,7 +14868,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.aE.expirationTime := v_expirationTime; - v_ae1.start(f_CSE_DMR_UPD_018(int2, m_createAe(PX_APP_ID), v_updateRequest));//AE + v_ae1.start(f_CSE_DMR_UPD_016(int2, m_createAe(PX_APP_ID), v_updateRequest));//AE v_ae1.done; @@ -12942,7 +14893,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_018_AE_RR() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_016_AE_RR() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var XSD.Boolean v_requestReachability := true; var template RequestPrimitive v_updateRequest := m_updateAE; @@ -12951,7 +14902,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.aE.requestReachability := v_requestReachability; - v_ae1.start(f_CSE_DMR_UPD_018(int2, m_createAe(PX_APP_ID), v_updateRequest));//AE + v_ae1.start(f_CSE_DMR_UPD_016(int2, m_createAe(PX_APP_ID), v_updateRequest));//AE v_ae1.done; @@ -12976,7 +14927,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_018_CNT_ET() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_016_CNT_ET() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var Timestamp v_expirationTime := "20001231T012345"; var template RequestPrimitive v_updateRequest := m_updateContainerBase; @@ -12985,7 +14936,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.container.expirationTime := v_expirationTime; - v_ae1.start(f_CSE_DMR_UPD_018(int3, m_createContainerBase, v_updateRequest));//Container + v_ae1.start(f_CSE_DMR_UPD_016(int3, m_createContainerBase, v_updateRequest));//Container v_ae1.done; @@ -13010,7 +14961,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_018_ACP_ET() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_016_ACP_ET() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var Timestamp v_expirationTime := "20001231T012345"; var template RequestPrimitive v_updateRequest := m_updateAcpBase; @@ -13019,7 +14970,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.accessControlPolicy.expirationTime := v_expirationTime; - v_ae1.start(f_CSE_DMR_UPD_018(int1, m_createAcpBase, v_updateRequest));//AccessControlPolicy + v_ae1.start(f_CSE_DMR_UPD_016(int1, m_createAcpBase, v_updateRequest));//AccessControlPolicy v_ae1.done; @@ -13044,7 +14995,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_018_ACP_PV() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_016_ACP_PV() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var SetOfAcrs v_privileges_1 := {{valueof(m_createAcr({PX_SUPER_AE_ID}, int61))}}; var template RequestPrimitive v_updateRequest := m_updateAcpBase; @@ -13052,7 +15003,7 @@ module OneM2M_Testcases_CSE { var PrimitiveContent v_primitiveContentRetrieveResource; v_updateRequest.primitiveContent.accessControlPolicy.privileges := v_privileges_1; - v_ae1.start(f_CSE_DMR_UPD_018(int1, m_createAcpBase, v_updateRequest));//AccessControlPolicy + v_ae1.start(f_CSE_DMR_UPD_016(int1, m_createAcpBase, v_updateRequest));//AccessControlPolicy v_ae1.done; @@ -13077,7 +15028,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_018_ACP_PVS() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_016_ACP_PVS() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var SetOfAcrs v_privileges_1 := {{valueof(m_createAcr({PX_SUPER_AE_ID}, int61))}}; var template RequestPrimitive v_updateRequest := m_updateAcpBase; @@ -13085,7 +15036,7 @@ module OneM2M_Testcases_CSE { var PrimitiveContent v_primitiveContentRetrieveResource; v_updateRequest.primitiveContent.accessControlPolicy.selfPrivileges := v_privileges_1; - v_ae1.start(f_CSE_DMR_UPD_018(int1, m_createAcpBase, v_updateRequest));//AccessControlPolicy + v_ae1.start(f_CSE_DMR_UPD_016(int1, m_createAcpBase, v_updateRequest));//AccessControlPolicy v_ae1.done; @@ -13110,7 +15061,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_018_SUB_ET() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_016_SUB_ET() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var Timestamp v_expirationTime := "20001231T012345"; var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; @@ -13119,7 +15070,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.subscription.expirationTime := v_expirationTime; - v_ae1.start(f_CSE_DMR_UPD_018(int23, m_createSubscriptionBase, v_updateRequest));//Subscription + v_ae1.start(f_CSE_DMR_UPD_016(int23, m_createSubscriptionBase, v_updateRequest));//Subscription v_ae1.done; @@ -13145,7 +15096,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_018_SUB_NU() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_016_SUB_NU() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var ListOfURIs v_notificationURI := {"NotReachableNotificationURI"}; var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; @@ -13154,7 +15105,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.subscription.notificationURI := v_notificationURI; - v_ae1.start(f_CSE_DMR_UPD_018(int23, m_createSubscriptionBase, v_updateRequest));//Subscription + v_ae1.start(f_CSE_DMR_UPD_016(int23, m_createSubscriptionBase, v_updateRequest));//Subscription v_ae1.done; @@ -13179,7 +15130,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_018_SUB_NCT() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_016_SUB_NCT() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var NotificationContentType v_notificationContentType := int2; var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; @@ -13188,7 +15139,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.subscription.notificationContentType := v_notificationContentType; - v_ae1.start(f_CSE_DMR_UPD_018(int23, m_createSubscriptionBase, v_updateRequest));//Subscription + v_ae1.start(f_CSE_DMR_UPD_016(int23, m_createSubscriptionBase, v_updateRequest));//Subscription v_ae1.done; @@ -13213,7 +15164,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_018_GRP_ET() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_016_GRP_ET() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var Timestamp v_expirationTime := "20001231T012345"; var template RequestPrimitive v_updateRequest := m_updateGroupBase; @@ -13222,7 +15173,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.group_.expirationTime := v_expirationTime; - v_ae1.start(f_CSE_DMR_UPD_018(int9, m_createGroupBase, v_updateRequest));//Group + v_ae1.start(f_CSE_DMR_UPD_016(int9, m_createGroupBase, v_updateRequest));//Group v_ae1.done; @@ -13247,7 +15198,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_018_GRP_MNM() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_016_GRP_MNM() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var XSD.PositiveInteger v_maxNrOfMembers := 10; var template RequestPrimitive v_updateRequest := m_updateGroupBase; @@ -13256,7 +15207,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.group_.maxNrOfMembers := v_maxNrOfMembers; - v_ae1.start(f_CSE_DMR_UPD_018(int9, m_createGroupBase, v_updateRequest));//Group + v_ae1.start(f_CSE_DMR_UPD_016(int9, m_createGroupBase, v_updateRequest));//Group v_ae1.done; @@ -13281,7 +15232,7 @@ module OneM2M_Testcases_CSE { } } - testcase TC_CSE_DMR_UPD_018_GRP_MID() runs on Tester system CseSystem { + testcase TC_CSE_DMR_UPD_016_GRP_MID() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; var ListOfURIs v_memberIDs := {"NotInitialized"}; var template RequestPrimitive v_updateRequest := m_updateGroupBase; @@ -13290,7 +15241,7 @@ module OneM2M_Testcases_CSE { v_updateRequest.primitiveContent.group_.memberIDs := v_memberIDs; - v_ae1.start(f_CSE_DMR_UPD_018(int9, m_createGroupBase, v_updateRequest));//Group + v_ae1.start(f_CSE_DMR_UPD_016(int9, m_createGroupBase, v_updateRequest));//Group v_ae1.done; @@ -13315,7 +15266,7 @@ module OneM2M_Testcases_CSE { } } - function f_CSE_DMR_UPD_018(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu { + function f_CSE_DMR_UPD_016(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu { //Local variables var MsgIn v_response; var RequestPrimitive v_request; @@ -13336,7 +15287,9 @@ module OneM2M_Testcases_CSE { // Test adapter configuration // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + if(p_resourceType != int2) { + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + } if(p_resourceType != int1) { @@ -13351,10 +15304,10 @@ module OneM2M_Testcases_CSE { v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive);//under the CSEBase resource } else { //ResourceType = RemoteCSE - vc_cseSimu.start(f_cse_registerRemoteCse(p_createRequestPrimitive)); - vc_cseSimu.done; + vc_cse1.start(f_cse_registerRemoteCse(p_createRequestPrimitive)); + vc_cse1.done; - v_resourceIndex := f_getRemoteCseResource(vc_cseSimu); + v_resourceIndex := f_getRemoteCseResource(vc_cse1); } //Test Body @@ -13388,9 +15341,9 @@ module OneM2M_Testcases_CSE { // Tear down f_cf02Down(); - } //end function f_CSE_DMR_UPD_018 + } //end function f_CSE_DMR_UPD_016 - } // end group g_CSE_DMR_UPD_018 + } // end group g_CSE_DMR_UPD_016 }//end group Update @@ -13519,10 +15472,10 @@ module OneM2M_Testcases_CSE { f_checkAeSimuStatus(); //Check to see if the resource is present or not - if (f_isResourcePresent(v_resourceIndex)){ - setverdict(fail, __SCOPE__ & ":INFO: Resource not deleted"); + if (f_isResourceNotPresent(v_aeIndex, f_getResourceName(vc_resourcesList[v_resourceIndex].resource))){ + setverdict(pass, __SCOPE__ & ":INFO: Resource deleted"); } else { - setverdict(pass, __SCOPE__ & ":ERROR: Resource deleted"); + setverdict(fail, __SCOPE__ & ":ERROR: Resource not deleted"); } // Postamble