Commit 6733eb0c6fabf254ff00373b858607665036c5e8

Authored by Miguel Angel Reina Ortega
1 parent 33c0287b

New TCs implemented for rcn related TPs

According to:
- TDE-2019-0013
- TDE-2019-0012

Signed-off-by: reinaortega <miguelangel.reinaortega@etsi.org>
... ... @@ -3868,7 +3868,7 @@ module OneM2M_Templates {
3868 3868 }
3869 3869  
3870 3870 template AccessControlPolicy_optional mw_contentAcp_rc8 modifies m_contentAcp_allOmit := {
3871   - choice := {childResource_list := ?} //O
  3871 + choice := {choice_list := ?} //O
3872 3872 }
3873 3873  
3874 3874 template Group_optional mw_contentGroupBase := {
... ... @@ -4003,7 +4003,7 @@ module OneM2M_Templates {
4003 4003 }
4004 4004  
4005 4005 template Group_optional mw_contentGroup_rc8 modifies m_contentGroup_allOmit := {
4006   - choice := {childResource_list := ?} //O
  4006 + choice := {choice_list := ?} //O
4007 4007 }
4008 4008  
4009 4009 template MgmtCmd_optional m_contentMgmtCmd_allOmit := {
... ... @@ -4270,7 +4270,7 @@ module OneM2M_Templates {
4270 4270 }
4271 4271  
4272 4272 template Schedule_optional mw_contentSchedule_rc8 modifies m_contentSchedule_allOmit := {
4273   - choice := {childResource_list := ?} //O
  4273 + choice := {choice_list := ?} //O
4274 4274 }
4275 4275  
4276 4276 template StatsCollect_optional m_contentStatsCollect_allOmit := {
... ... @@ -4453,7 +4453,7 @@ module OneM2M_Templates {
4453 4453 }
4454 4454  
4455 4455 template Subscription_optional mw_contentSubscription_rc8 modifies m_contentSubscription_allOmit := {
4456   - choice := {childResource_list := ?} //O
  4456 + choice := {choice_list := ?} //O
4457 4457 }
4458 4458  
4459 4459 template ContentInstance_optional mw_contentContentInstanceBase := {
... ... @@ -4654,7 +4654,7 @@ module OneM2M_Templates {
4654 4654 }
4655 4655  
4656 4656 template Container_optional mw_contentContainer_rc8 modifies m_contentContainer_allOmit := {
4657   - choice := {childResource_list := ?} //O
  4657 + choice := {choice_list := ?} //O
4658 4658 }
4659 4659  
4660 4660 template Notification m_contentNotification_allOmit := {
... ... @@ -4876,7 +4876,7 @@ module OneM2M_Templates {
4876 4876 }
4877 4877  
4878 4878 template TimeSeries_optional mw_contentTimeSeries_rc8 modifies m_contentTimeSeries_allOmit := {
4879   - choice := {childResource_list := ?} //O
  4879 + choice := {choice_list := ?} //O
4880 4880 }
4881 4881  
4882 4882  
... ...
... ... @@ -2966,7 +2966,121 @@ module OneM2M_PermutationFunctions {
2966 2966  
2967 2967 }//end f_CSE_DMR_CRE_018
2968 2968  
2969   - function f_CSE_DMR_CRE_019(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on CseSimu{
  2969 + function f_CSE_DMR_CRE_019(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu {
  2970 +
  2971 + // Local variables
  2972 + var MsgIn v_response;
  2973 + var RequestPrimitive v_request;
  2974 + var integer v_aeIndex := -1;
  2975 + var integer v_ae2Index := -1;
  2976 +
  2977 + // Test control
  2978 +
  2979 + // Test component configuration
  2980 + f_cf01Up(true);
  2981 +
  2982 + // Test adapter configuration
  2983 +
  2984 + // Preamble
  2985 + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
  2986 +
  2987 + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType);
  2988 +
  2989 + // Test Body
  2990 + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex);
  2991 + v_request.resultContent := int1;//Attributes
  2992 +
  2993 + mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
  2994 + tc_ac.start;
  2995 + alt {
  2996 + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, p_contentResponse))) -> value v_response {
  2997 + tc_ac.stop;
  2998 + setverdict(pass, __SCOPE__ & ": Only attributes provided with RC set to 1");
  2999 +
  3000 + }
  3001 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
  3002 + tc_ac.stop;
  3003 + setverdict(fail, __SCOPE__ & ": Wrong response status code");
  3004 + }
  3005 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
  3006 + tc_ac.stop;
  3007 + setverdict(fail, __SCOPE__ & ": Wrong content provided with RC set to 1");
  3008 + }
  3009 + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
  3010 + tc_ac.stop;
  3011 + setverdict(fail, __SCOPE__ & ": Error while creating resource");
  3012 + }
  3013 + [] tc_ac.timeout {
  3014 + setverdict(fail, __SCOPE__ & ": No answer while creating resource");
  3015 + }
  3016 + }
  3017 +
  3018 + // Postamble
  3019 + f_cse_postamble_deleteResources();
  3020 +
  3021 + // Tear down
  3022 + f_cf01Down();
  3023 +
  3024 + }//end f_CSE_DMR_CRE_019
  3025 +
  3026 + function f_CSE_DMR_CRE_020(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu {
  3027 +
  3028 + // Local variables
  3029 + var MsgIn v_response;
  3030 + var RequestPrimitive v_request;
  3031 + var integer v_aeIndex := -1;
  3032 + var integer v_ae2Index := -1;
  3033 +
  3034 + // Test control
  3035 +
  3036 + // Test component configuration
  3037 + f_cf01Up(true);
  3038 +
  3039 + // Test adapter configuration
  3040 +
  3041 + // Preamble
  3042 + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
  3043 +
  3044 + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType);
  3045 +
  3046 + // Test Body
  3047 + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex);
  3048 + v_request.resultContent := int9;//Modified Attributes
  3049 +
  3050 + mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
  3051 + tc_ac.start;
  3052 + alt {
  3053 + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, p_contentResponse))) -> value v_response {
  3054 + tc_ac.stop;
  3055 + setverdict(pass, __SCOPE__ & ": Only modified attributes provided with RC set to 9");
  3056 +
  3057 + }
  3058 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
  3059 + tc_ac.stop;
  3060 + setverdict(fail, __SCOPE__ & ": Wrong response status code");
  3061 + }
  3062 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
  3063 + tc_ac.stop;
  3064 + setverdict(fail, __SCOPE__ & ": Wrong content provided with RC set to 9");
  3065 + }
  3066 + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
  3067 + tc_ac.stop;
  3068 + setverdict(fail, __SCOPE__ & ": Error while creating resource");
  3069 + }
  3070 + [] tc_ac.timeout {
  3071 + setverdict(fail, __SCOPE__ & ": No answer while creating resource");
  3072 + }
  3073 + }
  3074 +
  3075 + // Postamble
  3076 + f_cse_postamble_deleteResources();
  3077 +
  3078 + // Tear down
  3079 + f_cf01Down();
  3080 +
  3081 + }//end f_CSE_DMR_CRE_020
  3082 +
  3083 + function f_CSE_DMR_CRE_021(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on CseSimu{
2970 3084  
2971 3085 // Local variables
2972 3086 var MsgIn v_response;
... ... @@ -3028,9 +3142,9 @@ module OneM2M_PermutationFunctions {
3028 3142 // Tear down
3029 3143 f_cf04Down();
3030 3144  
3031   - }//end f_CSE_DMR_CRE_019
  3145 + }//end f_CSE_DMR_CRE_021
3032 3146  
3033   - function f_CSE_DMR_CRE_020(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template (present) RequestPrimitive p_requestAnnc) runs on AeSimu {
  3147 + function f_CSE_DMR_CRE_022(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template (present) RequestPrimitive p_requestAnnc) runs on AeSimu {
3034 3148  
3035 3149 // Local variables
3036 3150 var MsgIn v_response;
... ... @@ -3067,9 +3181,9 @@ module OneM2M_PermutationFunctions {
3067 3181 // Tear down
3068 3182 f_cf02Down();
3069 3183  
3070   - }//end f_CSE_DMR_CRE_020
  3184 + }//end f_CSE_DMR_CRE_022
3071 3185  
3072   - function f_CSE_DMR_CRE_021(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template (present) RequestPrimitive p_requestAnnc) runs on AeSimu{
  3186 + function f_CSE_DMR_CRE_023(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template (present) RequestPrimitive p_requestAnnc) runs on AeSimu{
3073 3187  
3074 3188 // Local variables
3075 3189 var MsgIn v_anncRequest;
... ... @@ -3122,7 +3236,7 @@ module OneM2M_PermutationFunctions {
3122 3236  
3123 3237 //return v_anncRequest.primitive.requestPrimitive;
3124 3238  
3125   - }//end f_CSE_DMR_CRE_021
  3239 + }//end f_CSE_DMR_CRE_023
3126 3240  
3127 3241 }//end group Create
3128 3242  
... ... @@ -5457,108 +5571,367 @@ module OneM2M_PermutationFunctions {
5457 5571 f_cf02DownCseSimuMaster();
5458 5572  
5459 5573 }//end f_CSE_DMR_UPD_018
  5574 +
  5575 + function f_CSE_DMR_UPD_019(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, ResultContent p_resultContent) runs on AeSimu {
  5576 +
  5577 + // Local variables
  5578 + var MsgIn v_response;
  5579 + var RequestPrimitive v_updateRequest := valueof(m_updateContainerBase);
  5580 + var integer v_aeIndex := -1;
  5581 + var integer v_resourceIndex := -1;
  5582 +
  5583 + // Test control
  5584 +
  5585 + // Test component configuration
  5586 + f_cf01Up();
  5587 +
  5588 + // Test adapter configuration
  5589 +
  5590 + // Preamble
  5591 + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
  5592 +
  5593 + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex);
  5594 +
  5595 + // Test Body
  5596 + v_updateRequest.primitiveContent.container.labels := {"VALUE_1"};
  5597 + v_updateRequest := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, v_updateRequest);
  5598 + v_updateRequest.resultContent := p_resultContent;
  5599 + mcaPort.send(f_getMsgOutPrimitive(m_request(v_updateRequest)));
  5600 + tc_ac.start;
  5601 + alt {
  5602 + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) { //BAD REQUEST
  5603 + tc_ac.stop;
  5604 + setverdict(pass, __SCOPE__ & ": Request successfully rejected");
  5605 + }
  5606 + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
  5607 + tc_ac.stop;
  5608 + setverdict(fail, __SCOPE__ & ": Wrong response status code");
  5609 + }
  5610 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
  5611 + tc_ac.stop;
  5612 + setverdict(fail, __SCOPE__ & ": Error, Result content set to " & int2str(enum2int(p_resultContent)) & " is impossible for a UPDATE request ");
  5613 + }
  5614 + [] tc_ac.timeout {
  5615 + setverdict(fail, __SCOPE__ & ": No answer while updating resource");
  5616 + }
  5617 + }
  5618 +
  5619 + // Postamble
  5620 + f_cse_postamble_deleteResources();
  5621 +
  5622 + // Tear down
  5623 + f_cf01Down();
  5624 +
  5625 + }//end f_CSE_DMR_UPD_019
5460 5626  
5461   - }//end group Update
5462   -
5463   - group Delete {
5464   -
5465   - function f_CSE_DMR_DEL_001(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive) runs on AeSimu {
  5627 + function f_CSE_DMR_UPD_020(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu {
  5628 +
5466 5629 // Local variables
5467 5630 var MsgIn v_response;
5468 5631 var RequestPrimitive v_request;
5469 5632 var integer v_aeIndex := -1;
5470   - var integer v_parentIndex := -1;
5471   - var integer v_containerIndex := -1;
5472   - var integer v_resourceIndex := -1;
5473 5633 var integer v_ae2Index := -1;
5474   -
  5634 + var integer v_resourceIndex := -1;
  5635 + var integer v_childResourceIndex := -1;
  5636 +
5475 5637 // Test control
5476   -
  5638 +
5477 5639 // Test component configuration
5478 5640 f_cf01Up(true);
5479   -
  5641 +
5480 5642 // Test adapter configuration
5481   -
  5643 +
5482 5644 // Preamble
5483   - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi)
5484   -
5485   - f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType);
5486   -
5487   - if(p_resourceType == int4) {
5488   - v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
5489   - v_parentIndex := v_containerIndex;
5490   - }else{
5491   - v_parentIndex := v_aeIndex;
  5645 + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
  5646 +
  5647 + if(isvalue(p_childResourceType)) {
  5648 + if(valueof(p_childResourceType) == int23) {
  5649 + f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType));
  5650 + } else {
  5651 + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType));
  5652 + }
  5653 + }
  5654 +
  5655 + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex);
  5656 +
  5657 + if(p_resourceType != int15) {
  5658 + v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex);
5492 5659 }
5493   -
5494   - v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex);
5495   -
  5660 +
5496 5661 // Test Body
5497   - v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
5498   -
  5662 + v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive);
  5663 + v_request.resultContent := int0;//Nothing
5499 5664 mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
5500 5665 tc_ac.start;
5501 5666 alt {
5502   - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) -> value v_response {
  5667 + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004, omit))) -> value v_response {
5503 5668 tc_ac.stop;
5504   - setverdict(pass, __SCOPE__ & ": Resource" & int2str(enum2int(p_resourceType)) & " deleted successfully");
  5669 + setverdict(pass, __SCOPE__ & ": Nothing provided with RCN set to " & int2str(enum2int(v_request.resultContent)));
5505 5670 }
5506   - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
  5671 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(omit))) -> value v_response {
5507 5672 tc_ac.stop;
5508 5673 setverdict(fail, __SCOPE__ & ": Wrong response status code");
5509 5674 }
5510   - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
  5675 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
5511 5676 tc_ac.stop;
5512   - setverdict(fail, __SCOPE__ & ": Error while deleting resource type " & int2str(enum2int(p_resourceType)));
  5677 + setverdict(fail, __SCOPE__ & ": Some content provided with RCN set to " & int2str(enum2int(v_request.resultContent)));
  5678 + }
  5679 + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
  5680 + tc_ac.stop;
  5681 + setverdict(fail, __SCOPE__ & ": Error while updating resource");
5513 5682 }
5514 5683 [] tc_ac.timeout {
5515   - setverdict(fail, __SCOPE__ & ": No answer while deleting resource type " & int2str(enum2int(p_resourceType)));
  5684 + setverdict(fail, __SCOPE__ & ": No answer while updating resource");
5516 5685 }
5517 5686 }
5518 5687  
5519   - f_checkAeSimuStatus();
5520   -
5521   - //Check to see if the resource is present or not
5522   - if (f_cse_isResourceNotPresent(v_aeIndex, f_getResourceName(vc_resourcesList[v_resourceIndex].resource))){
5523   - setverdict(pass, __SCOPE__ & ":INFO: Resource deleted");
5524   - } else {
5525   - setverdict(fail, __SCOPE__ & ":ERROR: Resource not deleted");
5526   - }
5527   -
5528 5688 // Postamble
5529 5689 f_cse_postamble_deleteResources();
5530   -
  5690 +
5531 5691 // Tear down
5532 5692 f_cf01Down();
5533   -
5534   - };//end f_CSE_DMR_DEL_001
5535   -
5536   - function f_CSE_DMR_DEL_002(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive) runs on AeSimu {
  5693 +
  5694 + }//end f_CSE_DMR_UPD_020
  5695 +
  5696 + function f_CSE_DMR_UPD_021(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu {
  5697 +
5537 5698 // Local variables
5538 5699 var MsgIn v_response;
5539 5700 var RequestPrimitive v_request;
5540   - var RequestPrimitive v_updateRequest;
5541   - var integer v_acpAuxIndex := -1;
5542 5701 var integer v_aeIndex := -1;
5543   - var integer v_resourceIndex := -1;
5544 5702 var integer v_ae2Index := -1;
5545   - var AccessControlRule v_accessControlRule_1 := valueof(m_createAcr({PX_SUPER_AE_ID}, int63));
5546   - var AccessControlRule v_accessControlRule_2;
5547   - var SetOfAcrs v_setOfArcs;
5548   -
  5703 + var integer v_resourceIndex := -1;
  5704 + var integer v_childResourceIndex := -1;
  5705 +
5549 5706 // Test control
5550   - if(not(PICS_ACP_SUPPORT)) {
5551   - setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case");
5552   - stop;
5553   - }
5554   -
  5707 +
5555 5708 // Test component configuration
5556 5709 f_cf01Up(true);
5557   -
  5710 +
5558 5711 // Test adapter configuration
5559   -
  5712 +
5560 5713 // Preamble
5561   - v_acpAuxIndex := f_cse_preamble_createAcpAux(-,-);//c_CRDNDi);
  5714 + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
  5715 +
  5716 + if(isvalue(p_childResourceType)) {
  5717 + if(valueof(p_childResourceType) == int23) {
  5718 + f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType));
  5719 + } else {
  5720 + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType));
  5721 + }
  5722 + }
  5723 +
  5724 + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex);
  5725 +
  5726 + if(p_resourceType != int15) {
  5727 + v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex);
  5728 + }
  5729 +
  5730 + // Test Body
  5731 + v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive);
  5732 + v_request.resultContent := int1;//Attributes
  5733 + mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
  5734 + tc_ac.start;
  5735 + alt {
  5736 + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004, p_contentResponse))) -> value v_response {
  5737 + tc_ac.stop;
  5738 + setverdict(pass, __SCOPE__ & ": All attributes provided with RCN set to " & int2str(enum2int(v_request.resultContent)));
  5739 + }
  5740 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
  5741 + tc_ac.stop;
  5742 + setverdict(fail, __SCOPE__ & ": Wrong response status code");
  5743 + }
  5744 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
  5745 + tc_ac.stop;
  5746 + setverdict(fail, __SCOPE__ & ": Wrong content provided with RCN set to " & int2str(enum2int(v_request.resultContent)));
  5747 + }
  5748 + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
  5749 + tc_ac.stop;
  5750 + setverdict(fail, __SCOPE__ & ": Error while updating resource");
  5751 + }
  5752 + [] tc_ac.timeout {
  5753 + setverdict(fail, __SCOPE__ & ": No answer while updating resource");
  5754 + }
  5755 + }
  5756 +
  5757 + // Postamble
  5758 + f_cse_postamble_deleteResources();
  5759 +
  5760 + // Tear down
  5761 + f_cf01Down();
  5762 +
  5763 + }//end f_CSE_DMR_UPD_021
  5764 +
  5765 + function f_CSE_DMR_UPD_022(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu {
  5766 +
  5767 + // Local variables
  5768 + var MsgIn v_response;
  5769 + var RequestPrimitive v_request;
  5770 + var integer v_aeIndex := -1;
  5771 + var integer v_ae2Index := -1;
  5772 + var integer v_resourceIndex := -1;
  5773 + var integer v_childResourceIndex := -1;
  5774 +
  5775 + // Test control
  5776 +
  5777 + // Test component configuration
  5778 + f_cf01Up(true);
  5779 +
  5780 + // Test adapter configuration
  5781 +
  5782 + // Preamble
  5783 + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
  5784 +
  5785 + if(isvalue(p_childResourceType)) {
  5786 + if(valueof(p_childResourceType) == int23) {
  5787 + f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType));
  5788 + } else {
  5789 + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType));
  5790 + }
  5791 + }
  5792 +
  5793 + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex);
  5794 +
  5795 + if(p_resourceType != int15) {
  5796 + v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex);
  5797 + }
  5798 +
  5799 + // Test Body
  5800 + v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive);
  5801 + v_request.resultContent := int9;//Modified Attributes
  5802 + mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
  5803 + tc_ac.start;
  5804 + alt {
  5805 + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004, p_contentResponse))) -> value v_response {
  5806 + tc_ac.stop;
  5807 + setverdict(pass, __SCOPE__ & ": Only modified attributes provided with RCN set to " & int2str(enum2int(v_request.resultContent)));
  5808 + }
  5809 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
  5810 + tc_ac.stop;
  5811 + setverdict(fail, __SCOPE__ & ": Wrong response status code");
  5812 + }
  5813 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
  5814 + tc_ac.stop;
  5815 + setverdict(fail, __SCOPE__ & ": Wrong content provided with RCN set to " & int2str(enum2int(v_request.resultContent)));
  5816 + }
  5817 + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
  5818 + tc_ac.stop;
  5819 + setverdict(fail, __SCOPE__ & ": Error while updating resource");
  5820 + }
  5821 + [] tc_ac.timeout {
  5822 + setverdict(fail, __SCOPE__ & ": No answer while updating resource");
  5823 + }
  5824 + }
  5825 +
  5826 + // Postamble
  5827 + f_cse_postamble_deleteResources();
  5828 +
  5829 + // Tear down
  5830 + f_cf01Down();
  5831 +
  5832 + }//end f_CSE_DMR_UPD_022
  5833 +
  5834 + }//end group Update
  5835 +
  5836 + group Delete {
  5837 +
  5838 + function f_CSE_DMR_DEL_001(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive) runs on AeSimu {
  5839 + // Local variables
  5840 + var MsgIn v_response;
  5841 + var RequestPrimitive v_request;
  5842 + var integer v_aeIndex := -1;
  5843 + var integer v_parentIndex := -1;
  5844 + var integer v_containerIndex := -1;
  5845 + var integer v_resourceIndex := -1;
  5846 + var integer v_ae2Index := -1;
  5847 +
  5848 + // Test control
  5849 +
  5850 + // Test component configuration
  5851 + f_cf01Up(true);
  5852 +
  5853 + // Test adapter configuration
  5854 +
  5855 + // Preamble
  5856 + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi)
  5857 +
  5858 + f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType);
  5859 +
  5860 + if(p_resourceType == int4) {
  5861 + v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
  5862 + v_parentIndex := v_containerIndex;
  5863 + }else{
  5864 + v_parentIndex := v_aeIndex;
  5865 + }
  5866 +
  5867 + v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex);
  5868 +
  5869 + // Test Body
  5870 + v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
  5871 +
  5872 + mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
  5873 + tc_ac.start;
  5874 + alt {
  5875 + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) -> value v_response {
  5876 + tc_ac.stop;
  5877 + setverdict(pass, __SCOPE__ & ": Resource" & int2str(enum2int(p_resourceType)) & " deleted successfully");
  5878 + }
  5879 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
  5880 + tc_ac.stop;
  5881 + setverdict(fail, __SCOPE__ & ": Wrong response status code");
  5882 + }
  5883 + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
  5884 + tc_ac.stop;
  5885 + setverdict(fail, __SCOPE__ & ": Error while deleting resource type " & int2str(enum2int(p_resourceType)));
  5886 + }
  5887 + [] tc_ac.timeout {
  5888 + setverdict(fail, __SCOPE__ & ": No answer while deleting resource type " & int2str(enum2int(p_resourceType)));
  5889 + }
  5890 + }
  5891 +
  5892 + f_checkAeSimuStatus();
  5893 +
  5894 + //Check to see if the resource is present or not
  5895 + if (f_cse_isResourceNotPresent(v_aeIndex, f_getResourceName(vc_resourcesList[v_resourceIndex].resource))){
  5896 + setverdict(pass, __SCOPE__ & ":INFO: Resource deleted");
  5897 + } else {
  5898 + setverdict(fail, __SCOPE__ & ":ERROR: Resource not deleted");
  5899 + }
  5900 +
  5901 + // Postamble
  5902 + f_cse_postamble_deleteResources();
  5903 +
  5904 + // Tear down
  5905 + f_cf01Down();
  5906 +
  5907 + };//end f_CSE_DMR_DEL_001
  5908 +
  5909 + function f_CSE_DMR_DEL_002(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive) runs on AeSimu {
  5910 + // Local variables
  5911 + var MsgIn v_response;
  5912 + var RequestPrimitive v_request;
  5913 + var RequestPrimitive v_updateRequest;
  5914 + var integer v_acpAuxIndex := -1;
  5915 + var integer v_aeIndex := -1;
  5916 + var integer v_resourceIndex := -1;
  5917 + var integer v_ae2Index := -1;
  5918 + var AccessControlRule v_accessControlRule_1 := valueof(m_createAcr({PX_SUPER_AE_ID}, int63));
  5919 + var AccessControlRule v_accessControlRule_2;
  5920 + var SetOfAcrs v_setOfArcs;
  5921 +
  5922 + // Test control
  5923 + if(not(PICS_ACP_SUPPORT)) {
  5924 + setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case");
  5925 + stop;
  5926 + }
  5927 +
  5928 + // Test component configuration
  5929 + f_cf01Up(true);
  5930 +
  5931 + // Test adapter configuration
  5932 +
  5933 + // Preamble
  5934 + v_acpAuxIndex := f_cse_preamble_createAcpAux(-,-);//c_CRDNDi);
5562 5935 v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);//c_CRUNDi);
5563 5936  
5564 5937 f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType);
... ... @@ -5815,9 +6188,267 @@ module OneM2M_PermutationFunctions {
5815 6188 // Tear down
5816 6189 f_cf01Down();
5817 6190 };//end f_CSE_DMR_DEL_006
5818   -
  6191 +
  6192 + function f_CSE_DMR_DEL_011(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, ResultContent p_resultContent) runs on AeSimu {
  6193 +
  6194 + // Local variables
  6195 + var MsgIn v_response;
  6196 + var RequestPrimitive v_request;
  6197 + var integer v_aeIndex := -1;
  6198 + var integer v_resourceIndex := -1;
  6199 +
  6200 + // Test control
  6201 +
  6202 + // Test component configuration
  6203 + f_cf01Up();
  6204 +
  6205 + // Test adapter configuration
  6206 +
  6207 + // Preamble
  6208 + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
  6209 +
  6210 + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex);
  6211 +
  6212 + // Test Body
  6213 + v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
  6214 + v_request.resultContent := p_resultContent;
  6215 +
  6216 + mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
  6217 + tc_ac.start;
  6218 + alt {
  6219 + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) { //BAD REQUEST
  6220 + tc_ac.stop;
  6221 + setverdict(pass, __SCOPE__ & ": Request successfully rejected");
  6222 + }
  6223 + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
  6224 + tc_ac.stop;
  6225 + setverdict(fail, __SCOPE__ & ": Wrong response status code");
  6226 + }
  6227 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
  6228 + tc_ac.stop;
  6229 + setverdict(fail, __SCOPE__ & ": Error, Result content set to " & int2str(enum2int(p_resultContent)) & " is impossible for a DELETE request ");
  6230 + }
  6231 + [] tc_ac.timeout {
  6232 + setverdict(fail, __SCOPE__ & ": No answer while deleting resource");
  6233 + }
  6234 + }
  6235 +
  6236 + // Postamble
  6237 + f_cse_postamble_deleteResources();
  6238 +
  6239 + // Tear down
  6240 + f_cf01Down();
  6241 +
  6242 + }//end f_CSE_DMR_DEL_011
  6243 +
  6244 + function f_CSE_DMR_DEL_012(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on AeSimu {
  6245 +
  6246 + // Local variables
  6247 + var MsgIn v_response;
  6248 + var RequestPrimitive v_request;
  6249 + var integer v_aeIndex := -1;
  6250 + var integer v_ae2Index := -1;
  6251 + var integer v_resourceIndex := -1;
  6252 + var integer v_childResourceIndex := -1;
  6253 +
  6254 + // Test control
  6255 +
  6256 + // Test component configuration
  6257 + f_cf01Up(true);
  6258 +
  6259 + // Test adapter configuration
  6260 +
  6261 + // Preamble
  6262 + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
  6263 +
  6264 + if(isvalue(p_childResourceType)) {
  6265 + if(valueof(p_childResourceType) == int23) {
  6266 + f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType));
  6267 + } else {
  6268 + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType));
  6269 + }
  6270 + }
  6271 +
  6272 + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex);
  6273 +
  6274 + if(p_resourceType != int15) {
  6275 + v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex);
  6276 + }
  6277 +
  6278 + // Test Body
  6279 + v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
  6280 + v_request.resultContent := int0;//Nothing
  6281 +
  6282 + mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
  6283 + tc_ac.start;
  6284 + alt {
  6285 + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002, omit))) -> value v_response {
  6286 + tc_ac.stop;
  6287 + setverdict(pass, __SCOPE__ & ": Nothing provided with RCN set to " & int2str(enum2int(v_request.resultContent)));
  6288 + }
  6289 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(omit))) -> value v_response {
  6290 + tc_ac.stop;
  6291 + setverdict(fail, __SCOPE__ & ": Wrong response status code");
  6292 + }
  6293 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
  6294 + tc_ac.stop;
  6295 + setverdict(fail, __SCOPE__ & ": Some content provided with RCN set to " & int2str(enum2int(v_request.resultContent)));
  6296 + }
  6297 + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
  6298 + tc_ac.stop;
  6299 + setverdict(fail, __SCOPE__ & ": Error while deleting resource");
  6300 + }
  6301 + [] tc_ac.timeout {
  6302 + setverdict(fail, __SCOPE__ & ": No answer while deleting resource");
  6303 + }
  6304 + }
  6305 +
  6306 + // Postamble
  6307 + f_cse_postamble_deleteResources();
  6308 +
  6309 + // Tear down
  6310 + f_cf01Down();
  6311 +
  6312 + }//end f_CSE_DMR_DEL_012
  6313 +
  6314 + function f_CSE_DMR_DEL_013(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on AeSimu {
  6315 +
  6316 + // Local variables
  6317 + var MsgIn v_response;
  6318 + var RequestPrimitive v_request;
  6319 + var integer v_aeIndex := -1;
  6320 + var integer v_ae2Index := -1;
  6321 + var integer v_resourceIndex := -1;
  6322 + var integer v_childResourceIndex := -1;
  6323 +
  6324 + // Test control
  6325 +
  6326 + // Test component configuration
  6327 + f_cf01Up(true);
  6328 +
  6329 + // Test adapter configuration
  6330 +
  6331 + // Preamble
  6332 + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
  6333 +
  6334 + if(isvalue(p_childResourceType)) {
  6335 + if(valueof(p_childResourceType) == int23) {
  6336 + f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType));
  6337 + } else {
  6338 + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType));
  6339 + }
  6340 + }
  6341 +
  6342 + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex);
  6343 +
  6344 + if(p_resourceType != int15) {
  6345 + v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex);
  6346 + }
  6347 +
  6348 + // Test Body
  6349 + v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
  6350 + v_request.resultContent := int1;//Attributes
  6351 +
  6352 + mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
  6353 + tc_ac.start;
  6354 + alt {
  6355 + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002, p_contentResponse))) -> value v_response {
  6356 + tc_ac.stop;
  6357 + setverdict(pass, __SCOPE__ & ": All attributes provided with RCN set to " & int2str(enum2int(v_request.resultContent)));
  6358 + }
  6359 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
  6360 + tc_ac.stop;
  6361 + setverdict(fail, __SCOPE__ & ": Wrong response status code");
  6362 + }
  6363 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
  6364 + tc_ac.stop;
  6365 + setverdict(fail, __SCOPE__ & ": Wrong content provided with RCN set to " & int2str(enum2int(v_request.resultContent)));
  6366 + }
  6367 + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
  6368 + tc_ac.stop;
  6369 + setverdict(fail, __SCOPE__ & ": Error while deleting resource");
  6370 + }
  6371 + [] tc_ac.timeout {
  6372 + setverdict(fail, __SCOPE__ & ": No answer while deleting resource");
  6373 + }
  6374 + }
  6375 +
  6376 + // Postamble
  6377 + f_cse_postamble_deleteResources();
  6378 +
  6379 + // Tear down
  6380 + f_cf01Down();
  6381 +
  6382 + }//end f_CSE_DMR_DEL_013
  6383 +
