Commit dfbb84ebbd503e798086bb031170cdc1666d0bec

Authored by Antonio Castillo Verdugo
1 parent a9407e0f

- New templates related to TimeSeries and TimeSeriesInstance

- Fixed c_defaultTimeSeriesInstanceResourceName value
- Some test cases have acquired permutations structure because of the insertion of TimeSeries (CSE_DMR_CRE_007, CSE_DMR_CRE_008, CSE_DMR_CRE_013, CSE_DMR_CRE_014, CSE_DMR_UPD_010, CSE_DMR_UPD_011, CSE_DMR_DEL_005, CSE_DMR_DEL_006, CSE_SUB_CRE_001)
- New permutation: TC_CSE_DMR_UPD_009_TS_EXC,

Signed-off-by: acverdugo <acverdugo@at4wireless.com>
... ... @@ -623,6 +623,14 @@ module OneM2M_Templates {
623 623 template (value) RequestPrimitive m_updateTimeSeriesBase modifies m_update := {
624 624 requestIdentifier := "m_updateTimeSeries",
625 625 primitiveContent:= {timeSeries := m_contentUpdateTimeSeries}
  626 + };
  627 +
  628 + /**
  629 + * @desc Base UPDATE request primitive for TimeSeriesInstance resource
  630 + */
  631 + template (value) RequestPrimitive m_updateTimeSeriesInstanceBase modifies m_update:= {
  632 + requestIdentifier := "m_updateTimeSeriesInstance",
  633 + primitiveContent:= {timeSeriesInstance := m_contentUpdateTimeSeriesInstance}
626 634 };
627 635  
628 636 /**
... ... @@ -2609,19 +2617,19 @@ module OneM2M_Templates {
2609 2617 accessControlPolicyIDs := ?,//MA
2610 2618 expirationTime := ?,//MA M
2611 2619 link := omit, //O NA
2612   - dynamicAuthorizationConsultationIDs := omit, //OA
2613   - stateTag := ?,//MA
2614   - maxNrOfInstances := omit,//O OA
2615   - maxByteSize := omit,//O OA
2616   - maxInstanceAge := omit,//O OA
2617   - currentNrOfInstances := ?,//M OA
2618   - currentByteSize := ?,//M OA
2619   - periodicInterval := omit,//O OA
  2620 + dynamicAuthorizationConsultationIDs := *, //OA
  2621 + stateTag := *,//OA
  2622 + maxNrOfInstances := *,//O OA
  2623 + maxByteSize := *,//O OA
  2624 + maxInstanceAge := *,//O OA
  2625 + currentNrOfInstances := *,//M OA
  2626 + currentByteSize := *,//M OA
  2627 + periodicInterval := *,//O OA
2620 2628 missingDataDetect := omit,//O NA
2621   - missingDataList := omit,//O OA
2622   - missingDataCurrentNr := omit,//O OA
2623   - missingDataDetectTimer := omit,//O OA
2624   - ontologyRef := omit,//O OA
  2629 + missingDataList := *,//O OA
  2630 + missingDataCurrentNr := *,//O OA
  2631 + missingDataDetectTimer := *,//O OA
  2632 + ontologyRef := *,//O OA
2625 2633 choice := omit //O
2626 2634 };
2627 2635  
... ... @@ -2637,12 +2645,12 @@ module OneM2M_Templates {
2637 2645 creationTime := omit,//NA M
2638 2646 lastModifiedTime := omit,//NA M
2639 2647 labels := ?,//MA
2640   - expirationTime := ?,//MA M
  2648 + expirationTime := omit,//NA M
2641 2649 link := omit, //O NA
2642   - dataGenerationTime := ?,//M OA
2643   - content := ?,//M OA
2644   - sequenceNr := omit,//O OA
2645   - contentSize := ?//M OA
  2650 + dataGenerationTime := *,//M OA
  2651 + content := *,//M OA
  2652 + sequenceNr := *,//O OA
  2653 + contentSize := *//M OA
2646 2654 }
2647 2655  
2648 2656 /**
... ... @@ -2711,7 +2719,7 @@ module OneM2M_Templates {
2711 2719 announceTo := omit,//O
2712 2720 announcedAttribute := omit,//O
2713 2721 dataGenerationTime := {alt_ := fx_generateTimestamp()},//M
2714   - content := "Value",//M
  2722 + content := "AnyValue",//M
2715 2723 sequenceNr := omit,//O
2716 2724 contentSize := omit//NP
2717 2725 };
... ... @@ -3124,6 +3132,26 @@ module OneM2M_Templates {
3124 3132 choice := omit//NP
3125 3133 };
3126 3134  
  3135 + /**
  3136 + * @desc Base primitiveContent for UPDATE operation for TimeSeriesInstance resource
  3137 + */
  3138 + template (value) TimeSeriesInstance_optional m_contentUpdateTimeSeriesInstance := {
  3139 + resourceName := omit,
  3140 + resourceType := omit,
  3141 + resourceID := omit,
  3142 + parentID := omit,
  3143 + creationTime := omit,
  3144 + lastModifiedTime := omit,
  3145 + labels := omit,
  3146 + expirationTime := omit,
  3147 + announceTo := omit,
  3148 + announcedAttribute := omit,
  3149 + dataGenerationTime := omit,
  3150 + content := omit,
  3151 + sequenceNr := omit,
  3152 + contentSize := omit
  3153 + };
  3154 +
