diff --git a/OneM2M_Testcases_CSE_Release_3.ttcn b/OneM2M_Testcases_CSE_Release_3.ttcn index 78866f5e78d602a24e08d425abe88997316c1b4a..b950a1997d564966a50f2e5b463da53cf8c870b4 100644 --- a/OneM2M_Testcases_CSE_Release_3.ttcn +++ b/OneM2M_Testcases_CSE_Release_3.ttcn @@ -6290,7 +6290,6 @@ module OneM2M_Testcases_CSE_Release_3 { function f_CSE_LOC_001() runs on AeSimu system CseSystem { - var integer v_aeAuxIndex := -1; var LocationSource v_locationSource := int1;//Network-based var ListOfDuration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD; var LocationTargetID locationTargetID := PX_LOCATION_TARGET_ID; @@ -6303,10 +6302,10 @@ module OneM2M_Testcases_CSE_Release_3 { f_cf01Up(); //Preamble - v_aeAuxIndex := f_cse_preamble_registerAe(); + vc_aeIndex := f_cse_preamble_registerAe(); //Set requestPrimitive - v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress), v_aeAuxIndex); + v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress), vc_aeIndex); //Test Body f_send(e_mcaPort, m_request(v_request)); @@ -6333,7 +6332,7 @@ module OneM2M_Testcases_CSE_Release_3 { f_checkAeSimuStatus(); //Check to see if the resource is NOT present - if(f_cse_isResourceNotPresent(v_aeAuxIndex, f_getResourceName(v_request.primitiveContent))){ + if(f_cse_isResourceNotPresent(vc_aeIndex, f_getResourceName(v_request.primitiveContent))){ setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); } else { setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); @@ -6367,7 +6366,6 @@ module OneM2M_Testcases_CSE_Release_3 { function f_CSE_LOC_002() runs on AeSimu system CseSystem { - var integer v_aeAuxIndex := -1; var LocationSource v_locationSource := int1;//Network-based var ListOfDuration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD; var LocationTargetID locationTargetID := PX_LOCATION_TARGET_ID; @@ -6380,10 +6378,10 @@ module OneM2M_Testcases_CSE_Release_3 { f_cf01Up(); //Preamble - v_aeAuxIndex := f_cse_preamble_registerAe(); + vc_aeIndex := f_cse_preamble_registerAe(); //Set requestPrimitive - v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress), v_aeAuxIndex); + v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress), vc_aeIndex); // Test Body f_send(e_mcaPort, m_request(v_request)); @@ -6393,7 +6391,7 @@ module OneM2M_Testcases_CSE_Release_3 { tc_ac.stop; setverdict(pass, __SCOPE__ & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!"); f_checkAttributesToBeSaved(int10, v_request, v_response.primitive.responsePrimitive); - v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, v_aeAuxIndex); + v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, vc_aeIndex); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; @@ -6601,8 +6599,7 @@ module OneM2M_Testcases_CSE_Release_3 { function f_CSE_LOC_005() runs on AeSimu system CseSystem {//reject an invalid update request with invalid attribtue locationUpdatePeriod - var integer v_aeAuxIndex := -1; - var LocationSource v_locationSource := int1;//Network-based + var LocationSource v_locationSource := int1;//Network-based var ListOfDuration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD; var LocationTargetID locationTargetID := PX_LOCATION_TARGET_ID; var XSD.AnyURI locationServerAddress := PX_LOCATION_SERVER_ADDRESS; @@ -6614,10 +6611,10 @@ module OneM2M_Testcases_CSE_Release_3 { f_cf01Up(); //Preamble - v_aeAuxIndex := f_cse_preamble_registerAe(); + vc_aeIndex := f_cse_preamble_registerAe(); //Set requestPrimitive - v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress), v_aeAuxIndex); + v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress), vc_aeIndex); // Test Body f_send(e_mcaPort, m_request(v_request)); @@ -6631,7 +6628,7 @@ module OneM2M_Testcases_CSE_Release_3 { setverdict(pass, __SCOPE__ & ": Resource locationPolicy is created successfully with locationID included in the respons and with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!"); } f_checkAttributesToBeSaved(int10, v_request, v_response.primitive.responsePrimitive); - v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, v_aeAuxIndex); + v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, vc_aeIndex); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; @@ -6683,7 +6680,6 @@ module OneM2M_Testcases_CSE_Release_3 { function f_CSE_LOC_006() runs on AeSimu system CseSystem { - var integer v_aeAuxIndex := -1; var integer v_locPolicyResourceIndex := -1; var integer v_locContainerResourceIndex := -1; var LocationSource v_locationSource := int1;//Netwok-based @@ -6699,12 +6695,12 @@ module OneM2M_Testcases_CSE_Release_3 { f_cf01Up(); //Preamble - register AE - v_aeAuxIndex := f_cse_preamble_registerAe(); + vc_aeIndex := f_cse_preamble_registerAe(); //Preamble - create a valid locationPolicy resource v_locpolicy_request_preamble := valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress)); - v_container_request_preamble := valueof(m_createContainer(f_getResourceAddress(v_aeAuxIndex), omit));//no location-container name provided? + v_container_request_preamble := valueof(m_createContainer(f_getResourceAddress(vc_aeIndex), omit));//no location-container name provided? - v_locPolicyResourceIndex := f_cse_createResource(int10, v_locpolicy_request_preamble, v_aeAuxIndex);//created locationpolicy index + v_locPolicyResourceIndex := f_cse_createResource(int10, v_locpolicy_request_preamble, vc_aeIndex);//created locationpolicy index v_locContainerResourceIndex := f_cse_createResource(int3, v_container_request_preamble, v_locPolicyResourceIndex);//created container index v_subscription_request_preamble := valueof(m_createSubscription(f_getResourceAddress(v_locContainerResourceIndex), c_defaultResourceName, -)); @@ -6759,7 +6755,6 @@ module OneM2M_Testcases_CSE_Release_3 { function f_CSE_LOC_007() runs on AeSimu system CseSystem { - var integer v_aeAuxIndex := -1; var ListOfDuration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD; var RequestPrimitive v_request; var MsgIn v_response; @@ -6776,9 +6771,9 @@ module OneM2M_Testcases_CSE_Release_3 { f_cf01Up(); //Preamble - v_aeAuxIndex := f_cse_preamble_registerAe(); + vc_aeIndex := f_cse_preamble_registerAe(); //Set requestPrimitive - v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, omit, omit), v_aeAuxIndex); + v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, omit, omit), vc_aeIndex); // Test Body f_send(e_mcaPort, m_request(v_request)); @@ -6788,7 +6783,7 @@ module OneM2M_Testcases_CSE_Release_3 { tc_ac.stop; setverdict(pass, __SCOPE__ & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!"); f_checkAttributesToBeSaved(int10, v_request, v_response.primitive.responsePrimitive); - v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, v_aeAuxIndex); + v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, vc_aeIndex); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; @@ -6838,8 +6833,7 @@ module OneM2M_Testcases_CSE_Release_3 { } function f_CSE_LOC_008() runs on AeSimu system CseSystem { - var integer v_aeAuxIndex := -1; - var LocationSource v_locationSource := int3;//Share-based + var LocationSource v_locationSource := int3;//Share-based var RequestPrimitive v_request; var MsgIn v_response; var integer v_resourceIndex := -1; @@ -6854,9 +6848,9 @@ module OneM2M_Testcases_CSE_Release_3 { f_cf01Up(); //Preamble - v_aeAuxIndex := f_cse_preamble_registerAe(); + vc_aeIndex := f_cse_preamble_registerAe(); //Set requestPrimitive - v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, omit, omit, omit), v_aeAuxIndex); + v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, omit, omit, omit), vc_aeIndex); // Test Body f_send(e_mcaPort, m_request(v_request)); @@ -6866,7 +6860,7 @@ module OneM2M_Testcases_CSE_Release_3 { tc_ac.stop; setverdict(pass, __SCOPE__ & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!"); f_checkAttributesToBeSaved(int10, v_request, v_response.primitive.responsePrimitive); - v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, v_aeAuxIndex); + v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, vc_aeIndex); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; @@ -6979,84 +6973,83 @@ module OneM2M_Testcases_CSE_Release_3 { group g_CSE_LOC_010 { - /** - * @desc Check that the IUT rejects AE to update the locationPolicy resource identified with LOCATION_ID when receiving an update request containing an invalid attribute. - * @see TS-0001 [1], clause 10.2.10.1.3, TS-0004 [2], clause 7.3.3.4 and clause 7.4.11.2 - * @remark TP/oneM2M/CSE/LOC/UPD/001 - */ - testcase TC_CSE_LOC_010() runs on Tester system CseSystem { + /** + * @desc Check that the IUT rejects AE to update the locationPolicy resource identified with LOCATION_ID when receiving an update request containing an invalid attribute. + * @see TS-0001 [1], clause 10.2.10.1.3, TS-0004 [2], clause 7.3.3.4 and clause 7.4.11.2 + * @remark TP/oneM2M/CSE/LOC/UPD/001 + */ + testcase TC_CSE_LOC_010() runs on Tester system CseSystem { - var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var AeSimu v_ae1 := AeSimu.create("AE1") alive; - v_ae1.start(f_CSE_LOC_010()); - v_ae1.done; - } + v_ae1.start(f_CSE_LOC_010()); + v_ae1.done; + } - function f_CSE_LOC_010() runs on AeSimu system CseSystem {//reject an invalid update request with invalid attribtue locationUpdatePeriod - var integer v_aeAuxIndex := -1; - var integer v_locPolicyResourceIndex := -1; - var LocationSource v_locationSource := int1;//Netwok-based - var ListOfDuration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD; - var XSD.Duration locationUpdatePeriod_invalid := c_invalid_location_update_period; - var LocationTargetID locationTargetID := PX_LOCATION_TARGET_ID; - var XSD.AnyURI locationServerAddress := PX_LOCATION_SERVER_ADDRESS; - var RequestPrimitive v_request; - var RequestPrimitive v_locpolicy_request_preamble; - var MsgIn v_response; + function f_CSE_LOC_010() runs on AeSimu system CseSystem {//reject an invalid update request with invalid attribtue locationUpdatePeriod + var integer v_locPolicyResourceIndex := -1; + var LocationSource v_locationSource := int1;//Netwok-based + var ListOfDuration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD; + var XSD.Duration locationUpdatePeriod_invalid := c_invalid_location_update_period; + var LocationTargetID locationTargetID := PX_LOCATION_TARGET_ID; + var XSD.AnyURI locationServerAddress := PX_LOCATION_SERVER_ADDRESS; + var RequestPrimitive v_request; + var RequestPrimitive v_locpolicy_request_preamble; + var MsgIn v_response; - //Test component configuration - f_cf01Up(); - - //Preamble - register AE - v_aeAuxIndex := f_cse_preamble_registerAe(); - //Preamble - create a valid locationPolicy resource for later update use - v_locpolicy_request_preamble := valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress)); - v_locPolicyResourceIndex := f_cse_createResource(int10, v_locpolicy_request_preamble, v_aeAuxIndex); - - //Set requestPrimitive - v_request := f_getUpdateRequestPrimitive(int10, v_locPolicyResourceIndex, m_updateLocationPolicy(f_getResourceAddress(v_locPolicyResourceIndex), omit, locationUpdatePeriod_invalid)); - - // Test Body - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt{ - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Update locationPolicy resource is rejected!!"); - } - [] 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__ & ": Error occurrs with response status code: "& int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)) & "due to IUT failed to handle an invalid locationPolicy update request"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": Timeout due to no response from requested server!"); - } - } - - f_checkAeSimuStatus(); - - //Check to see if the resource is NOT present - if(f_cse_isResourceNotPresent(v_aeAuxIndex, 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 of testcase TC_CSE_LOC_010 + //Test component configuration + f_cf01Up(); + + //Preamble - register AE + vc_aeIndex := f_cse_preamble_registerAe(); + //Preamble - create a valid locationPolicy resource for later update use + v_locpolicy_request_preamble := valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress)); + v_locPolicyResourceIndex := f_cse_createResource(int10, v_locpolicy_request_preamble, vc_aeIndex); + + //Set requestPrimitive + v_request := f_getUpdateRequestPrimitive(int10, v_locPolicyResourceIndex, m_updateLocationPolicy(f_getResourceAddress(v_locPolicyResourceIndex), omit, locationUpdatePeriod_invalid)); + + // Test Body + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt{ + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Update locationPolicy resource is rejected!!"); + } + [] 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__ & ": Error occurrs with response status code: "& int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)) & "due to IUT failed to handle an invalid locationPolicy update request"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": Timeout due to no response from requested server!"); + } + } + + f_checkAeSimuStatus(); + + //Check to see if the resource is NOT present + if(f_cse_isResourceNotPresent(vc_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 of testcase TC_CSE_LOC_010 - } // End of group g_CSE_LOC_010 + } // End of group g_CSE_LOC_010 - } // End of group loc_update + } // End of group loc_update group loc_retrieve { @@ -7076,7 +7069,6 @@ module OneM2M_Testcases_CSE_Release_3 { } function f_CSE_LOC_011() runs on AeSimu system CseSystem { - var integer v_aeAuxIndex := -1; var integer v_locPolicyResourceIndex := -1; var integer v_locContainerResourceIndex := -1; var ListOfDuration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD; @@ -7091,11 +7083,11 @@ module OneM2M_Testcases_CSE_Release_3 { f_cf01Up(); //Preamble - register AE - v_aeAuxIndex := f_cse_preamble_registerAe(); + vc_aeIndex := f_cse_preamble_registerAe(); //Preamble - create a valid locationPolicy resource for later container resource creation v_loc_request_preamble := valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress)); - v_container_request_preamble := valueof(m_createContainer(f_getResourceAddress(v_aeAuxIndex), omit));//no location-container name provided? - v_locPolicyResourceIndex := f_cse_createResource(int10, v_loc_request_preamble, v_aeAuxIndex);//created locationpolicy index + v_container_request_preamble := valueof(m_createContainer(f_getResourceAddress(vc_aeIndex), omit));//no location-container name provided? + v_locPolicyResourceIndex := f_cse_createResource(int10, v_loc_request_preamble, vc_aeIndex);//created locationpolicy index v_locContainerResourceIndex := f_cse_createResource(int3, v_container_request_preamble, v_locPolicyResourceIndex);//created container index //Test Body - retrieve the created container resource @@ -7152,29 +7144,28 @@ module OneM2M_Testcases_CSE_Release_3 { } function f_CSE_LOC_012_01() runs on AeSimu system CseSystem { - var integer v_aeAuxIndex := -1; - var integer v_locPolicyResourceIndex := -1; - var integer v_locContainerResourceIndex := -1; - var integer v_subscriptionResourceIndex := -1; + var integer v_locPolicyResourceIndex := -1; + var integer v_locContainerResourceIndex := -1; + var integer v_subscriptionResourceIndex := -1; var LocationSource v_locationSource := int1;//Netwok-based var ListOfDuration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD; var LocationTargetID locationTargetID := PX_LOCATION_TARGET_ID; var XSD.AnyURI locationServerAddress := PX_LOCATION_SERVER_ADDRESS; - var RequestPrimitive v_locpolicy_request_preamble; - var RequestPrimitive v_container_request_preamble; - var RequestPrimitive v_subscription_request_preamble; - var MsgIn v_response; + var RequestPrimitive v_locpolicy_request_preamble; + var RequestPrimitive v_container_request_preamble; + var RequestPrimitive v_subscription_request_preamble; + var MsgIn v_response; - //Test component configuration - f_cf01Up(); + //Test component configuration + f_cf01Up(); - //Preamble - register AE - v_aeAuxIndex := f_cse_preamble_registerAe(); - //Preamble - create a valid locationPolicy resource + //Preamble - register AE + vc_aeIndex := f_cse_preamble_registerAe(); + //Preamble - create a valid locationPolicy resource v_locpolicy_request_preamble := valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress)); - v_container_request_preamble := valueof(m_createContainer(f_getResourceAddress(v_aeAuxIndex), omit));//no location-container name provided? + v_container_request_preamble := valueof(m_createContainer(f_getResourceAddress(vc_aeIndex), omit));//no location-container name provided? - v_locPolicyResourceIndex := f_cse_createResource(int10, v_locpolicy_request_preamble, v_aeAuxIndex);//created locationpolicy index + v_locPolicyResourceIndex := f_cse_createResource(int10, v_locpolicy_request_preamble, vc_aeIndex);//created locationpolicy index v_locContainerResourceIndex := f_cse_createResource(int3, v_container_request_preamble, v_locPolicyResourceIndex);//created container index v_subscription_request_preamble := valueof(m_createSubscription(f_getResourceAddress(v_locContainerResourceIndex), c_defaultResourceName, -)); v_subscriptionResourceIndex := f_cse_createResource(int23, v_subscription_request_preamble, v_locContainerResourceIndex); @@ -7226,7 +7217,6 @@ module OneM2M_Testcases_CSE_Release_3 { } function f_CSE_LOC_012_02() runs on AeSimu system CseSystem { - var integer v_aeAuxIndex := -1; var integer v_locPolicyResourceIndex := -1; var integer v_locContainerResourceIndex := -1; var integer v_subscriptionResourceIndex := -1; @@ -7241,11 +7231,11 @@ module OneM2M_Testcases_CSE_Release_3 { f_cf01Up(); //Preamble - register AE - v_aeAuxIndex := f_cse_preamble_registerAe(); + vc_aeIndex := f_cse_preamble_registerAe(); //Preamble - create a valid locationPolicy resource v_locpolicy_request_preamble := valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, omit, omit)); - v_container_request_preamble := valueof(m_createContainer(f_getResourceAddress(v_aeAuxIndex), omit));//no location-container name provided? - v_locPolicyResourceIndex := f_cse_createResource(int10, v_locpolicy_request_preamble, v_aeAuxIndex);//created locationpolicy index + v_container_request_preamble := valueof(m_createContainer(f_getResourceAddress(vc_aeIndex), omit));//no location-container name provided? + v_locPolicyResourceIndex := f_cse_createResource(int10, v_locpolicy_request_preamble, vc_aeIndex);//created locationpolicy index v_locContainerResourceIndex := f_cse_createResource(int3, v_container_request_preamble, v_locPolicyResourceIndex);//created container index v_subscription_request_preamble := valueof(m_createSubscription(f_getResourceAddress(v_locContainerResourceIndex), c_defaultResourceName, -)); v_subscriptionResourceIndex := f_cse_createResource(int23, v_subscription_request_preamble, v_locContainerResourceIndex); @@ -7296,26 +7286,25 @@ module OneM2M_Testcases_CSE_Release_3 { v_ae1.done; } - function f_CSE_LOC_012_03() runs on AeSimu system CseSystem { - var integer v_aeAuxIndex := -1; - var integer v_locPolicyResourceIndex := -1; - var integer v_locContainerResourceIndex := -1; - var integer v_subscriptionResourceIndex := -1; - var LocationSource v_locationSource := int3;//Sharing-based - var RequestPrimitive v_locpolicy_request_preamble; - var RequestPrimitive v_container_request_preamble; - var RequestPrimitive v_subscription_request_preamble; - var MsgIn v_response; + function f_CSE_LOC_012_03() runs on AeSimu system CseSystem { + var integer v_locPolicyResourceIndex := -1; + var integer v_locContainerResourceIndex := -1; + var integer v_subscriptionResourceIndex := -1; + var LocationSource v_locationSource := int3;//Sharing-based + var RequestPrimitive v_locpolicy_request_preamble; + var RequestPrimitive v_container_request_preamble; + var RequestPrimitive v_subscription_request_preamble; + var MsgIn v_response; //Test component configuration f_cf01Up(); //Preamble - register AE - v_aeAuxIndex := f_cse_preamble_registerAe(); + vc_aeIndex := f_cse_preamble_registerAe(); //Preamble - create a valid locationPolicy resource v_locpolicy_request_preamble := valueof(m_createLocationPolicy(v_locationSource, omit, omit, omit, omit)); - v_container_request_preamble := valueof(m_createContainer(f_getResourceAddress(v_aeAuxIndex), omit));//no location-container name provided? - v_locPolicyResourceIndex := f_cse_createResource(int10, v_locpolicy_request_preamble, v_aeAuxIndex);//created locationpolicy index + v_container_request_preamble := valueof(m_createContainer(f_getResourceAddress(vc_aeIndex), omit));//no location-container name provided? + v_locPolicyResourceIndex := f_cse_createResource(int10, v_locpolicy_request_preamble, vc_aeIndex);//created locationpolicy index v_locContainerResourceIndex := f_cse_createResource(int3, v_container_request_preamble, v_locPolicyResourceIndex);//created container index v_subscription_request_preamble := valueof(m_createSubscription(f_getResourceAddress(v_locContainerResourceIndex), c_defaultResourceName, -)); v_subscriptionResourceIndex := f_cse_createResource(int23, v_subscription_request_preamble, v_locContainerResourceIndex); @@ -7371,7 +7360,6 @@ module OneM2M_Testcases_CSE_Release_3 { } function f_CSE_LOC_013() runs on AeSimu system CseSystem { - var integer v_aeAuxIndex := -1; var integer v_locPolicyResourceIndex := -1; var RequestPrimitive v_locpolicy_request_preamble; var MsgIn v_response; @@ -7384,10 +7372,10 @@ module OneM2M_Testcases_CSE_Release_3 { f_cf01Up(); //Preamble - register AE - v_aeAuxIndex := f_cse_preamble_registerAe(); + vc_aeIndex := f_cse_preamble_registerAe(); //Preamble - create a valid locationPolicy resource for later container resource creation v_locpolicy_request_preamble := valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress)); - v_locPolicyResourceIndex := f_cse_createResource(int10, v_locpolicy_request_preamble, v_aeAuxIndex);//created locationpolicy index + v_locPolicyResourceIndex := f_cse_createResource(int10, v_locpolicy_request_preamble, vc_aeIndex);//created locationpolicy index //Test Body - retrieve the created locationpolicy resource f_send(e_mcaPort, m_request(valueof(m_retrieve(f_getResourceAddress(v_locPolicyResourceIndex), f_getOriginator(v_locPolicyResourceIndex))))); @@ -7440,7 +7428,6 @@ module OneM2M_Testcases_CSE_Release_3 { } function f_CSE_LOC_014() runs on AeSimu system CseSystem { - var integer v_aeAuxIndex := -1; var integer v_locPolicyResourceIndex := -1; var integer v_locContainerResourceIndex := -1; var ListOfDuration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD; @@ -7455,11 +7442,11 @@ module OneM2M_Testcases_CSE_Release_3 { f_cf01Up(); //Preamble - register AE - v_aeAuxIndex := f_cse_preamble_registerAe(); + vc_aeIndex := f_cse_preamble_registerAe(); //Preamble - create a valid locationPolicy resource for later container resource creation v_loc_request_preamble := valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress)); - v_container_request_preamble := valueof(m_createContainer(f_getResourceAddress(v_aeAuxIndex), omit));//no location-container name provided? - v_locPolicyResourceIndex := f_cse_createResource(int10, v_loc_request_preamble, v_aeAuxIndex);//created locationpolicy index + v_container_request_preamble := valueof(m_createContainer(f_getResourceAddress(vc_aeIndex), omit));//no location-container name provided? + v_locPolicyResourceIndex := f_cse_createResource(int10, v_loc_request_preamble, vc_aeIndex);//created locationpolicy index v_locContainerResourceIndex := f_cse_createResource(int3, v_container_request_preamble, v_locPolicyResourceIndex);//created container index //Test Body - retrieve the created container resource @@ -7514,7 +7501,6 @@ module OneM2M_Testcases_CSE_Release_3 { } function f_CSE_LOC_015() runs on AeSimu system CseSystem { - var integer v_aeAuxIndex := -1; var integer v_locPolicyResourceIndex := -1; var integer v_locContainerResourceIndex := -1; var ListOfDuration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD; @@ -7528,11 +7514,11 @@ module OneM2M_Testcases_CSE_Release_3 { f_cf01Up(); //Preamble - register AE - v_aeAuxIndex := f_cse_preamble_registerAe(); + vc_aeIndex := f_cse_preamble_registerAe(); //Preamble - create a valid locationPolicy resource for later container resource creation v_loc_request_preamble := valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress)); - v_container_request_preamble := valueof(m_createContainer(f_getResourceAddress(v_aeAuxIndex), omit));//no location-container name provided? - v_locPolicyResourceIndex := f_cse_createResource(int10, v_loc_request_preamble, v_aeAuxIndex);//created locationpolicy index + v_container_request_preamble := valueof(m_createContainer(f_getResourceAddress(vc_aeIndex), omit));//no location-container name provided? + v_locPolicyResourceIndex := f_cse_createResource(int10, v_loc_request_preamble, vc_aeIndex);//created locationpolicy index v_locContainerResourceIndex := f_cse_createResource(int3, v_container_request_preamble, v_locPolicyResourceIndex);//created container index //Test Body - retrieve the created container resource @@ -7587,7 +7573,6 @@ module OneM2M_Testcases_CSE_Release_3 { } function f_CSE_LOC_16() runs on AeSimu system CseSystem { - var integer v_aeAuxIndex := -1; var integer v_locPolicyResourceIndex := -1; var integer v_locChildResourceIndex := -1; var LocationSource v_locationSource := int3;//Sharing-based @@ -7609,12 +7594,12 @@ module OneM2M_Testcases_CSE_Release_3 { f_cf01Up(); //Preamble - v_aeAuxIndex := f_cse_preamble_registerAe(); + vc_aeIndex := f_cse_preamble_registerAe(); //Set requestPrimitive - v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, omit, omit, omit), v_aeAuxIndex); + v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, omit, omit, omit), vc_aeIndex); //Preamble - create a valid locationPolicy resource for later update use v_locpolicy_request_preamble := valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress)); - v_locPolicyResourceIndex := f_cse_createResource(int10, v_locpolicy_request_preamble, v_aeAuxIndex); + v_locPolicyResourceIndex := f_cse_createResource(int10, v_locpolicy_request_preamble, vc_aeIndex); v_locChildResourceIndex := f_cse_createResource(int10, v_request, v_locPolicyResourceIndex);//Subscription under TimeSeries // Test Body f_send(e_mcaPort, m_request(v_request)); @@ -7624,7 +7609,7 @@ module OneM2M_Testcases_CSE_Release_3 { tc_ac.stop; setverdict(pass, __SCOPE__ & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!"); f_checkAttributesToBeSaved(int10, v_request, v_response.primitive.responsePrimitive); - v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, v_aeAuxIndex); + v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, vc_aeIndex); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop;