diff --git a/OneM2M_TestControl_IN_profile.ttcn b/OneM2M_TestControl_IN_profile.ttcn index 6fd75e8d97e66e392be2af37f7edb1edadaadb5b..c5292b26940271b962312c4d0c4c9ef04fcd0048 100644 --- a/OneM2M_TestControl_IN_profile.ttcn +++ b/OneM2M_TestControl_IN_profile.ttcn @@ -15,6 +15,7 @@ module OneM2M_TestControl_IN_profile { import from OneM2M_Testcases_CSE_Release_1 all; + import from OneM2M_Testcases_CSE_Release_2 all; import from OneM2M_Pics all; control { diff --git a/OneM2M_TestControl_MN_profile.ttcn b/OneM2M_TestControl_MN_profile.ttcn index 43eb9841038b36795e32ca31677f2b2b4c9d6e43..f2f34abb281ab1407c7af6e34125a523ec481b3b 100644 --- a/OneM2M_TestControl_MN_profile.ttcn +++ b/OneM2M_TestControl_MN_profile.ttcn @@ -15,6 +15,7 @@ module OneM2M_TestControl_MN_profile { import from OneM2M_Testcases_CSE_Release_1 all; + import from OneM2M_Testcases_CSE_Release_2 all; import from OneM2M_Pics all; control { diff --git a/OneM2M_Testcases_CSE_Release_1.ttcn b/OneM2M_Testcases_CSE_Release_1.ttcn index 98a49782041b28a6e72c7e6657c18b82bace27b5..947235a68792b8c844857483cf4df3223fa19557 100644 --- a/OneM2M_Testcases_CSE_Release_1.ttcn +++ b/OneM2M_Testcases_CSE_Release_1.ttcn @@ -8633,161 +8633,7 @@ module OneM2M_Testcases_CSE_Release_1 { group Subscription_And_Notification { group Create { - - /** - * @desc Check that the IUT rejects the creation of the <subscription> resource when the target subscribed-to RESOURCE_TYPE resource is not subscribable. - * - */ - testcase TC_CSE_SUB_CRE_001_SUB() runs on Tester system CseSystem { - - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1)); - v_ae1.done; - - v_ae1.start(f_CSE_SUB_CRE_001_SUB()); - - v_ae1.done; - - } - - function f_CSE_SUB_CRE_001_SUB() runs on AeSimu { - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var RequestPrimitive v_request; - var integer v_ae2Index := -1; - - // Test control - - // Test component configuration - f_cf01Up(true); - - // Test adapter configuration - - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; - - f_cse_preamble_subscriptionVerification(v_ae2Index, v_createRequest, int23); - - v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription resource is created - - v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_resourceIndex); - - // Test Body - mcaPort.send(f_getMsgOutPrimitive(m_request(v_request))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int5203))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": <Subscription> Resource not subscribable"); - } - [] 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__ & ": Subscription successful whereas <Subscription> resource is not subscribable"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource"); - } - } - - f_checkAeSimuStatus(); - - //Check to see if the resource is NOT present - if(f_cse_isResourceNotPresent(v_resourceIndex, 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_SUB_CRE_001_SUB - - testcase TC_CSE_SUB_CRE_001_CIN() runs on Tester system CseSystem { - - var AeSimu v_ae1 := AeSimu.create("AE1") alive; - v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1)); - v_ae1.done; - - v_ae1.start(f_CSE_SUB_CRE_001_CIN()); - - v_ae1.done; - - } - - function f_CSE_SUB_CRE_001_CIN() runs on AeSimu { - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_containerResourceIndex := -1; - var integer v_contentInstanceResourceIndex := -1; - var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var RequestPrimitive v_request; - - // Test control - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - - v_containerResourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);//Container - - v_contentInstanceResourceIndex := f_cse_createResource(int4, m_createContentInstance(f_getResourceAddress(v_aeIndex), "Random Value"), v_containerResourceIndex);//ContentInstance - - v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_contentInstanceResourceIndex); - - // Test Body - mcaPort.send(f_getMsgOutPrimitive(m_request(v_request))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int5203))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": <Subscription> Resource not subscribable"); - } - [] 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__ & ": Subscription successful whereas <Subscription> resource is not subscribable"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource"); - } - } - - f_checkAeSimuStatus(); - - //Check to see if the resource is NOT present - if(f_cse_isResourceNotPresent(v_contentInstanceResourceIndex, 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_SUB_CRE_001_CIN - + /** * @desc Check that the IUT rejects the creation of the <subscription> resource when the originator does not have privileges for retrieving the subscribed-to resource. *