3127 3155  
3128 3156 }//end group ContentUpdate
3129 3157  
... ...
... ... @@ -38,7 +38,7 @@ module OneM2M_TypesAndValues {
38 38 const XSD.String c_defaultm2mServiceSubscriptionProfileResourceName := "Mym2mServiceSubscriptionProfileResource";
39 39 const XSD.String c_defaultServiceSubscribedAppRuleResourceName := "MyServiceSubscribedAppRuleResource";
40 40 const XSD.String c_defaultTimeSeriesResourceName := "MyTimeSeriesResource";
41   - const XSD.String c_defaultTimeSeriesInstanceResourceName := "MyTimeSeriesResource";
  41 + const XSD.String c_defaultTimeSeriesInstanceResourceName := "MyTimeSeriesInstanceResource";
42 42 const XSD.ID c_aeAuxName := "MyAe";
43 43 const XSD.String c_defaultAE2Name := "MyAe2";
44 44 const XSD.String c_acpAuxName := "MyAcp";
... ...
... ... @@ -2312,6 +2312,130 @@ module OneM2M_PermutationFunctions {
2312 2312 return vc_response.primitive.responsePrimitive;
2313 2313  
2314 2314 }//end f_CSE_DMR_CRE_006
  2315 +
  2316 + function f_CSE_DMR_CRE_007(ResourceType p_resourceTypeParent, template RequestPrimitive p_requestPrimitiveParent, ResourceType p_resourceTypeChild, template RequestPrimitive p_requestPrimitiveChild1, template RequestPrimitive p_requestPrimitiveChild2, XSD.String p_resourceName) runs on AeSimu {
  2317 + //Local variables
  2318 + var MsgIn v_response;
  2319 + var RequestPrimitive v_request;
  2320 + var integer v_aeIndex := -1;
  2321 + var integer v_parentIndex := -1;
  2322 + var integer v_childIndex := -1;
  2323 +
  2324 + // Test control
  2325 +
  2326 + // Test component configuration
  2327 + f_cf01Up();
  2328 +
  2329 + // Test adapter configuration
  2330 +
  2331 + // Preamble
  2332 + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
  2333 +
  2334 + v_parentIndex := f_cse_createResource(p_resourceTypeParent, p_requestPrimitiveParent, v_aeIndex); //Parent
  2335 +
  2336 + v_childIndex := f_cse_createResource(p_resourceTypeChild, p_requestPrimitiveChild1, v_parentIndex); //Child1
  2337 +
  2338 + // Test Body
  2339 + v_request := f_getCreateRequestPrimitive(p_resourceTypeChild, p_requestPrimitiveChild2, v_parentIndex); ////Child2
  2340 +
  2341 + mcaPort.send(m_request(v_request));
  2342 + tc_ac.start;
  2343 + alt {
  2344 + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
  2345 + tc_ac.stop;
  2346 + setverdict(pass, __SCOPE__ & ": Resource " & int2str(enum2int(p_resourceTypeChild)) & " created");
  2347 + }
  2348 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
  2349 + tc_ac.stop;
  2350 + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response");
  2351 + }
  2352 + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
  2353 + tc_ac.stop;
  2354 + setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(p_resourceTypeChild)));
  2355 + }
  2356 + [] tc_ac.timeout {
  2357 + setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceTypeChild)));
  2358 + }
  2359 + }
  2360 +
  2361 + f_checkAeSimuStatus();
  2362 +
  2363 + //Check to see if the resource is NOT present
  2364 + if(f_isResourceNotPresent(v_parentIndex, p_resourceName)){
  2365 + setverdict(pass, __SCOPE__ & ":INFO: Oldest resource " & int2str(enum2int(p_resourceTypeChild)) & " has been removed to allow the creation of the new instance");
  2366 + } else {
  2367 + setverdict(fail, __SCOPE__ & ":ERROR: Oldest resource " & int2str(enum2int(p_resourceTypeChild)) & " has not been removed to allow the creation of the new instance");
  2368 + }
  2369 +
  2370 + // Postamble
  2371 + f_cse_postamble_deleteResources();
  2372 +
  2373 + // Tear down
  2374 + f_cf01Down();
  2375 +
  2376 + }//end f_CSE_DMR_CRE_007
  2377 +
  2378 + function f_CSE_DMR_CRE_008(ResourceType p_resourceTypeParent, template RequestPrimitive p_requestPrimitiveParent, ResourceType p_resourceTypeChild, template RequestPrimitive p_requestPrimitiveChild1, template RequestPrimitive p_requestPrimitiveChild2, XSD.String p_resourceName) runs on AeSimu {
  2379 + //Local variables
  2380 + var MsgIn v_response;
  2381 + var RequestPrimitive v_request;
  2382 + var integer v_aeIndex := -1;
  2383 + var integer v_parentIndex := -1;
  2384 + var integer v_childIndex := -1;
  2385 + // Test control
  2386 +
  2387 + // Test component configuration
  2388 + f_cf01Up();
  2389 +
  2390 + // Test adapter configuration
  2391 +
  2392 + // Preamble
  2393 + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
  2394 +
  2395 + v_parentIndex := f_cse_createResource(p_resourceTypeParent, p_requestPrimitiveParent, v_aeIndex); //Parent
  2396 +
  2397 + v_childIndex := f_cse_createResource(p_resourceTypeChild, p_requestPrimitiveChild1, v_parentIndex); //Child1
  2398 +
  2399 + // Test Body
  2400 +
  2401 + v_request := f_getCreateRequestPrimitive(p_resourceTypeChild, p_requestPrimitiveChild2, v_parentIndex); //Child2
  2402 +
  2403 + mcaPort.send(m_request(v_request));
  2404 + tc_ac.start;
  2405 + alt {
  2406 + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
  2407 + tc_ac.stop;
  2408 + setverdict(pass, __SCOPE__ & ": Resource " & int2str(enum2int(p_resourceTypeChild)) & " created");
  2409 + }
  2410 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
  2411 + tc_ac.stop;
  2412 + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response");
  2413 + }
  2414 + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
  2415 + tc_ac.stop;
  2416 + setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(p_resourceTypeChild)));
  2417 + }
  2418 + [] tc_ac.timeout {
  2419 + setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceTypeChild)));
  2420 + }
  2421 + }
  2422 +
  2423 + f_checkAeSimuStatus();
  2424 +
  2425 + //Check to see if the resource is NOT present
  2426 + if(f_isResourceNotPresent(v_parentIndex, p_resourceName)){
  2427 + setverdict(pass, __SCOPE__ & ":INFO: Oldest resource " & int2str(enum2int(p_resourceTypeChild)) & " has been removed to allow the creation of the new instance");
  2428 + } else {
  2429 + setverdict(fail, __SCOPE__ & ":ERROR: Oldest resource " & int2str(enum2int(p_resourceTypeChild)) & " has not been removed to allow the creation of the new instance");
  2430 + }
  2431 +
  2432 + // Postamble
  2433 + f_cse_postamble_deleteResources();
  2434 +
  2435 + // Tear down
  2436 + f_cf01Down();
  2437 +
  2438 + }//end f_CSE_DMR_CRE_008
2315 2439  
2316 2440 function f_CSE_DMR_CRE_012(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, in AttributeList p_optionalAttribute) runs on AeSimu {
2317 2441  
... ... @@ -2404,6 +2528,56 @@ module OneM2M_PermutationFunctions {
2404 2528  
2405 2529 }//end f_CSE_DMR_CRE_012
2406 2530  
  2531 + function f_CSE_DMR_CRE_013(ResourceType p_resourceTypeParent, template RequestPrimitive p_requestPrimitiveParent, ResourceType p_resourceTypeChild, template RequestPrimitive p_requestPrimitiveChild) runs on AeSimu {
  2532 + // Local variables
  2533 + var MsgIn v_response;
  2534 + var RequestPrimitive v_request;
  2535 + var integer v_aeIndex := -1;
  2536 + var integer v_parentIndex := -1;
  2537 + // Test control
  2538 +
  2539 + // Test component configuration
  2540 + f_cf01Up();
  2541 +
  2542 + // Test adapter configuration
  2543 +
  2544 + // Preamble
  2545 + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
  2546 +
  2547 + v_parentIndex := f_cse_createResource(p_resourceTypeParent, p_requestPrimitiveParent, v_aeIndex);
  2548 +
  2549 + // Test Body
  2550 + v_request := f_getCreateRequestPrimitive(p_resourceTypeChild, p_requestPrimitiveChild, v_parentIndex);
  2551 +
  2552 + mcaPort.send(m_request(v_request));
  2553 + tc_ac.start;
  2554 + alt {
  2555 + [] mcaPort.receive(mw_response(mw_responsePrimitive(int5207))) -> value v_response {
  2556 + tc_ac.stop;
  2557 + setverdict(pass, __SCOPE__ & ": Maximum byte size exceeded");
  2558 + }
  2559 + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
  2560 + tc_ac.stop;
  2561 + setverdict(fail, __SCOPE__ & ": Bad responseStatusCode in response");
  2562 + }
  2563 +
  2564 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
  2565 + tc_ac.stop;
  2566 + setverdict(fail, __SCOPE__ & ": Accepted creation of resource type " & int2str(enum2int(p_resourceTypeChild)) & " exceding maximum byte size");
  2567 + }
  2568 + [] tc_ac.timeout {
  2569 + setverdict(fail, __SCOPE__ & ": No answer while creating resource type 4 " & int2str(enum2int(p_resourceTypeChild)));
  2570 + }
  2571 + }
  2572 +
  2573 + // Postamble
  2574 + f_cse_postamble_deleteResources();
  2575 +
  2576 + // Tear down
  2577 + f_cf01Down();
  2578 +
  2579 + }//end f_CSE_DMR_CRE_013
  2580 +