5819 6384 }//end group Delete
5820 6385  
  6386 + group Notify {
  6387 +
  6388 + function f_CSE_DMR_NTF_001(ResultContent p_resultContent) runs on AeSimu {
  6389 +
  6390 + // Local variables
  6391 + var MsgIn v_response;
  6392 + var RequestPrimitive v_request;
  6393 + var integer v_aeIndex, v_ae2Index := -1;
  6394 +
  6395 + // Test control
  6396 +
  6397 + // Test component configuration
  6398 + f_cf01Up(true);
  6399 +
  6400 + // Test adapter configuration
  6401 +
  6402 + // Preamble
  6403 + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
  6404 +
  6405 + vc_ae2.start(f_cse_createAccessControlPolicyAux("Ae2Acp",{"all"}, int63));
  6406 + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
  6407 +
  6408 + vc_ae2.start(f_cse_createResource_withAcpAux(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, c_defaultAE2Name, {f_getCompletePoA("HTTP", PX_AE2_ADDRESS, "")}), -1)); // AE2 is registred
  6409 + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
  6410 +
  6411 + v_ae2Index := f_getLatestResource(vc_ae2);
  6412 +
  6413 + // Test Body
  6414 + v_request := valueof(m_notifyNotification(f_getResourceAddress(v_ae2Index), m_contentNotification_subscriptionVerification(vc_resourcesList[v_ae2Index].resource.aE.aE_ID)));
  6415 + v_request.from_ := f_getOriginator(v_aeIndex, e_ae);
  6416 + v_request.resultContent := p_resultContent;
  6417 +
  6418 + vc_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler());
  6419 +
  6420 + mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
  6421 + tc_ac.start;
  6422 + alt {
  6423 + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) { //BAD REQUEST
  6424 + tc_ac.stop;
  6425 + setverdict(pass, __SCOPE__ & ": Request successfully rejected");
  6426 + }
  6427 + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
  6428 + tc_ac.stop;
  6429 + setverdict(fail, __SCOPE__ & ": Wrong response status code");
  6430 + }
  6431 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
  6432 + tc_ac.stop;
  6433 + setverdict(fail, __SCOPE__ & ": Error, Result content set to " & int2str(enum2int(p_resultContent)) & " is not valid for a NOTIFY request ");
  6434 + }
  6435 + [] tc_ac.timeout {
  6436 + setverdict(fail, __SCOPE__ & ": No answer while deleting resource");
  6437 + }
  6438 + }
  6439 +
  6440 + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
  6441 +
  6442 + // Postamble
  6443 + f_cse_postamble_deleteResources();
  6444 +
  6445 + // Tear down
  6446 + f_cf01Down();
  6447 +
  6448 + }//end f_CSE_DMR_NTF_001
  6449 +
  6450 + }//end group Notify
  6451 +
5821 6452 }//end group Data_Management_and_Repository
5822 6453  
5823 6454 group Location {
... ...
... ... @@ -816,7 +816,152 @@ module OneM2M_Testcases_CSE_Release_2 {
816 816 v_ae1.start(f_CSE_DMR_CRE_018(int8));//ResultContent = 8 (child resources)
817 817 v_ae1.done;
818 818 }
819   - } // end g_CSE_DMR_CRE_018
  819 + } // end g_CSE_DMR_CRE_018
  820 +
  821 + group g_CSE_DMR_CRE_019 {
  822 + /**
  823 + * @desc Check that the IUT returns successfully only attributes of TARGET_RESOURCE_ADDRESS resource when the ResultContent set to 1 (Attributes)
  824 + *
  825 + */
  826 + testcase TC_CSE_DMR_CRE_019_CNT() runs on Tester system CseSystem {
  827 + // Local variables
  828 + var template PrimitiveContent v_contentResponse;
  829 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  830 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  831 + v_ae1.done;
  832 +
  833 + v_contentResponse.container := mw_contentContainer_rc1;
  834 +
  835 + v_ae1.start(f_CSE_DMR_CRE_019(int3, m_createContainerBase, v_contentResponse));//Container
  836 + v_ae1.done;
  837 + }
  838 +
  839 + testcase TC_CSE_DMR_CRE_019_GRP() runs on Tester system CseSystem {
  840 + // Local variables
  841 + var template PrimitiveContent v_contentResponse;
  842 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  843 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  844 + v_ae1.done;
  845 +
  846 + v_contentResponse.group_ := mw_contentGroup_rc1;
  847 +
  848 + v_ae1.start(f_CSE_DMR_CRE_019(int9, m_createGroupBase, v_contentResponse));//Group
  849 + v_ae1.done;
  850 + }
  851 +
  852 + testcase TC_CSE_DMR_CRE_019_ACP() runs on Tester system CseSystem {
  853 + // Local variables
  854 + var template PrimitiveContent v_contentResponse;
  855 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  856 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  857 + v_ae1.done;
  858 +
  859 + v_contentResponse.accessControlPolicy := mw_contentAcp_rc1;
  860 +
  861 + v_ae1.start(f_CSE_DMR_CRE_019(int1, m_createAcpBase, v_contentResponse));//AccessControlPolicy
  862 + v_ae1.done;
  863 + }
  864 +
  865 + testcase TC_CSE_DMR_CRE_019_SUB() runs on Tester system CseSystem {
  866 + // Local variables
  867 + var template PrimitiveContent v_contentResponse;
  868 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  869 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  870 + v_ae1.done;
  871 +
  872 + v_contentResponse.subscription := mw_contentSubscription_rc1;
  873 +
  874 + v_ae1.start(f_CSE_DMR_CRE_019(int23, m_createSubscriptionBase, v_contentResponse));//Subscription
  875 + v_ae1.done;
  876 + }
  877 +
  878 + testcase TC_CSE_DMR_CRE_019_PCH() runs on Tester system CseSystem {
  879 + // Local variables
  880 + var template PrimitiveContent v_contentResponse;
  881 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  882 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  883 + v_ae1.done;
  884 +
  885 + v_contentResponse.pollingChannel := mw_contentPollingChannel_rc1;
  886 +
  887 + v_ae1.start(f_CSE_DMR_CRE_019(int15, m_createPollingChannelBase, v_contentResponse));//PollingChannel
  888 + v_ae1.done;
  889 + }
  890 +
  891 + } // end g_CSE_DMR_CRE_019
  892 +
  893 + group g_CSE_DMR_CRE_020 {
  894 +
  895 + /**
  896 + * @desc Check that the IUT returns successfully only modified attributes of TARGET_RESOURCE_ADDRESS resource when the Result Content is set to 9 (modified attributes)
  897 + *
  898 + */
  899 + testcase TC_CSE_DMR_CRE_020_CNT() runs on Tester system CseSystem {
  900 + // Local variables
  901 + var template PrimitiveContent v_contentResponse;
  902 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  903 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  904 + v_ae1.done;
  905 +
  906 + v_contentResponse.container := mw_contentContainer_rc1;
  907 +
  908 + v_ae1.start(f_CSE_DMR_CRE_020(int3, m_createContainerBase, v_contentResponse));//Container
  909 + v_ae1.done;
  910 + }
  911 +
  912 + testcase TC_CSE_DMR_CRE_020_GRP() runs on Tester system CseSystem {
  913 + // Local variables
  914 + var template PrimitiveContent v_contentResponse;
  915 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  916 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  917 + v_ae1.done;
  918 +
  919 + v_contentResponse.group_ := mw_contentGroup_rc1;
  920 +
  921 + v_ae1.start(f_CSE_DMR_CRE_020(int9, m_createGroupBase, v_contentResponse));//Group
  922 + v_ae1.done;
  923 + }
  924 +
  925 + testcase TC_CSE_DMR_CRE_020_ACP() runs on Tester system CseSystem {
  926 + // Local variables
  927 + var template PrimitiveContent v_contentResponse;
  928 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  929 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  930 + v_ae1.done;
  931 +
  932 + v_contentResponse.accessControlPolicy := mw_contentAcp_rc1;
  933 +
  934 + v_ae1.start(f_CSE_DMR_CRE_020(int1, m_createAcpBase,v_contentResponse));//AccessControlPolicy
  935 + v_ae1.done;
  936 + }
  937 +
  938 + testcase TC_CSE_DMR_CRE_020_SUB() runs on Tester system CseSystem {
  939 + // Local variables
  940 + var template PrimitiveContent v_contentResponse;
  941 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  942 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  943 + v_ae1.done;
  944 +
  945 + v_contentResponse.subscription := mw_contentSubscription_rc1;
  946 +
  947 + v_ae1.start(f_CSE_DMR_CRE_020(int23, m_createSubscriptionBase, v_contentResponse));//Subscription
  948 + v_ae1.done;
  949 + }
  950 +
  951 + testcase TC_CSE_DMR_CRE_020_PCH() runs on Tester system CseSystem {
  952 + // Local variables
  953 + var template PrimitiveContent v_contentResponse;
  954 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  955 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  956 + v_ae1.done;
  957 +
  958 + v_contentResponse.pollingChannel := mw_contentPollingChannel_rc1;
  959 +
  960 + v_ae1.start(f_CSE_DMR_CRE_020(int15, m_createPollingChannelBase, v_contentResponse));//PollingChannel
  961 + v_ae1.done;
  962 + }
  963 + } // end g_CSE_DMR_CRE_020
  964 +
