diff --git a/OneM2M_Testcases_CSE.ttcn b/OneM2M_Testcases_CSE.ttcn index c1ecb91fed109ae606d117cb3390eaa6d5c44c79..8cbbcc4bab9fed8d26c69b86d2a9f41d26e78981 100644 --- a/OneM2M_Testcases_CSE.ttcn +++ b/OneM2M_Testcases_CSE.ttcn @@ -1736,6 +1736,62 @@ module OneM2M_Testcases_CSE { }//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. *