2407 2581 function f_CSE_DMR_CRE_014(ResourceType p_parentResourceType, template RequestPrimitive p_parentResourceRequestPrimitive, ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on AeSimu {
2408 2582 // Local variables
2409 2583 var MsgIn v_response;
... ... @@ -4601,6 +4775,110 @@ module OneM2M_PermutationFunctions {
4601 4775 f_cf01Down();
4602 4776  
4603 4777 }//end f_CSE_DMR_UPD_009
  4778 +
  4779 + function f_CSE_DMR_UPD_010(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu {
  4780 +
  4781 + // Local variables
  4782 + var MsgIn v_response;
  4783 + var integer v_aeIndex := -1;
  4784 + var integer v_resourceIndex := -1;
  4785 +
  4786 + // Test control
  4787 +
  4788 + // Test component configuration
  4789 + f_cf01Up();
  4790 +
  4791 + // Test adapter configuration
  4792 +
  4793 + // Preamble
  4794 + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
  4795 +
  4796 + v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex);
  4797 +
  4798 + // Test Body
  4799 +
  4800 + f_cse_updateResource(p_resourceType, v_resourceIndex, p_updateRequestPrimitive);
  4801 +
  4802 + mcaPort.send(m_request(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))));
  4803 +
  4804 + tc_ac.start;
  4805 + alt {
  4806 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
  4807 + tc_ac.stop;
  4808 + }
  4809 + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
  4810 + tc_ac.stop;
  4811 + setverdict(fail, __SCOPE__ & ": Error while retrieving resource attributes");
  4812 + }
  4813 + [] tc_ac.timeout {
  4814 + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource attributes");
  4815 + }
  4816 + }
  4817 +
  4818 + vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex);
  4819 +
  4820 + // Postamble
  4821 + f_cse_postamble_deleteResources();
  4822 +
  4823 + // Tear down
  4824 + f_cf01Down();
  4825 +
  4826 + }//end f_CSE_DMR_UPD_010
  4827 +
  4828 + function f_CSE_DMR_UPD_011(ResourceType p_resourceTypeParent, template RequestPrimitive p_createParentRequestPrimitive, ResourceType p_resourceTypeChild, template RequestPrimitive p_createChildRequestPrimitive,template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu {
  4829 + //Local variables
  4830 + var MsgIn v_response;
  4831 + var RequestPrimitive v_request;
  4832 + var integer v_aeIndex := -1;
  4833 + var integer v_parentIndex := -1;
  4834 + var integer v_childIndex := -1;
  4835 +
  4836 + // Test control
  4837 +
  4838 + // Test component configuration
  4839 + f_cf01Up();
  4840 +
  4841 + // Test adapter configuration
  4842 +
  4843 + // Preamble
  4844 + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
  4845 +
  4846 + v_parentIndex := f_cse_createResource(p_resourceTypeParent, p_createParentRequestPrimitive, v_aeIndex);
  4847 +
  4848 + v_childIndex := f_cse_createResource(p_resourceTypeChild, p_createChildRequestPrimitive, v_parentIndex);
  4849 +
  4850 + //Test Body
  4851 + v_request := f_getUpdateRequestPrimitive(p_resourceTypeChild, v_childIndex, p_updateRequestPrimitive);
  4852 +
  4853 + mcaPort.send(m_request(v_request));
  4854 + tc_ac.start;
  4855 + alt {
  4856 + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) -> value v_response {
  4857 + tc_ac.stop;
  4858 + setverdict(pass, __SCOPE__ & ": Not allowed to update resource " & int2str(enum2int(p_resourceTypeChild)) & " with error OPERATION_NOT_ALLOWED");
  4859 + }
  4860 + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
  4861 + tc_ac.stop;
  4862 + setverdict(fail, __SCOPE__ & ": Wrong response status code");
  4863 + }
  4864 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
  4865 + tc_ac.stop;
  4866 + setverdict(fail, __SCOPE__ & ": Accepted update of resource " & int2str(enum2int(p_resourceTypeChild)));
  4867 + }
  4868 + [] tc_ac.timeout {
  4869 + setverdict(fail, __SCOPE__ & ": No answer while updating resource " & int2str(enum2int(p_resourceTypeChild)));
  4870 + }
  4871 + }
  4872 +
  4873 + vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_childIndex);
  4874 +
  4875 + // Postamble
  4876 + f_cse_postamble_deleteResources();
  4877 +
  4878 + // Tear down
  4879 + f_cf01Down();
  4880 +
  4881 + }//end f_CSE_DMR_UPD_011
