diff --git a/OneM2M_Testcases_CSE_Release_1.ttcn b/OneM2M_Testcases_CSE_Release_1.ttcn index 736435bc555ebd857260cc76cc6d2d2e87d0f620..0497c9942ee3d7be06d191b1de81a1d849d0791b 100644 --- a/OneM2M_Testcases_CSE_Release_1.ttcn +++ b/OneM2M_Testcases_CSE_Release_1.ttcn @@ -1007,7 +1007,6 @@ module OneM2M_Testcases_CSE_Release_1 { } - /** * @desc Check that the IUT accepts an AE re-registration (allowed M2M-SP-assigned AE-ID, S-AE-ID-STEM provided by AE), transfer response to the AE * @@ -2282,6 +2281,89 @@ module OneM2M_Testcases_CSE_Release_1 { f_cf02Down(); }; //end f_CSE_REG_CRE_030 + + /** + * @desc Check that the IUT accepts an AE registration (S-AE-ID-STEM not provided by AE), communication between MN-CSE and IN-CSE + * + */ + testcase TC_CSE_REG_CRE_031() runs on Tester system CseSystem { + + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1)); + v_cse1.done; + + v_cse1.start(f_CSE_REG_CRE_031()); + + v_cse1.done; + + } + + function f_CSE_REG_CRE_031() runs on CseSimu { + + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeAnncIndex := -1; + var template PrimitiveContent v_primitiveContent; + const charstring v_cseId := PX_CSE_ID; + template XSD.AnyURI v_link := pattern "{v_cseId}/S*"; + template XSD.ID v_resourceID := pattern "S*"; + + //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_cf04Up(); + + //Preamble + + vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase); + + //Test Body + v_request := valueof(m_createAEAnnc(-, f_getResourceAddress(vc_remoteCseIndex), PX_CSE1_ID & "/" & "S", PX_APP_ID, PX_CSE1_ID & "/" & "S")); + + v_request := f_getCreateRequestPrimitive(int10002, v_request, vc_remoteCseIndex); + v_primitiveContent.aEAnnc := mw_contentAeAnnc_base; + + mccPort.send(f_getMsgOutPrimitive(m_request(v_request))); + + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitive(int2001, v_primitiveContent))) -> value v_response { + tc_ac.stop; + f_checkAttributesToBeSaved(int10002, v_request, v_response.primitive.responsePrimitive); + v_aeAnncIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10002); + + setverdict(pass, __SCOPE__ & ": AEAnnc successfully created."); + if(match(v_response.primitive.responsePrimitive.primitiveContent.aEAnnc.link, v_link)) { + setverdict(fail, __SCOPE__ & ": Link attribute not correct"); + } + if(v_response.primitive.responsePrimitive.primitiveContent.aEAnnc.labels != {"Credential-ID:None"}) { + setverdict(fail, __SCOPE__ & ": Labels attribute not correct"); + } + } + [] mccPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": AEAnnc successfully created with wrong attributes"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating AEAnnc with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating AEAnnc"); + } + } + + // Postamble + f_cse_postamble_deleteResourcesCSE(); + + // Tear down + f_cf04Down(); + + } //end of testcase TC_CSE_REG_CRE_031 } //end group Create