820 965 }//end group Create
821 966  
822 967 group Retrieve {
... ... @@ -877,6 +1022,14 @@ module OneM2M_Testcases_CSE_Release_2 {
877 1022 v_ae1.done;
878 1023 }
879 1024  
  1025 + testcase TC_CSE_DMR_RET_020_RCN_9() runs on Tester system CseSystem {
  1026 + // Local variables
  1027 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  1028 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  1029 + v_ae1.done;
  1030 + v_ae1.start(f_CSE_DMR_RET_020(int3, m_createContainerBase, int9));//ResultContent = 9 (modified attributes)
  1031 + v_ae1.done;
  1032 + }
880 1033 } // end g_CSE_DMR_RET_020
881 1034  
882 1035 group g_CSE_DMR_RET_021 {
... ... @@ -2040,31 +2193,594 @@ module OneM2M_Testcases_CSE_Release_2 {
2040 2193  
2041 2194  
2042 2195 } // end g_CSE_DMR_UPD_014
  2196 +
  2197 + group g_CSE_DMR_UPD_019 {
  2198 +
  2199 + /**
  2200 + * @desc Check that the IUT rejects a UPDATE Request target to TARGET_RESOURCE_ADDRESS resource when the Result Content set to RESULT_CONTENT
  2201 + *
  2202 + */
  2203 + testcase TC_CSE_DMR_UPD_019_RCN_2() runs on Tester system CseSystem {
  2204 + // Local variables
  2205 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2206 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2207 + v_ae1.done;
  2208 + v_ae1.start(f_CSE_DMR_UPD_019(int3, m_createContainerBase, int2));//ResultContent = 2 (hierarchical address)
  2209 + v_ae1.done;
  2210 + }
  2211 +
  2212 + testcase TC_CSE_DMR_UPD_019_RCN_3() runs on Tester system CseSystem {
  2213 + // Local variables
  2214 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2215 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2216 + v_ae1.done;
  2217 + v_ae1.start(f_CSE_DMR_UPD_019(int3, m_createContainerBase, int3));//ResultContent = 3 (attributes and hierarchichal address)
  2218 + v_ae1.done;
  2219 + }
2043 2220  
2044   - }//end group Update
2045   -
2046   - group Delete {
2047   -
2048   - group g_CSE_DMR_DEL_001{
  2221 + testcase TC_CSE_DMR_UPD_019_RCN_4() runs on Tester system CseSystem {
  2222 + // Local variables
  2223 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2224 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2225 + v_ae1.done;
  2226 + v_ae1.start(f_CSE_DMR_UPD_019(int3, m_createContainerBase, int4));//ResultContent = 4 (attributes and child resources)
  2227 + v_ae1.done;
  2228 + }
  2229 +
  2230 + testcase TC_CSE_DMR_UPD_019_RCN_5() runs on Tester system CseSystem {
  2231 + // Local variables
  2232 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2233 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2234 + v_ae1.done;
  2235 + v_ae1.start(f_CSE_DMR_UPD_019(int3, m_createContainerBase, int5));//ResultContent = 5 (attributes and child resource references)
  2236 + v_ae1.done;
  2237 + }
  2238 +
  2239 + testcase TC_CSE_DMR_UPD_019_RCN_6() runs on Tester system CseSystem {
  2240 + // Local variables
  2241 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2242 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2243 + v_ae1.done;
  2244 + v_ae1.start(f_CSE_DMR_UPD_019(int3, m_createContainerBase, int6));//ResultContent = 6 (child resource references)
  2245 + v_ae1.done;
  2246 + }
  2247 +
  2248 + testcase TC_CSE_DMR_UPD_019_RCN_7() runs on Tester system CseSystem {
  2249 + // Local variables
  2250 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2251 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2252 + v_ae1.done;
  2253 + v_ae1.start(f_CSE_DMR_UPD_019(int3, m_createContainerBase, int7));//ResultContent = 7 (original resource)
  2254 + v_ae1.done;
  2255 + }
  2256 +
  2257 + testcase TC_CSE_DMR_UPD_019_RCN_8() runs on Tester system CseSystem {
  2258 + // Local variables
  2259 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2260 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2261 + v_ae1.done;
  2262 + v_ae1.start(f_CSE_DMR_UPD_019(int3, m_createContainerBase, int8));//ResultContent = 8 (child resources)
  2263 + v_ae1.done;
  2264 + }
  2265 + } // end g_CSE_DMR_UPD_019
2049 2266  
  2267 + group g_CSE_DMR_UPD_020 {
  2268 +
2050 2269 /**
2051   - * @desc Check that the IUT accepts the deletion of a RESOURCE_TYPE resource
  2270 + * @desc Check that the IUT returns nothing of TARGET_RESOURCE_ADDRESS resource when the Result Content is set to 0 (nothing)
2052 2271 *
2053 2272 */
2054   - testcase TC_CSE_DMR_DEL_001_PCH() runs on Tester system CseSystem {
  2273 + testcase TC_CSE_DMR_UPD_020_CNT() runs on Tester system CseSystem {
2055 2274 // Local variables
2056 2275 var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2276 + var RequestPrimitive v_updateRequest := valueof(m_updateContainerBase);
  2277 +
2057 2278 v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
2058 2279 v_ae1.done;
2059   -
2060   - v_ae1.start(f_CSE_DMR_DEL_001(int15, m_createPollingChannelBase));//PollingChannel
  2280 + v_updateRequest.primitiveContent.container.labels := {"VALUE_1"};
  2281 +
  2282 + v_ae1.start(f_CSE_DMR_UPD_020(int3, m_createContainerBase, int3, m_createContainerBase, v_updateRequest));//Container
2061 2283 v_ae1.done;
2062   - };
2063   -
2064   - };//end of group g_CSE_DMR_DEL_001
2065   -
2066   -
2067   - }//end group Delete
  2284 + }
  2285 +
  2286 + testcase TC_CSE_DMR_UPD_020_GRP() runs on Tester system CseSystem {
  2287 + // Local variables
  2288 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2289 + var RequestPrimitive v_updateRequest := valueof(m_updateGroupBase);
  2290 +
  2291 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2292 + v_ae1.done;
  2293 + v_updateRequest.primitiveContent.group_.labels := {"VALUE_1"};
  2294 +
  2295 + v_ae1.start(f_CSE_DMR_UPD_020(int9, m_createGroupBase, int23, m_createSubscriptionBase, v_updateRequest));//Group
  2296 + v_ae1.done;
  2297 + }
  2298 +
  2299 + testcase TC_CSE_DMR_UPD_020_ACP() runs on Tester system CseSystem {
  2300 + // Local variables
  2301 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2302 + var RequestPrimitive v_updateRequest := valueof(m_updateAcpBase);
  2303 +
  2304 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2305 + v_ae1.done;
  2306 + v_updateRequest.primitiveContent.accessControlPolicy.labels := {"VALUE_1"};
  2307 +
  2308 + v_ae1.start(f_CSE_DMR_UPD_020(int1, m_createAcpBase, int23, m_createSubscriptionBase, v_updateRequest));//AccessControlPolicy
  2309 + v_ae1.done;
  2310 + }
  2311 +
  2312 + } // end g_CSE_DMR_UPD_020
  2313 +
  2314 + group g_CSE_DMR_UPD_021 {
  2315 +
  2316 + /**
  2317 + * @desc Check that the IUT returns successfully only attributes of TARGET_RESOURCE_ADDRESS resource when the Result Content is set to 1 (attributes)
  2318 + *
  2319 + */
  2320 + testcase TC_CSE_DMR_UPD_021_CNT() runs on Tester system CseSystem {
  2321 + // Local variables
  2322 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2323 + var RequestPrimitive v_updateRequest := valueof(m_updateContainerBase);
  2324 + var template PrimitiveContent v_contentResponse;
  2325 +
  2326 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2327 + v_ae1.done;
  2328 + v_updateRequest.primitiveContent.container.labels := {"VALUE_1"};
  2329 + v_contentResponse := f_getTemplateFromPrimitiveContent(v_updateRequest.primitiveContent);
  2330 +
  2331 + v_ae1.start(f_CSE_DMR_UPD_021(int3, m_createContainerBase, v_contentResponse, int3, m_createContainerBase, v_updateRequest));//Container
  2332 + v_ae1.done;
  2333 + }
  2334 +
  2335 + testcase TC_CSE_DMR_UPD_021_GRP() runs on Tester system CseSystem {
  2336 + // Local variables
  2337 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2338 + var RequestPrimitive v_updateRequest := valueof(m_updateGroupBase);
  2339 + var template PrimitiveContent v_contentResponse;
  2340 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2341 + v_ae1.done;
  2342 + v_updateRequest.primitiveContent.group_.labels := {"VALUE_1"};
  2343 + v_contentResponse := f_getTemplateFromPrimitiveContent(v_updateRequest.primitiveContent);
  2344 +
  2345 + v_ae1.start(f_CSE_DMR_UPD_021(int9, m_createGroupBase, v_contentResponse, int23, m_createSubscriptionBase, v_updateRequest));//Group
  2346 + v_ae1.done;
  2347 + }
  2348 +
  2349 + testcase TC_CSE_DMR_UPD_021_ACP() runs on Tester system CseSystem {
  2350 + // Local variables
  2351 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2352 + var RequestPrimitive v_updateRequest := valueof(m_updateAcpBase);
  2353 + var template PrimitiveContent v_contentResponse;
  2354 +
  2355 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2356 + v_ae1.done;
  2357 + v_updateRequest.primitiveContent.accessControlPolicy.labels := {"VALUE_1"};
  2358 + v_contentResponse := f_getTemplateFromPrimitiveContent(v_updateRequest.primitiveContent);
  2359 +
  2360 + v_ae1.start(f_CSE_DMR_UPD_021(int1, m_createAcpBase,v_contentResponse, int23, m_createSubscriptionBase, v_updateRequest));//AccessControlPolicy
  2361 + v_ae1.done;
  2362 + }
  2363 +
  2364 + } // end g_CSE_DMR_UPD_021
  2365 +
  2366 + group g_CSE_DMR_UPD_022 {
  2367 +
  2368 + /**
  2369 + * @desc Check that the IUT returns nothing of TARGET_RESOURCE_ADDRESS resource when the Result Content is set to 0 (nothing)
  2370 + *
  2371 + */
  2372 + testcase TC_CSE_DMR_UPD_022_CNT() runs on Tester system CseSystem {
  2373 + // Local variables
  2374 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2375 + var RequestPrimitive v_updateRequest := valueof(m_updateContainerBase);
  2376 + var template PrimitiveContent v_contentResponse;
  2377 +
  2378 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2379 + v_ae1.done;
  2380 + v_contentResponse.container := m_contentContainer_allOmit;
  2381 + v_contentResponse.container.labels := ?;
  2382 + v_updateRequest.primitiveContent.container.labels := {"VALUE_1"};
  2383 +
  2384 + v_ae1.start(f_CSE_DMR_UPD_022(int3, m_createContainerBase, v_contentResponse, int3, m_createContainerBase, v_updateRequest));//Container
  2385 + v_ae1.done;
  2386 + }
  2387 +
  2388 + testcase TC_CSE_DMR_UPD_022_GRP() runs on Tester system CseSystem {
  2389 + // Local variables
  2390 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2391 + var RequestPrimitive v_updateRequest := valueof(m_updateGroupBase);
  2392 + var template PrimitiveContent v_contentResponse;
  2393 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2394 + v_ae1.done;
  2395 + v_contentResponse.group_ := m_contentGroup_allOmit;
  2396 + v_contentResponse.group_.labels := ?;
  2397 + v_updateRequest.primitiveContent.group_.labels := {"VALUE_1"};
  2398 +
  2399 + v_ae1.start(f_CSE_DMR_UPD_022(int9, m_createGroupBase, v_contentResponse, int23, m_createSubscriptionBase, v_updateRequest));//Group
  2400 + v_ae1.done;
  2401 + }
  2402 +
  2403 + testcase TC_CSE_DMR_UPD_022_ACP() runs on Tester system CseSystem {
  2404 + // Local variables
  2405 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2406 + var RequestPrimitive v_updateRequest := valueof(m_updateAcpBase);
  2407 + var template PrimitiveContent v_contentResponse;
  2408 +
  2409 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2410 + v_ae1.done;
  2411 + v_contentResponse.accessControlPolicy := m_contentAcp_allOmit;
  2412 + v_contentResponse.accessControlPolicy.labels := ?;
  2413 + v_updateRequest.primitiveContent.accessControlPolicy.labels := {"VALUE_1"};
  2414 +
  2415 + v_ae1.start(f_CSE_DMR_UPD_022(int1, m_createAcpBase,v_contentResponse, int23, m_createSubscriptionBase, v_updateRequest));//AccessControlPolicy
  2416 + v_ae1.done;
  2417 + }
  2418 +
  2419 + } // end g_CSE_DMR_UPD_022
  2420 +
  2421 + }//end group Update
  2422 +
  2423 + group Delete {
  2424 +
  2425 + group g_CSE_DMR_DEL_001{
  2426 +
  2427 + /**
  2428 + * @desc Check that the IUT accepts the deletion of a RESOURCE_TYPE resource
  2429 + *
  2430 + */
  2431 + testcase TC_CSE_DMR_DEL_001_PCH() runs on Tester system CseSystem {
  2432 + // Local variables
  2433 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2434 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2435 + v_ae1.done;
  2436 +
  2437 + v_ae1.start(f_CSE_DMR_DEL_001(int15, m_createPollingChannelBase));//PollingChannel
  2438 + v_ae1.done;
  2439 + };
  2440 +
  2441 + };//end of group g_CSE_DMR_DEL_001
  2442 +
  2443 + group g_CSE_DMR_DEL_011 {
  2444 +
  2445 + /**
  2446 + * @desc Check that the IUT rejects a DELETE Request target to TARGET_RESOURCE_ADDRESS resource when the Result Content set to RESULT_CONTENT
  2447 + *
  2448 + */
  2449 + testcase TC_CSE_DMR_DEL_011_RCN_2() runs on Tester system CseSystem {
  2450 + // Local variables
  2451 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2452 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2453 + v_ae1.done;
  2454 + v_ae1.start(f_CSE_DMR_DEL_011(int3, m_createContainerBase, int2));//ResultContent = 2 (hierarchical address)
  2455 + v_ae1.done;
  2456 + }
  2457 +
  2458 + testcase TC_CSE_DMR_DEL_011_RCN_3() runs on Tester system CseSystem {
  2459 + // Local variables
  2460 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2461 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2462 + v_ae1.done;
  2463 + v_ae1.start(f_CSE_DMR_DEL_011(int3, m_createContainerBase, int3));//ResultContent = 3 (attributes and hierarchichal address)
  2464 + v_ae1.done;
  2465 + }
  2466 +
  2467 + testcase TC_CSE_DMR_DEL_011_RCN_4() runs on Tester system CseSystem {
  2468 + // Local variables
  2469 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2470 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2471 + v_ae1.done;
  2472 + v_ae1.start(f_CSE_DMR_DEL_011(int3, m_createContainerBase, int4));//ResultContent = 4 (attributes and child resources)
  2473 + v_ae1.done;
  2474 + }
  2475 +
  2476 + testcase TC_CSE_DMR_DEL_011_RCN_5() runs on Tester system CseSystem {
  2477 + // Local variables
  2478 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2479 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2480 + v_ae1.done;
  2481 + v_ae1.start(f_CSE_DMR_DEL_011(int3, m_createContainerBase, int5));//ResultContent = 5 (attributes and child resource references)
  2482 + v_ae1.done;
  2483 + }
  2484 +
  2485 + testcase TC_CSE_DMR_DEL_011_RCN_6() runs on Tester system CseSystem {
  2486 + // Local variables
  2487 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2488 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2489 + v_ae1.done;
  2490 + v_ae1.start(f_CSE_DMR_DEL_011(int3, m_createContainerBase, int6));//ResultContent = 6 (child resource references)
  2491 + v_ae1.done;
  2492 + }
  2493 +
  2494 + testcase TC_CSE_DMR_DEL_011_RCN_7() runs on Tester system CseSystem {
  2495 + // Local variables
  2496 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2497 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2498 + v_ae1.done;
  2499 + v_ae1.start(f_CSE_DMR_DEL_011(int3, m_createContainerBase, int7));//ResultContent = 7 (original resource)
  2500 + v_ae1.done;
  2501 + }
  2502 +
  2503 + testcase TC_CSE_DMR_DEL_011_RCN_8() runs on Tester system CseSystem {
  2504 + // Local variables
  2505 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2506 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2507 + v_ae1.done;
  2508 + v_ae1.start(f_CSE_DMR_DEL_011(int3, m_createContainerBase, int8));//ResultContent = 8 (child resources)
  2509 + v_ae1.done;
  2510 + }
  2511 +
  2512 + testcase TC_CSE_DMR_DEL_011_RCN_9() runs on Tester system CseSystem {
  2513 + // Local variables
  2514 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2515 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2516 + v_ae1.done;
  2517 + v_ae1.start(f_CSE_DMR_DEL_011(int3, m_createContainerBase, int9));//ResultContent = 9 (modified attributes)
  2518 + v_ae1.done;
  2519 + }
  2520 + } // end g_CSE_DMR_DEL_011
  2521 +
  2522 + group g_CSE_DMR_DEL_012 {
  2523 +
  2524 + /**
  2525 + * @desc Check that the IUT returns nothing of TARGET_RESOURCE_ADDRESS resource when the Result Content is set to 0 (nothing)
  2526 + *
  2527 + */
  2528 + testcase TC_CSE_DMR_DEL_012_CNT() runs on Tester system CseSystem {
  2529 + // Local variables
  2530 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2531 +
  2532 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2533 + v_ae1.done;
  2534 +
  2535 + v_ae1.start(f_CSE_DMR_DEL_012(int3, m_createContainerBase, int3, m_createContainerBase));//Container
  2536 + v_ae1.done;
  2537 + }
  2538 +
  2539 + testcase TC_CSE_DMR_DEL_012_GRP() runs on Tester system CseSystem {
  2540 + // Local variables
  2541 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2542 +
  2543 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2544 + v_ae1.done;
  2545 +
  2546 + v_ae1.start(f_CSE_DMR_DEL_012(int9, m_createGroupBase, int23, m_createSubscriptionBase));//Group
  2547 + v_ae1.done;
  2548 + }
  2549 +
  2550 + testcase TC_CSE_DMR_DEL_012_ACP() runs on Tester system CseSystem {
  2551 + // Local variables
  2552 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2553 +
  2554 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2555 + v_ae1.done;
  2556 +
  2557 + v_ae1.start(f_CSE_DMR_DEL_012(int1, m_createAcpBase, int23, m_createSubscriptionBase));//AccessControlPolicy
  2558 + v_ae1.done;
  2559 + }
  2560 +
  2561 + } // end g_CSE_DMR_DEL_012
  2562 +
  2563 + group g_CSE_DMR_DEL_013 {
  2564 +
  2565 + /**
  2566 + * @desc Check that the IUT returns succesfully only attributes of TARGET_RESOURCE_ADDRESS resource when the Result Content is set to 1 (attributes)
  2567 + *
  2568 + */
  2569 + testcase TC_CSE_DMR_DEL_013_CNT() runs on Tester system CseSystem {
  2570 + // Local variables
  2571 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2572 + var template PrimitiveContent v_contentResponse;
  2573 +
  2574 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2575 + v_ae1.done;
  2576 + v_contentResponse.container := mw_contentContainer_rc1;
  2577 +
  2578 + v_ae1.start(f_CSE_DMR_DEL_013(int3, m_createContainerBase, v_contentResponse, int3, m_createContainerBase));//Container
  2579 + v_ae1.done;
  2580 + }
  2581 +
  2582 + testcase TC_CSE_DMR_DEL_013_GRP() runs on Tester system CseSystem {
  2583 + // Local variables
  2584 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2585 + var template PrimitiveContent v_contentResponse;
  2586 +
  2587 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2588 + v_ae1.done;
  2589 + v_contentResponse.group_ := mw_contentGroup_rc1;
  2590 +
  2591 + v_ae1.start(f_CSE_DMR_DEL_013(int9, m_createGroupBase, v_contentResponse, int23, m_createSubscriptionBase));//Group
  2592 + v_ae1.done;
  2593 + }
  2594 +
  2595 + testcase TC_CSE_DMR_DEL_013_ACP() runs on Tester system CseSystem {
  2596 + // Local variables
  2597 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2598 + var template PrimitiveContent v_contentResponse;
  2599 +
  2600 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2601 + v_ae1.done;
  2602 + v_contentResponse.accessControlPolicy := mw_contentAcp_rc1;
  2603 +
  2604 + v_ae1.start(f_CSE_DMR_DEL_013(int1, m_createAcpBase,v_contentResponse, int23, m_createSubscriptionBase));//AccessControlPolicy
  2605 + v_ae1.done;
  2606 + }
  2607 +
  2608 + } // end g_CSE_DMR_DEL_013
  2609 +
  2610 +
  2611 + }//end group Delete
  2612 +
  2613 + group Notify {
  2614 +
  2615 + group g_CSE_DMR_NTF_001 {
  2616 +
  2617 + /**
  2618 + * @desc Check that the IUT rejects a NOTIFY request when the ResultContent is set to RESULT_CONTENT
  2619 + *
  2620 + */
  2621 + testcase TC_CSE_DMR_NTF_001_RCN_1() runs on Tester system CseSystem {
  2622 + // Local variables
  2623 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2624 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2625 + v_ae1.done;
  2626 + v_ae1.start(f_CSE_DMR_NTF_001(int1));//ResultContent = 1 (attributes)
  2627 + v_ae1.done;
  2628 + }
  2629 +
  2630 + testcase TC_CSE_DMR_NTF_001_RCN_2() runs on Tester system CseSystem {
  2631 + // Local variables
  2632 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2633 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2634 + v_ae1.done;
  2635 + v_ae1.start(f_CSE_DMR_NTF_001(int2));//ResultContent = 2 (hierarchical address)
  2636 + v_ae1.done;
  2637 + }
  2638 +
  2639 + testcase TC_CSE_DMR_NTF_001_RCN_3() runs on Tester system CseSystem {
  2640 + // Local variables
  2641 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2642 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2643 + v_ae1.done;
  2644 + v_ae1.start(f_CSE_DMR_NTF_001(int3));//ResultContent = 3 (attributes and hierarchical address)
  2645 + v_ae1.done;
  2646 + }
  2647 +
  2648 + testcase TC_CSE_DMR_NTF_001_RCN_4() runs on Tester system CseSystem {
  2649 + // Local variables
  2650 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2651 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2652 + v_ae1.done;
  2653 + v_ae1.start(f_CSE_DMR_NTF_001(int4));//ResultContent = 4 (attributes and child resources)
  2654 + v_ae1.done;
  2655 + }
  2656 +
  2657 + testcase TC_CSE_DMR_NTF_001_RCN_5() runs on Tester system CseSystem {
  2658 + // Local variables
  2659 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2660 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2661 + v_ae1.done;
  2662 + v_ae1.start(f_CSE_DMR_NTF_001(int5));//ResultContent = 5 (attributes and child resources references)
  2663 + v_ae1.done;
  2664 + }
  2665 +
  2666 + testcase TC_CSE_DMR_NTF_001_RCN_6() runs on Tester system CseSystem {
  2667 + // Local variables
  2668 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2669 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2670 + v_ae1.done;
  2671 + v_ae1.start(f_CSE_DMR_NTF_001(int6));//ResultContent = 6 (child resources references)
  2672 + v_ae1.done;
  2673 + }
  2674 +
  2675 + testcase TC_CSE_DMR_NTF_001_RCN_7() runs on Tester system CseSystem {
  2676 + // Local variables
  2677 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2678 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2679 + v_ae1.done;
  2680 + v_ae1.start(f_CSE_DMR_NTF_001(int7));//ResultContent = 7 (original resource)
  2681 + v_ae1.done;
  2682 + }
  2683 +
  2684 + testcase TC_CSE_DMR_NTF_001_RCN_8() runs on Tester system CseSystem {
  2685 + // Local variables
  2686 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2687 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2688 + v_ae1.done;
  2689 + v_ae1.start(f_CSE_DMR_NTF_001(int8));//ResultContent = 8 (child resources)
  2690 + v_ae1.done;
  2691 + }
  2692 + } // end g_CSE_DMR_NTF_001
  2693 +
  2694 + /**
  2695 + * @desc Check that the IUT returns nothing of TARGET_RESOURCE_ADDRESS resource when the Result Content is set to 0 (nothing)
  2696 + *
  2697 + */
  2698 + testcase TC_CSE_DMR_NTF_002() runs on Tester system CseSystem {
  2699 + // Local variables
  2700 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  2701 + var RequestPrimitive v_updateRequest := valueof(m_updateContainerBase);
  2702 +
  2703 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  2704 + v_ae1.done;
  2705 + v_updateRequest.primitiveContent.container.labels := {"VALUE_1"};
  2706 +
  2707 + v_ae1.start(f_CSE_DMR_NTF_002());
  2708 + v_ae1.done;
  2709 + }
  2710 +
  2711 + function f_CSE_DMR_NTF_002() runs on AeSimu {
  2712 +
  2713 + // Local variables
  2714 + var MsgIn v_response;
  2715 + var RequestPrimitive v_request;
  2716 + var integer v_aeIndex, v_ae2Index := -1;
  2717 +
  2718 + // Test control
  2719 +
  2720 + // Test component configuration
  2721 + f_cf01Up(true);
  2722 +
  2723 + // Test adapter configuration
  2724 +
  2725 + // Preamble
  2726 + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
  2727 +
  2728 + vc_ae2.start(f_cse_createAccessControlPolicyAux("Ae2Acp",{"all"}, int63));
  2729 + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
  2730 +
  2731 + vc_ae2.start(f_cse_createResource_withAcpAux(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, c_defaultAE2Name, {f_getCompletePoA("HTTP", PX_AE2_ADDRESS, "")}), -1)); // AE2 is registred
  2732 + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
  2733 +
  2734 + v_ae2Index := f_getLatestResource(vc_ae2);
  2735 +
  2736 + // Test Body
  2737 + v_request := valueof(m_notifyNotification(f_getResourceAddress(v_ae2Index), m_contentNotification_subscriptionVerification(vc_resourcesList[v_ae2Index].resource.aE.aE_ID)));
  2738 + v_request.from_ := f_getOriginator(v_aeIndex, e_ae);
  2739 + v_request.resultContent := int0;
  2740 +
  2741 + vc_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler());
  2742 +
  2743 + mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
  2744 + tc_ac.start;
  2745 + alt {
  2746 + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, omit))) -> value v_response {
  2747 + tc_ac.stop;
  2748 + setverdict(pass, __SCOPE__ & ": Nothing provided with RCN set to " & int2str(enum2int(v_request.resultContent)));
  2749 + }
  2750 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(omit))) -> value v_response {
  2751 + tc_ac.stop;
  2752 + setverdict(fail, __SCOPE__ & ": Wrong response status code");
  2753 + }
  2754