4604 4882  
4605 4883 function f_CSE_DMR_UPD_014(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu {
4606 4884  
... ... @@ -5070,6 +5348,135 @@ module OneM2M_PermutationFunctions {
5070 5348 f_cf01Down();
5071 5349  
5072 5350 };//end f_CSE_DMR_DEL_004
  5351 +
  5352 + function f_CSE_DMR_DEL_005(ResourceType p_resourceTypeParent, template RequestPrimitive p_requestPrimitiveParent, ResourceType p_resourceTypeChild, template RequestPrimitive p_requestPrimitiveChild) runs on AeSimu {
  5353 + //Local variables
  5354 + var MsgIn v_response;
  5355 + var RequestPrimitive v_request;
  5356 + var integer v_aeIndex := -1;
  5357 + var integer v_resourceIndex := -1;
  5358 + var integer v_childResourceIndex := -1;
  5359 +
  5360 + // Test control
  5361 +
  5362 + // Test component configuration
  5363 + f_cf01Up();
  5364 +
  5365 + // Test adapter configuration
  5366 +
  5367 + // Preamble
  5368 + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
  5369 +
  5370 + v_resourceIndex := f_cse_createResource(p_resourceTypeParent, p_requestPrimitiveParent, v_aeIndex);
  5371 +
  5372 + v_childResourceIndex := f_cse_createResource(p_resourceTypeChild, p_requestPrimitiveChild, v_resourceIndex);
  5373 +
  5374 + // Test Body
  5375 + mcaPort.send(m_request(m_delete(f_getResourceAddress(v_childResourceIndex), f_getOriginator(v_childResourceIndex))));
  5376 +
  5377 + tc_ac.start;
  5378 + alt {
  5379 + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) -> value v_response {
  5380 + tc_ac.stop;
  5381 + setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(p_resourceTypeChild)) & " deleted successfully");
  5382 + }
  5383 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
  5384 + tc_ac.stop;
  5385 + setverdict(fail, __SCOPE__ & ": Wrong response status code");
  5386 + }
  5387 + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
  5388 + tc_ac.stop;
  5389 + setverdict(fail, __SCOPE__ & ": Error while deleting resource type " & int2str(enum2int(p_resourceTypeChild)));
  5390 + }
  5391 + [] tc_ac.timeout {
  5392 + setverdict(fail, __SCOPE__ & ": No answer while deleting resource type " & int2str(enum2int(p_resourceTypeChild)));
  5393 + }
  5394 + }
  5395 +
  5396 + vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex);
  5397 +
  5398 + // Postamble
  5399 + f_cse_postamble_deleteResources();
  5400 +
  5401 + // Tear down
  5402 + f_cf01Down();
  5403 +
  5404 + };//end f_CSE_DMR_DEL_005
  5405 +
  5406 + function f_CSE_DMR_DEL_006(ResourceType p_resourceTypeParent, template RequestPrimitive p_requestPrimitiveParent, ResourceType p_resourceTypeChild, template RequestPrimitive p_requestPrimitiveChild) runs on AeSimu {
  5407 + //Local variables
  5408 + var integer v_aeIndex := -1;
  5409 + var integer v_parentIndex := -1;
  5410 + var integer v_childIndex := -1;
  5411 + var PrimitiveContent v_attributesParent, v_attributesParent_afterDeletion;
  5412 +
  5413 + // Test control
  5414 +
  5415 + // Test component configuration
  5416 + f_cf01Up();
  5417 +
  5418 + // Test adapter configuration
  5419 +
  5420 + // Preamble
  5421 + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
  5422 +
  5423 + v_parentIndex := f_cse_createResource(p_resourceTypeParent, p_requestPrimitiveParent, v_aeIndex);
  5424 +
  5425 + v_childIndex := f_cse_createResource(p_resourceTypeChild, p_requestPrimitiveChild, v_parentIndex);
  5426 +
  5427 + v_attributesParent := f_cse_retrieveResource(v_parentIndex);
  5428 +
  5429 + if (p_resourceTypeParent==int3){ //Container
  5430 + if(not(ispresent(v_attributesParent.container.currentNrOfInstances))) {
  5431 + setverdict(fail, __SCOPE__ & ": Error the currentNrOfInstances attribute is empty");
  5432 + f_checkAeSimuStatus();
  5433 + }
  5434 + }else if (p_resourceTypeParent==int29){ //TimeSeries
  5435 + if(not(ispresent(v_attributesParent.timeSeries.currentNrOfInstances))) {
  5436 + setverdict(fail, __SCOPE__ & ": Error the currentNrOfInstances attribute is empty");
  5437 + f_checkAeSimuStatus();
  5438 + }
  5439 + }
  5440 +
  5441 + // Test Body
  5442 + f_cse_deleteResource(v_childIndex);
  5443 +
  5444 + v_attributesParent_afterDeletion := f_cse_retrieveResource(v_parentIndex);
  5445 +
  5446 + if (p_resourceTypeParent==int3){ //Container
  5447 + if(not(ispresent(v_attributesParent_afterDeletion.container.currentNrOfInstances))) {
  5448 + setverdict(fail, __SCOPE__ & ": Error the currentNrOfInstances attribute is empty");
  5449 + f_checkAeSimuStatus();
  5450 + }
  5451 + }else if (p_resourceTypeParent==int29){ //TimeSeries
  5452 + if(not(ispresent(v_attributesParent_afterDeletion.timeSeries.currentNrOfInstances))) {
  5453 + setverdict(fail, __SCOPE__ & ": Error the currentNrOfInstances attribute is empty");
  5454 + f_checkAeSimuStatus();
  5455 + }
  5456 + }
  5457 +
  5458 + if (p_resourceTypeParent==int3){ //Container
  5459 + if((v_attributesParent.container.currentNrOfInstances > v_attributesParent_afterDeletion.container.currentNrOfInstances) and
  5460 + (v_attributesParent.container.currentByteSize > v_attributesParent_afterDeletion.container.currentByteSize)) {
  5461 + setverdict(pass, __SCOPE__ & ": The currentNrOfInstances and currentByteSize attributes are decreased");
  5462 + } else {
  5463 + setverdict(fail, __SCOPE__ & ": currentNrOfInstances and/or currentByteSize attributes are not decreased");
  5464 + }
  5465 + }else if (p_resourceTypeParent==int29){ //TimeSeries
  5466 + if((v_attributesParent.timeSeries.currentNrOfInstances > v_attributesParent_afterDeletion.timeSeries.currentNrOfInstances) and
  5467 + (v_attributesParent.timeSeries.currentByteSize > v_attributesParent_afterDeletion.timeSeries.currentByteSize)) {
  5468 + setverdict(pass, __SCOPE__ & ": The currentNrOfInstances and currentByteSize attributes are decreased");
  5469 + } else {
  5470 + setverdict(fail, __SCOPE__ & ": currentNrOfInstances and/or currentByteSize attributes are not decreased");
  5471 + }
  5472 + }
  5473 +
  5474 + // Postamble
  5475 + f_cse_postamble_deleteResources();
  5476 +
  5477 + // Tear down
  5478 + f_cf01Down();
  5479 + };//end f_CSE_DMR_DEL_006
