Commit 90d807ac0de6c1da40a2bccb1ed03e28e7720534

Authored by Miguel Angel Reina Ortega
1 parent 1474938b

TC_CSE_DMR_CRE_018_RCN_xxx implemented

Signed-off-by: reinaortega <miguelangel.reinaortega@etsi.org>
... ... @@ -2916,7 +2916,56 @@ module OneM2M_PermutationFunctions {
2916 2916 f_cf01Down();
2917 2917  
2918 2918 }//end f_CSE_DMR_CRE_017
2919   -
  2919 +
  2920 + function f_CSE_DMR_CRE_018(ResultContent p_resultContent) runs on AeSimu {
  2921 +
  2922 + // Local variables
  2923 + var MsgIn v_response;
  2924 + var RequestPrimitive v_request;
  2925 + var integer v_aeIndex := -1;
  2926 + var integer v_resourceIndex := -1;
  2927 +
  2928 + // Test control
  2929 +
  2930 + // Test component configuration
  2931 + f_cf01Up();
  2932 +
  2933 + // Test adapter configuration
  2934 +
  2935 + // Preamble
  2936 + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
  2937 +
  2938 + // Test Body
  2939 + v_request := f_getCreateRequestPrimitive(int3, m_createContainerBase, v_aeIndex);
  2940 + v_request.resultContent := p_resultContent;
  2941 + mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
  2942 + tc_ac.start;
  2943 + alt {
  2944 + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) { //BAD REQUEST
  2945 + tc_ac.stop;
  2946 + setverdict(pass, __SCOPE__ & ": Request successfully rejected");
  2947 + }
  2948 + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
  2949 + tc_ac.stop;
  2950 + setverdict(fail, __SCOPE__ & ": Wrong response status code");
  2951 + }
  2952 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
  2953 + tc_ac.stop;
  2954 + setverdict(fail, __SCOPE__ & ": Error, Result content set to " & int2str(enum2int(p_resultContent)) & " is impossible for a retrieve request ");
  2955 + }
  2956 + [] tc_ac.timeout {
  2957 + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
  2958 + }
  2959 + }
  2960 +
  2961 + // Postamble
  2962 + f_cse_postamble_deleteResources();
  2963 +
  2964 + // Tear down
  2965 + f_cf01Down();
  2966 +
  2967 + }//end f_CSE_DMR_CRE_018
  2968 +
2920 2969 function f_CSE_DMR_CRE_019(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on CseSimu{
2921 2970  
2922 2971 // Local variables
... ...
... ... @@ -775,7 +775,48 @@ module OneM2M_Testcases_CSE_Release_2 {
775 775 }
776 776 } // end g_CSE_DMR_CRE_017
777 777  
778   -
  778 + group g_CSE_DMR_CRE_018 {
  779 +
  780 + /**
  781 + * @desc Check that the IUT rejects a CREATE request when the ResultContent is set to RESULT_CONTENT
  782 + *
  783 + */
  784 + testcase TC_CSE_DMR_CRE_018_RCN_4() runs on Tester system CseSystem {
  785 + // Local variables
  786 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  787 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  788 + v_ae1.done;
  789 + v_ae1.start(f_CSE_DMR_CRE_018(int4));//ResultContent = 4 (attributes and child resources)
  790 + v_ae1.done;
  791 + }
  792 +
  793 + testcase TC_CSE_DMR_CRE_018_RCN_5() runs on Tester system CseSystem {
  794 + // Local variables
  795 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  796 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  797 + v_ae1.done;
  798 + v_ae1.start(f_CSE_DMR_CRE_018(int5));//ResultContent = 5 (attributes and child resources references)
  799 + v_ae1.done;
  800 + }
  801 +
  802 + testcase TC_CSE_DMR_CRE_018_RCN_6() runs on Tester system CseSystem {
  803 + // Local variables
  804 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  805 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  806 + v_ae1.done;
  807 + v_ae1.start(f_CSE_DMR_CRE_018(int6));//ResultContent = 6 (child resources references)
  808 + v_ae1.done;
  809 + }
  810 +
  811 + testcase TC_CSE_DMR_CRE_018_RCN_8() runs on Tester system CseSystem {
  812 + // Local variables
  813 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  814 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  815 + v_ae1.done;
  816 + v_ae1.start(f_CSE_DMR_CRE_018(int8));//ResultContent = 8 (child resources)
  817 + v_ae1.done;
  818 + }
  819 + } // end g_CSE_DMR_CRE_018
779 820 }//end group Create
780 821  
781 822 group Retrieve {
... ...