diff --git a/OneM2M_Testcases_CSE.ttcn b/OneM2M_Testcases_CSE.ttcn index f02181e47363a6f22cba54290bb476a065203c04..74bd72a7e666ff1fd55559ae9d958106ebe71b80 100644 --- a/OneM2M_Testcases_CSE.ttcn +++ b/OneM2M_Testcases_CSE.ttcn @@ -3023,6 +3023,10 @@ module OneM2M_Testcases_CSE { }//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 { @@ -3102,7 +3106,7 @@ module OneM2M_Testcases_CSE { var RequestPrimitive v_request; var ResourceType v_resourceType := int16; //remoteCSE var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE; - var charstring v_action := "Please, send a valid RETRIEVE Request containing To set to " & PX_CSE1_ADDRESS & " and Content containing remoteCSE resource containing a valid attribute " & p_attribute[0]; + var charstring v_action := "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)) { @@ -3126,27 +3130,16 @@ module OneM2M_Testcases_CSE { // 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 " & p_attribute[0]); - f_setResource(v_request.primitiveContent,int16); - } - [] mccPort.receive(mw_response(mw_responsePrimitiveOK(f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { + [] mccPortIn.receive(mw_request(v_request)) { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + setverdict(pass, __SCOPE__ & ": Received request for updation for resource type remoteCSE containing attribute " & p_attribute[0]); f_setResource(v_request.primitiveContent,int16); } - [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Accepted updation for resource type remoteCSE without containing attribute " & p_attribute[0]); - f_setResource(v_request.primitiveContent,int16); - } - [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + [] mccPortIn.receive { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Rejected updation of resource type remoteCSE containing attribute" & p_attribute[0]); + 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");