5073 5480  
5074 5481 }//end group Delete
5075 5482  
... ... @@ -5616,6 +6023,74 @@ module OneM2M_PermutationFunctions {
5616 6023  
5617 6024 group Create {
5618 6025  
  6026 + function f_CSE_SUB_CRE_001(ResourceType p_parentResourceType, template RequestPrimitive p_parentResourceRequestPrimitive, ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on AeSimu {
  6027 + //Local variables
  6028 + var MsgIn v_response;
  6029 + var integer v_aeIndex := -1;
  6030 + var integer v_parentResourceIndex := -1;
  6031 + var integer v_childResourceIndex := -1;
  6032 + var RequestPrimitive v_request;
  6033 + var integer v_ae2Index := -1;
  6034 + var template RequestPrimitive v_createSubscriptionRequest := m_createSubscriptionBase;
  6035 +
  6036 + // Test control
  6037 +
  6038 + // Test component configuration
  6039 + f_cf01Up();
  6040 +
  6041 + // Test adapter configuration
  6042 +
  6043 + // Preamble
  6044 + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
  6045 +
  6046 + f_cse_preamble_subscriptionVerification(v_ae2Index, v_createSubscriptionRequest, int23);
  6047 +
  6048 + v_parentResourceIndex := f_cse_createResource(p_parentResourceType, p_parentResourceRequestPrimitive, v_aeIndex);//Parent
  6049 +
  6050 + if(p_parentResourceType != int23){
  6051 + v_childResourceIndex := f_cse_createResource(p_childResourceType, p_childRequestPrimitive, v_parentResourceIndex);//Child
  6052 + }else{
  6053 + v_childResourceIndex := v_parentResourceIndex;
  6054 + }
  6055 +
  6056 + v_request := f_getCreateRequestPrimitive(int23, v_createSubscriptionRequest, v_childResourceIndex);//Subscription under child
  6057 +
  6058 + // Test Body
  6059 + mcaPort.send(m_request(v_request));
  6060 + tc_ac.start;
  6061 + alt {
  6062 + [] mcaPort.receive(mw_response(mw_responsePrimitive(int5203))) -> value v_response {
  6063 + tc_ac.stop;
  6064 + setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(p_childResourceType)) & " not subscribable");
  6065 + }
  6066 + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
  6067 + tc_ac.stop;
  6068 + setverdict(fail, __SCOPE__ & ": Wrong response status code");
  6069 + }
  6070 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
  6071 + tc_ac.stop;
  6072 + setverdict(fail, __SCOPE__ & ": Subscription successful whereas resource type " & int2str(enum2int(p_childResourceType)) & " resource is not subscribable");
  6073 + }
  6074 + [] tc_ac.timeout {
  6075 + setverdict(fail, __SCOPE__ & ": No answer while creating resource");
  6076 + }
  6077 + }
  6078 +
  6079 + f_checkAeSimuStatus();
  6080 +
  6081 + //Check to see if the resource is NOT present
  6082 + if(f_isResourceNotPresent(v_childResourceIndex, f_getResourceName(v_request.primitiveContent))){
  6083 + setverdict(pass, __SCOPE__ & ":INFO: Subscription resource not created");
  6084 + } else {
  6085 + setverdict(fail, __SCOPE__ & ":ERROR: Subscription resource created");
  6086 + }
  6087 +
  6088 + //Postamble
  6089 + f_cse_postamble_deleteResources();
  6090 +
  6091 + //Tear down
  6092 + f_cf01Down();
  6093 + }// end f_CSE_SUB_CRE_001
5619 6094  
5620 6095 }//end group Create
5621 6096  
... ...
... ... @@ -947,6 +947,90 @@ module OneM2M_Testcases_CSE_Release_2 {
947 947  
948 948 }// end group g_CSE_DMR_CRE_006
949 949  
  950 + group g_CSE_DMR_CRE_007 {
  951 +
  952 + /**
  953 + * @desc Checks that the IUT accepts a newly created RESOURCE_TYPE when the currentNrOfInstances exceeds the field value set in maxNrOfInstances in the PARENT_RESOURCE_TYPE resource by removing enough of the oldest RESOURCE_TYPE resources to allow the creation of the new RESOURCE_TYPE resource
  954 + *
  955 + */
  956 + testcase TC_CSE_DMR_CRE_007_CNT_CIN() runs on Tester system CseSystem {
  957 + // Local variables
  958 + var template RequestPrimitive v_createRequestContainer := m_createContainerBase;
  959 + var template RequestPrimitive v_createRequestContentInstance1 := m_createContentInstanceBase;
  960 + var template RequestPrimitive v_createRequestContentInstance2 := m_createContentInstanceBase;
  961 + const integer c_maxNumberOfInstances := 1;
  962 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  963 +
  964 + v_createRequestContainer.primitiveContent.container.maxNrOfInstances := c_maxNumberOfInstances;
  965 + v_createRequestContentInstance2.primitiveContent.contentInstance.resourceName := c_defaultContentInstanceResourceName & "2"; //Resource 2
  966 +
  967 + v_ae1.start(f_CSE_DMR_CRE_007(int3, v_createRequestContainer, int4, v_createRequestContentInstance1, v_createRequestContentInstance2, c_defaultContentInstanceResourceName));//ContentInstance under Container
  968 + v_ae1.done;
  969 + }
  970 +
  971 + testcase TC_CSE_DMR_CRE_007_TS_TSI() runs on Tester system CseSystem {
  972 + //Local variables
  973 + var template RequestPrimitive v_createRequestTimeSeries := m_createTimeSeriesBase;
  974 + var template RequestPrimitive v_createRequestTimeSeriesInstance1 := m_createTimeSeriesInstanceBase;
  975 + var template RequestPrimitive v_createRequestTimeSeriesInstance2 := m_createTimeSeriesInstanceBase;
  976 + const integer c_maxNumberOfInstances := 1;
  977 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  978 +
  979 + v_createRequestTimeSeries.primitiveContent.timeSeries.maxNrOfInstances := c_maxNumberOfInstances;
  980 + v_createRequestTimeSeriesInstance2.primitiveContent.timeSeriesInstance.resourceName := c_defaultTimeSeriesInstanceResourceName & "2"; //Resource 2
  981 +
  982 + v_ae1.start(f_CSE_DMR_CRE_007(int29, v_createRequestTimeSeries, int30, v_createRequestTimeSeriesInstance1, v_createRequestTimeSeriesInstance2, c_defaultTimeSeriesInstanceResourceName));//TimeSeriesInstance under TimeSeries
  983 + v_ae1.done;
  984 + }
  985 +
  986 + }// end group g_CSE_DMR_CRE_007
  987 +
  988 + group g_CSE_DMR_CRE_008 {
  989 +
  990 + /**
  991 + * @desc Checks that the IUT accepts a newly created RESOURCE_TYPE when the currentNrOfInstances exceeds the field value set in maxNrOfInstances in the PARENT_RESOURCE_TYPE resource by removing enough of the oldest RESOURCE_TYPE resources to allow the creation of the new RESOURCE_TYPE resource
  992 + *
  993 + */
  994 + testcase TC_CSE_DMR_CRE_008_CNT_CIN() runs on Tester system CseSystem {
  995 + // Local variables
  996 + var template RequestPrimitive v_createRequestContainer := m_createContainerBase;
  997 + var template RequestPrimitive v_createRequestContentInstance1 := m_createContentInstanceBase;
  998 + var template RequestPrimitive v_createRequestContentInstance2 := m_createContentInstanceBase;
  999 + const integer c_maxByteSize := 10;
  1000 + const XSD.String c_primitiveContent1 := "Content1";
  1001 + const XSD.String c_primitiveContent2 := "Content2";
  1002 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  1003 +
  1004 + v_createRequestContainer.primitiveContent.container.maxByteSize := c_maxByteSize;
  1005 + v_createRequestContentInstance1.primitiveContent.contentInstance.content := c_primitiveContent1; //ContentInstance 1
  1006 + v_createRequestContentInstance2.primitiveContent.contentInstance.content := c_primitiveContent2; //ContentInstance 2
  1007 + v_createRequestContentInstance2.primitiveContent.contentInstance.resourceName := c_defaultContentInstanceResourceName & "2"; //ContentInstance 2
  1008 +
  1009 + v_ae1.start(f_CSE_DMR_CRE_007(int3, v_createRequestContainer, int4, v_createRequestContentInstance1, v_createRequestContentInstance2, c_defaultContentInstanceResourceName));//ContentInstance under Container
  1010 + v_ae1.done;
  1011 + }
  1012 +
  1013 + testcase TC_CSE_DMR_CRE_008_TS_TSI() runs on Tester system CseSystem {
  1014 + //Local variables
  1015 + var template RequestPrimitive v_createRequestTimeSeries := m_createTimeSeriesBase;
  1016 + var template RequestPrimitive v_createRequestTimeSeriesInstance1 := m_createTimeSeriesInstanceBase;
  1017 + var template RequestPrimitive v_createRequestTimeSeriesInstance2 := m_createTimeSeriesInstanceBase;
  1018 + const integer c_maxByteSize := 10;
  1019 + const XSD.String c_primitiveContent1 := "Content1";
  1020 + const XSD.String c_primitiveContent2 := "Content2";
  1021 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  1022 +
  1023 + v_createRequestTimeSeries.primitiveContent.container.maxByteSize := c_maxByteSize;
  1024 + v_createRequestTimeSeriesInstance1.primitiveContent.timeSeriesInstance.content := c_primitiveContent1; //ContentInstance 1
  1025 + v_createRequestTimeSeriesInstance2.primitiveContent.timeSeriesInstance.content := c_primitiveContent2; //ContentInstance 2
  1026 + v_createRequestTimeSeriesInstance2.primitiveContent.timeSeriesInstance.resourceName := c_defaultTimeSeriesInstanceResourceName & "2"; //ContentInstance 2
  1027 +
  1028 + v_ae1.start(f_CSE_DMR_CRE_008(int29, v_createRequestTimeSeries, int30, v_createRequestTimeSeriesInstance1, v_createRequestTimeSeriesInstance2, c_defaultTimeSeriesInstanceResourceName));//TimeSeriesInstance under TimeSeries
  1029 + v_ae1.done;
  1030 + }
  1031 +
  1032 + }// end group g_CSE_DMR_CRE_008
  1033 +
950 1034 group g_CSE_DMR_CRE_012 {
951 1035  
952 1036 /**
... ... @@ -1379,6 +1463,63 @@ module OneM2M_Testcases_CSE_Release_2 {
1379 1463 }
1380 1464  
1381 1465 }// end group g_CSE_DMR_CRE_012
  1466 +
  1467 + group g_CSE_DMR_CRE_013 {
  1468 +
  1469 + /**
  1470 + * @desc Check that the IUT rejects the CREATE Request of a RESOURCE_TYPE resource with error “NOT_ACCEPTABLE” when contentSize exceeds maxByteSize of the PARENT_RESOURCE_TYPE
  1471 + *
  1472 + */
  1473 + testcase TC_CSE_DMR_CRE_013_CNT_CIN() runs on Tester system CseSystem {
  1474 + // Local variables
  1475 + var template RequestPrimitive v_createRequestContainer := m_createContainerBase;
  1476 + var template RequestPrimitive v_createRequestContentInstance := m_createContentInstanceBase;
  1477 + const integer c_maxByteSize := 1;
  1478 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  1479 +
  1480 + v_createRequestContainer.primitiveContent.container.maxByteSize := c_maxByteSize;
  1481 +
  1482 + v_ae1.start(f_CSE_DMR_CRE_013(int3, v_createRequestContainer, int4, v_createRequestContentInstance));//ContentInstance under Container
  1483 + v_ae1.done;
  1484 + }
  1485 +
  1486 + testcase TC_CSE_DMR_CRE_013_TS_TSI() runs on Tester system CseSystem {
  1487 + //Local variables
  1488 + var template RequestPrimitive v_createRequestTimeSeries := m_createTimeSeriesBase;
  1489 + var template RequestPrimitive v_createRequestTimeSeriesInstance := m_createTimeSeriesInstanceBase;
  1490 + const integer c_maxByteSize := 1;
  1491 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  1492 +
  1493 + v_createRequestTimeSeries.primitiveContent.timeSeries.maxByteSize := c_maxByteSize;
  1494 +
  1495 + v_ae1.start(f_CSE_DMR_CRE_013(int29, v_createRequestTimeSeries, int30, v_createRequestTimeSeriesInstance));//TimeSeriesInstance under TimeSeries
  1496 + v_ae1.done;
  1497 + }
  1498 +
  1499 + }// end group g_CSE_DMR_CRE_013
  1500 +
  1501 + group g_CSE_DMR_CRE_014 {
  1502 +
  1503 + /**
  1504 + * @desc Check that the IUT updates the currentByteSize attribute in a PARENT_RESOURCE_TYPE when a new RESOURCE_TYPE is created.
  1505 + *
  1506 + */
  1507 + testcase TC_CSE_DMR_CRE_014_TS_TSI() runs on Tester system CseSystem {
  1508 + // Local variables
  1509 + var template RequestPrimitive v_parentResourceRequest := m_createTimeSeriesBase;
  1510 + var template RequestPrimitive v_childResourceRequest := m_createTimeSeriesInstanceBase;//Default content: "AnyValue" (8 bytes length)
  1511 + var ResponsePrimitive v_responsePrimitive;
  1512 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  1513 + const integer c_maxByteSize := 512;
  1514 +
  1515 + v_parentResourceRequest.primitiveContent.timeSeries.maxByteSize := c_maxByteSize;
  1516 +
  1517 + v_ae1.start(f_CSE_DMR_CRE_014(int29, v_parentResourceRequest, int30, v_childResourceRequest));
  1518 + v_ae1.done;
  1519 +
  1520 + }
  1521 +
  1522 + }// end group g_CSE_DMR_CRE_014
1382 1523  
1383 1524 group g_CSE_DMR_CRE_015 {
1384 1525  
... ... @@ -4560,7 +4701,140 @@ module OneM2M_Testcases_CSE_Release_2 {
4560 4701 v_ae1.done;
4561 4702 }
4562 4703  
4563   - } // end g_CSE_DMR_UPD_009
  4704 + testcase TC_CSE_DMR_UPD_009_TS_EXC() runs on Tester system CseSystem {
  4705 + // Local variables
  4706 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  4707 + var XSD.PositiveInteger v_expirationCounter := 1;
  4708 + var template RequestPrimitive v_createRequest := m_createTimeSeriesBase;
  4709 + var template RequestPrimitive v_updateRequest := m_updateTimeSeriesBase;
  4710 +
  4711 + v_updateRequest.primitiveContent := {timeSeries_update_invalid := m_contentUpdateTimeSeries_invalid};
  4712 +
  4713 + v_updateRequest.primitiveContent.timeSeries_update_invalid.expirationCounter := v_expirationCounter;
  4714 +
  4715 + v_ae1.start(f_CSE_DMR_UPD_009(int29, v_createRequest, v_updateRequest));//TimeSeries
  4716 + v_ae1.done;
  4717 + }
  4718 +
  4719 + } // end g_CSE_DMR_UPD_009
  4720 +
  4721 + group g_CSE_DMR_UPD_010{
  4722 +
  4723 + /**
  4724 + * @desc Check that the stateTag attribute of a RESOURCE_TYPE resource is increased when an update operation has been performed on its child resource
  4725 + *
  4726 + */
  4727 + testcase TC_CSE_DMR_UPD_010_CNT() runs on Tester system CseSystem {
  4728 + // Local variables
  4729 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  4730 + var RequestPrimitive v_updateRequest := valueof(m_updateContainerBase);
  4731 + var template RequestPrimitive v_createRequest := m_createContainerBase;
  4732 + var Labels v_labels_1:= {"VALUE_1"};
  4733 + var PrimitiveContent v_primitiveContentRetrieveResource;
  4734 +
  4735 + v_updateRequest.primitiveContent.container.labels := v_labels_1;
  4736 +
  4737 + v_ae1.start(f_CSE_DMR_UPD_010(int3, v_createRequest, v_updateRequest));//Container
  4738 + v_ae1.done;
  4739 +
  4740 + if(getverdict == pass){
  4741 + v_primitiveContentRetrieveResource := f_getPrimitiveContentRetrievedResource(v_ae1);
  4742 + //Check that stateTag has been incremented
  4743 + if(ischosen(v_primitiveContentRetrieveResource.container)) {
  4744 + if(v_primitiveContentRetrieveResource.container.stateTag == 1){
  4745 + setverdict(pass, __SCOPE__ & ": The stateTag attribute is incremented");
  4746 + }else{
  4747 + setverdict(fail, __SCOPE__ & ": Error the stateTag attribute is not incremented");
  4748 + }
  4749 + }
  4750 + }
  4751 + }
  4752 +
  4753 + testcase TC_CSE_DMR_UPD_010_TS() runs on Tester system CseSystem {
  4754 + // Local variables
  4755 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  4756 + var RequestPrimitive v_updateRequest := valueof(m_updateTimeSeriesBase);
  4757 + var template RequestPrimitive v_createRequest := m_createTimeSeriesBase;
  4758 + var Labels v_labels_1:= {"VALUE_1"};
  4759 + var PrimitiveContent v_primitiveContentRetrieveResource;
  4760 +
  4761 + v_updateRequest.primitiveContent.timeSeries.labels := v_labels_1;
  4762 +
  4763 + v_ae1.start(f_CSE_DMR_UPD_010(int29, v_createRequest, v_updateRequest));//TimeSeries
  4764 + v_ae1.done;
  4765 +
  4766 + if(getverdict == pass){
  4767 + v_primitiveContentRetrieveResource := f_getPrimitiveContentRetrievedResource(v_ae1);
  4768 + //Check that stateTag has been incremented
  4769 + if(ischosen(v_primitiveContentRetrieveResource.timeSeries)) {
  4770 + if(v_primitiveContentRetrieveResource.timeSeries.stateTag == 1){
  4771 + setverdict(pass, __SCOPE__ & ": The stateTag attribute is incremented");
  4772 + }else{
  4773 + setverdict(fail, __SCOPE__ & ": Error the stateTag attribute is not incremented");
  4774 + }
  4775 + }
  4776 + }
  4777 + }
  4778 +
  4779 + } // end g_CSE_DMR_UPD_010
  4780 +
  4781 + group g_CSE_DMR_UPD_011{
  4782 +
  4783 + /**
  4784 + * @desc Check that the IUT rejects the UPDATE Request of an existing RESOURCE_TYPE resource with error “OPERATION_NOT_ALLOWED”
  4785 + *
  4786 + */
  4787 + testcase TC_CSE_DMR_UPD_011_CNT_CNI() runs on Tester system CseSystem {
  4788 + // Local variables
  4789 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  4790 + var template RequestPrimitive v_updateRequest := m_updateContentInstanceBase;
  4791 + var Labels v_labels:= {"LABEL"};
  4792 + var template RequestPrimitive v_createParentRequest := m_createContainerBase;
  4793 + var template RequestPrimitive v_createChildRequest := m_createContentInstanceBase;
  4794 + var PrimitiveContent v_primitiveContentRetrieveResource;
  4795 +
  4796 + v_updateRequest.primitiveContent.contentInstance.labels := v_labels;
  4797 +
  4798 + v_ae1.start(f_CSE_DMR_UPD_011(int3, v_createParentRequest, int4, v_createChildRequest, v_updateRequest));//ContentInstance under Container
  4799 + v_ae1.done;
  4800 +
  4801 + if(getverdict == pass){
  4802 + v_primitiveContentRetrieveResource := f_getPrimitiveContentRetrievedResource(v_ae1);
  4803 + //Check that the resource has NOT been udpated
  4804 + if(ischosen(v_primitiveContentRetrieveResource.contentInstance)) {
  4805 + if(v_primitiveContentRetrieveResource.contentInstance.labels == v_labels){
  4806 + setverdict(fail, __SCOPE__ & ": Error: Labels attribute updated")
  4807 + }
  4808 + }
  4809 + }
  4810 + }
  4811 +
  4812 + testcase TC_CSE_DMR_UPD_011_TS_TSI() runs on Tester system CseSystem {
  4813 + // Local variables
  4814 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  4815 + var template RequestPrimitive v_updateRequest := m_updateTimeSeriesInstanceBase;
  4816 + var Labels v_labels:= {"LABEL"};
  4817 + var template RequestPrimitive v_createParentRequest := m_createTimeSeriesBase;
  4818 + var template RequestPrimitive v_createChildRequest := m_createTimeSeriesInstanceBase;
  4819 + var PrimitiveContent v_primitiveContentRetrieveResource;
  4820 +
  4821 + v_updateRequest.primitiveContent.timeSeriesInstance.labels := v_labels;
  4822 +
  4823 + v_ae1.start(f_CSE_DMR_UPD_011(int29, v_createParentRequest, int30, v_createChildRequest, v_updateRequest));//TimeSeriesInstance under TimeSeries
  4824 + v_ae1.done;
  4825 +
  4826 + if(getverdict == pass){
  4827 + v_primitiveContentRetrieveResource := f_getPrimitiveContentRetrievedResource(v_ae1);
  4828 + //Check that the resource has NOT been udpated
  4829 + if(ischosen(v_primitiveContentRetrieveResource.timeSeriesInstance)) {
  4830 + if(v_primitiveContentRetrieveResource.timeSeriesInstance.labels == v_labels){
  4831 + setverdict(fail, __SCOPE__ & ": Error: Labels attribute updated")
  4832 + }
  4833 + }
  4834 + }
  4835 + }
  4836 +
  4837 + } // end g_CSE_DMR_UPD_011
4564 4838  
4565 4839 group g_CSE_DMR_UPD_014 {
4566 4840  
... ... @@ -6476,6 +6750,82 @@ module OneM2M_Testcases_CSE_Release_2 {
6476 6750 };
6477 6751  
6478 6752 };//end of group g_CSE_DMR_DEL_004
  6753 +
  6754 + group g_CSE_DMR_DEL_005{
  6755 +
  6756 + /**
  6757 + * @desc Check that the stateTag attribute of a RESOURCE_TYPE resource is increased when a child resource is deleted
  6758 + *
  6759 + */
  6760 + testcase TC_CSE_DMR_DEL_005_CNT() runs on Tester system CseSystem {
  6761 + // Local variables
  6762 + var PrimitiveContent v_primitiveContentRetrieveResource;
  6763 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  6764 +
  6765 + v_ae1.start(f_CSE_DMR_DEL_005(int3, m_createContainerBase, int3, m_createContainerBase));//Container
  6766 + v_ae1.done;
  6767 +
  6768 + if(getverdict == pass){
  6769 + v_primitiveContentRetrieveResource := f_getPrimitiveContentRetrievedResource(v_ae1);
  6770 + //Check that stateTag has been incremented
  6771 + if(ischosen(v_primitiveContentRetrieveResource.container)) {
  6772 + if(v_primitiveContentRetrieveResource.container.stateTag == 2){ //(Create and Delete)
  6773 + setverdict(pass, __SCOPE__ & ": The stateTag attribute is incremented");
  6774 + }else{
  6775 + setverdict(fail, __SCOPE__ & ": Error the stateTag attribute is not incremented");
  6776 + }
  6777 + }
  6778 + }
  6779 + };
  6780 +
  6781 + testcase TC_CSE_DMR_DEL_005_TS() runs on Tester system CseSystem {
  6782 + // Local variables
  6783 + var PrimitiveContent v_primitiveContentRetrieveResource;
  6784 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  6785 +
  6786 + v_ae1.start(f_CSE_DMR_DEL_005(int29, m_createTimeSeriesBase, int30, m_createTimeSeriesInstanceBase));//TimeSeries
  6787 + v_ae1.done;
  6788 +
  6789 + if(getverdict == pass){
  6790 + v_primitiveContentRetrieveResource := f_getPrimitiveContentRetrievedResource(v_ae1);
  6791 + //Check that stateTag has been incremented
  6792 + if(ischosen(v_primitiveContentRetrieveResource.container)) {
  6793 + if(v_primitiveContentRetrieveResource.timeSeries.stateTag == 2){ //(Create and Delete)
  6794 + setverdict(pass, __SCOPE__ & ": The stateTag attribute is incremented");
  6795 + }else{
  6796 + setverdict(fail, __SCOPE__ & ": Error the stateTag attribute is not incremented");
  6797 + }
  6798 + }
  6799 + }
  6800 + };
  6801 +
  6802 + };//end of group g_CSE_DMR_DEL_005
  6803 +
  6804 + group g_CSE_DMR_DEL_006{
  6805 +
  6806 + /**
  6807 + * @desc Check that the IUT decreases the field value of attribute currentNrOfInstances and currentByteSize of parent RESOURCE_TYPE when a latest RESOURCE_TYPE resource is deleted successfully
  6808 + *
  6809 + */
  6810 + testcase TC_CSE_DMR_DEL_006_CNT_CIN() runs on Tester system CseSystem {
  6811 + // Local variables
  6812 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  6813 +
  6814 + v_ae1.start(f_CSE_DMR_DEL_006(int3, m_createContainerBase, int4, m_createContentInstanceBase));//ContentInstance under Container
  6815 + v_ae1.done;
  6816 +
  6817 + };
  6818 +
  6819 + testcase TC_CSE_DMR_DEL_006_TS_TSI() runs on Tester system CseSystem {
  6820 + // Local variables
  6821 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  6822 +
  6823 + v_ae1.start(f_CSE_DMR_DEL_006(int29, m_createTimeSeriesBase, int30, m_createTimeSeriesInstanceBase));//TimeSeriesInstance under TimeSeries
  6824 + v_ae1.done;
  6825 +
  6826 + };
  6827 +
  6828 + };//end of group g_CSE_DMR_DEL_006
6479 6829  
6480 6830 group g_CSE_DMR_DEL_008{
6481 6831  
... ... @@ -7597,6 +7947,52 @@ module OneM2M_Testcases_CSE_Release_2 {
7597 7947  
7598 7948 group Create {
7599 7949  
  7950 + group g_CSE_SUB_CRE_001 {
  7951 +
  7952 + /**
  7953 + * @desc Check that the IUT rejects the creation of the <subscription> resource when the target subscribed-to RESOURCE_TYPE resource is not subscribable.
  7954 + *
  7955 + */
  7956 + testcase TC_CSE_SUB_CRE_001_CIN() runs on Tester system CseSystem {
  7957 + // Local variables
  7958 + var template RequestPrimitive v_parentResourceRequest := m_createContainerBase;
  7959 + var template RequestPrimitive v_childResourceRequest := m_createContentInstanceBase;
  7960 + var ResponsePrimitive v_responsePrimitive;
  7961 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  7962 + const XSD.String c_content := "Random Value";
  7963 +
  7964 + v_childResourceRequest.primitiveContent.contentInstance.content := "Random Value";
  7965 +
  7966 + v_ae1.start(f_CSE_SUB_CRE_001(int3, v_parentResourceRequest, int4, v_childResourceRequest));
  7967 + v_ae1.done;
  7968 + }
  7969 +
  7970 + testcase TC_CSE_SUB_CRE_001_SUB() runs on Tester system CseSystem {
  7971 + // Local variables
  7972 + var template RequestPrimitive v_parentResourceRequest := m_createSubscriptionBase;
  7973 + var ResponsePrimitive v_responsePrimitive;
  7974 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  7975 +
  7976 + v_ae1.start(f_CSE_SUB_CRE_001(int23, v_parentResourceRequest, int23, v_parentResourceRequest));
  7977 + v_ae1.done;
  7978 + }
  7979 +
  7980 + testcase TC_CSE_SUB_CRE_001_TSI() runs on Tester system CseSystem {
  7981 + // Local variables
  7982 + var template RequestPrimitive v_parentResourceRequest := m_createTimeSeriesBase;
  7983 + var template RequestPrimitive v_childResourceRequest := m_createTimeSeriesInstanceBase;
  7984 + var ResponsePrimitive v_responsePrimitive;
  7985 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  7986 + const XSD.String c_content := "Random Value";
  7987 +
  7988 + v_childResourceRequest.primitiveContent.timeSeriesInstance.content := "Random Value";
  7989 +
  7990 + v_ae1.start(f_CSE_SUB_CRE_001(int29, v_parentResourceRequest, int30, v_childResourceRequest));
  7991 + v_ae1.done;
  7992 + }
  7993 +
  7994 + }// end group g_CSE_DMR_CRE_014
  7995 +
7600 7996 }//end group Create
7601 7997  
7602 7998 group Notify{
... ...