Skip to content
Snippets Groups Projects

New dmr test cases

Merged Miguel Angel Reina Ortega requested to merge New_DMR_Test_Cases into master
1 file
+ 4009
3761
Compare changes
  • Side-by-side
  • Inline
+ 1273
282
@@ -7,7 +7,7 @@
*
* @author oneM2M
* @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Testcases.ttcn $
* $Id: OneM2M_Testcases.ttcn 333 2017-07-28 08:17:47Z reinaortega $
* $Id: OneM2M_Testcases.ttcn 334 2017-07-31 08:11:48Z reinaortega $
* @desc Module containing test cases for oneM2M
*
*/
@@ -1160,8 +1160,8 @@ module OneM2M_Testcases {
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while creating AE");
}
}
}
//v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex);
// Postamble
@@ -1781,7 +1781,7 @@ module OneM2M_Testcases {
}//end Registration
group Data_Management_and_Repository {
group Create {
group g_CSE_DMR_CRE_001 {
@@ -1802,7 +1802,7 @@ module OneM2M_Testcases {
if(getverdict == pass){
if(not ispresent(v_responsePrimitive.primitiveContent.container.resourceName)){
setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
}
}
}
}
@@ -1816,7 +1816,7 @@ module OneM2M_Testcases {
v_createRequest.primitiveContent.group_.resourceName := omit;
v_responsePrimitive := f_CSE_DMR_CRE_001(int3, v_createRequest, m_createAeAux(omit,omit),v_notifyHandler);//Container
if(getverdict == pass){
if(getverdict == pass){
if(not ispresent(v_responsePrimitive.primitiveContent.group_.resourceName)){
setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
}
@@ -1836,7 +1836,7 @@ module OneM2M_Testcases {
if(getverdict == pass){
if(not ispresent(v_responsePrimitive.primitiveContent.accessControlPolicy.resourceName)){
setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
}
}
}
}
@@ -1853,7 +1853,7 @@ module OneM2M_Testcases {
if(getverdict == pass){
if(not ispresent(v_responsePrimitive.primitiveContent.accessControlPolicy.resourceName)){
setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
}
}
}
}
@@ -1867,13 +1867,13 @@ module OneM2M_Testcases {
v_createRequest.primitiveContent.accessControlPolicy.resourceName := omit;
v_responsePrimitive := f_CSE_DMR_CRE_001(int9, v_createRequest, m_createAeAux(omit,omit), v_notifyHandler);//Group
if(getverdict == pass){
if(getverdict == pass){
if(not ispresent(v_responsePrimitive.primitiveContent.accessControlPolicy.resourceName)){
setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
}
}
}
}
testcase TC_CSE_DMR_CRE_001_ACP_CB() runs on CseTester system CseSystem {
// Local variables
@@ -1887,7 +1887,7 @@ module OneM2M_Testcases {
if(getverdict == pass){
if(not ispresent(v_responsePrimitive.primitiveContent.accessControlPolicy.resourceName)){
setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
}
}
}
}
@@ -1901,13 +1901,13 @@ module OneM2M_Testcases {
v_createRequest.primitiveContent.accessControlPolicy.resourceName := omit;
v_responsePrimitive := f_CSE_DMR_CRE_001(int1, v_createRequest, m_createAeAux(omit,omit), v_notifyHandler);//AccessControlPolicy
if(getverdict == pass){
if(not ispresent(v_responsePrimitive.primitiveContent.accessControlPolicy.resourceName)){
if(getverdict == pass){
if(not ispresent(v_responsePrimitive.primitiveContent.accessControlPolicy.resourceName)){
setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
}
}
}
}
testcase TC_CSE_DMR_CRE_001_SCH_CB() runs on CseTester system CseSystem {
// Local variables
@@ -1921,7 +1921,7 @@ module OneM2M_Testcases {
if(getverdict == pass){
if(not ispresent(v_responsePrimitive.primitiveContent.schedule.resourceName)){
setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
}
}
}
}
@@ -1935,13 +1935,13 @@ module OneM2M_Testcases {
v_createRequest.primitiveContent.schedule.resourceName := omit;
v_responsePrimitive := f_CSE_DMR_CRE_001(int18, v_createRequest, m_createAeAux(omit,omit), v_notifyHandler);//Schedule
if(getverdict == pass){
if(not ispresent(v_responsePrimitive.primitiveContent.schedule.resourceName)){
if(getverdict == pass){
if(not ispresent(v_responsePrimitive.primitiveContent.schedule.resourceName)){
setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
}
}
}
}
testcase TC_CSE_DMR_CRE_001_SCH_SUB() runs on CseTester system CseSystem {
// Local variables
@@ -1955,7 +1955,7 @@ module OneM2M_Testcases {
if(getverdict == pass){
if(not ispresent(v_responsePrimitive.primitiveContent.schedule.resourceName)){
setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
}
}
}
}
@@ -1970,13 +1970,13 @@ module OneM2M_Testcases {
v_createRequest.primitiveContent.pollingChannel.resourceName := omit;
v_responsePrimitive := f_CSE_DMR_CRE_001(int15, v_createRequest, m_createAeAux(omit,omit), v_notifyHandler);//PollingChannel
if(getverdict == pass){
if(not ispresent(v_responsePrimitive.primitiveContent.pollingChannel.resourceName)){
if(getverdict == pass){
if(not ispresent(v_responsePrimitive.primitiveContent.pollingChannel.resourceName)){
setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
}
}
}
}
testcase TC_CSE_DMR_CRE_001_SUB_CB() runs on CseTester system CseSystem {
// Local variables
@@ -1989,7 +1989,7 @@ module OneM2M_Testcases {
if(getverdict == pass){
if(not ispresent(v_responsePrimitive.primitiveContent.subscription.resourceName)){
setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
}
}
}
}
@@ -2008,7 +2008,7 @@ module OneM2M_Testcases {
}
}
}
}
testcase TC_CSE_DMR_CRE_001_SUB_CNT() runs on CseTester system CseSystem {
// Local variables
@@ -2034,12 +2034,12 @@ module OneM2M_Testcases {
v_createRequest.primitiveContent.subscription.resourceName := omit;
v_responsePrimitive := f_CSE_DMR_CRE_001(int23, v_createRequest, m_createAcpBase, v_notifyHandler);//Subscription
if(getverdict == pass){
if(not ispresent(v_responsePrimitive.primitiveContent.subscription.resourceName)){
if(getverdict == pass){
if(not ispresent(v_responsePrimitive.primitiveContent.subscription.resourceName)){
setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
}
}
}
}
}
testcase TC_CSE_DMR_CRE_001_SUB_SCH() runs on CseTester system CseSystem {
// Local variables
@@ -2052,7 +2052,7 @@ module OneM2M_Testcases {
if(getverdict == pass){
if(not ispresent(v_responsePrimitive.primitiveContent.subscription.resourceName)){
setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
}
}
}
}
@@ -2184,6 +2184,22 @@ module OneM2M_Testcases {
}
testcase TC_CSE_DMR_CRE_001_CIN_CNT() runs on CseTester system CseSystem {
// Local variables
var template RequestPrimitive v_createRequest := m_createContentInstanceBase;
var ResponsePrimitive v_responsePrimitive;
var CseTester v_notifyHandler := CseTester.create("NotifyHandler") alive;
v_createRequest.primitiveContent.contentInstance.resourceName := omit;
v_responsePrimitive := f_CSE_DMR_CRE_001(int4, v_createRequest, m_createContainerBase, v_notifyHandler);//Subscription
if(getverdict == pass){
if(not ispresent(v_responsePrimitive.primitiveContent.subscription.resourceName)){
setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
}
}
}
function f_CSE_DMR_CRE_001(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, in template (omit) RequestPrimitive p_parentRequestPrimitive := omit, in CseTester p_notifyHandler) runs on CseTester return ResponsePrimitive {
// Local variables
@@ -2231,10 +2247,10 @@ module OneM2M_Testcases {
setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfully");
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_parentIndex);
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(p_resourceType)));
@@ -2245,7 +2261,7 @@ module OneM2M_Testcases {
}
f_checkCseTesterStatus();
//Check to see if the resource is present or not
if (f_isResourcePresent(v_resourceIndex)){
setverdict(pass, __SCOPE__ & ":INFO: Resource created");
@@ -2421,7 +2437,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType)));
}
}
f_checkCseTesterStatus();
//Check to see if the resource is present or not
@@ -2636,7 +2652,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
@@ -2656,7 +2672,7 @@ module OneM2M_Testcases {
}// end group g_CSE_DMR_CRE_004
group g_CSE_DMR_CRE_BV_005 {
group g_CSE_DMR_CRE_005 {
/**
* @desc Check that the IUT rejects the CREATE Request of container resource when the RW ATTRIBUTE is provided with an invalid value
@@ -2727,7 +2743,7 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Accepted creation of resource type " & int2str(enum2int(p_resourceType)) & " containing an invalid value for attribute" & p_invalidAttribute.name);
@@ -2736,7 +2752,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType)));
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
@@ -2847,7 +2863,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType)));
}
}
f_checkCseTesterStatus();
//Check to see if the resource is present or not
@@ -2875,7 +2891,7 @@ module OneM2M_Testcases {
* @desc Check that the IUT responds with error when the newly created <contentInstance> results in that the field value of attribute currentNrOfInstances exceeds the field value of maxNrOfInstances in the parent container resource.
*
*/
testcase TC_CSE_DMR_CRE_BV_007() runs on CseTester system CseSystem {
testcase TC_CSE_DMR_CRE_007() runs on CseTester system CseSystem {
// Local variables
var template RequestPrimitive v_createRequest := m_createContainerBase;
var MsgIn v_response;
@@ -2920,7 +2936,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource type 4");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
@@ -2953,7 +2969,7 @@ module OneM2M_Testcases {
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_containerIndex := -1;
const integer c_maxByteSize := 0;
const integer c_maxByteSize := 0;
// Test control
// Test component configuration
@@ -2992,7 +3008,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource type 4");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is present or not
@@ -3137,7 +3153,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource type 4");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
@@ -3210,7 +3226,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource type 4");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
@@ -3327,7 +3343,7 @@ module OneM2M_Testcases {
} // end g_CSE_DMR_CRE_012
group g_CSE_DMR_CRE_BV_013 {
group g_CSE_DMR_CRE_013 {
/**
* @desc Check that the IUT returns successfully after a CREATE request only hierarchichal address of the created resource when the Result Content is set to 2 (hierarchical address)
@@ -3557,7 +3573,7 @@ module OneM2M_Testcases {
} // end g_CSE_DMR_CRE_014
group g_CSE_DMR_CRE_BV_015 {
group g_CSE_DMR_CRE_015 {
/**
* @desc Check that the IUT accepts the creation of a RESOURCE_TYPE resource with the optional attribute OPTIONAL_ATTRIBUTE provided
@@ -3968,7 +3984,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType)));
}
}
f_checkCseTesterStatus();
//Check to see if the resource is present or not
@@ -4126,7 +4142,7 @@ module OneM2M_Testcases {
} // end g_CSE_DMR_CRE_016
group g_CSE_DMR_CRE_BV_017 {
group g_CSE_DMR_CRE_017 {
/**
* @desc Check that the IUT accepts the creation of a RESOURCE_TYPE resource with the optional attribute announcedAttribute provided
@@ -4162,10 +4178,10 @@ module OneM2M_Testcases {
// Local variables
var template RequestPrimitive v_createRequest := m_createContentInstanceBase;
var RequestPrimitive v_requestPrimitive;
var XSD.NonNegativeInteger contentSize := 512; //Correct value? Shall be indicated in TP?
var XSD.NonNegativeInteger v_contentSize := 512; //Correct value? Shall be indicated in TP?
v_createRequest.primitiveContent.contentInstance.announceTo := {f_getAnnouncementTargetPoA()};
v_createRequest.primitiveContent.contentInstance.contentSize := contentSize;
v_createRequest.primitiveContent.contentInstance.contentSize := v_contentSize;
v_createRequest.primitiveContent.contentInstance.announcedAttribute := {"contentSize"}; //Correct value? Shall be indicated in TP?
v_requestPrimitive := f_CSE_DMR_CRE_017(int4, v_createRequest, mw_createContentInstanceAnncBase());//ContentInstance
@@ -4173,7 +4189,7 @@ module OneM2M_Testcases {
if(getverdict == pass){
//Check if contentSize attribute has been announced
if (ispresent(v_requestPrimitive.primitiveContent.contentInstanceAnnc.contentSize)){
if(v_requestPrimitive.primitiveContent.contentInstanceAnnc.contentSize != contentSize){
if(v_requestPrimitive.primitiveContent.contentInstanceAnnc.contentSize != v_contentSize){
setverdict(fail, __SCOPE__ & ": Error: Value of contentSize has not been announced successfully");
}else{
setverdict(pass, __SCOPE__ & ": Value of contentSize has been announced successfully");
@@ -4354,6 +4370,158 @@ module OneM2M_Testcases {
} // end g_CSE_DMR_CRE_017
group g_CSE_DMR_CRE_020{
/**
* @desc Check that the IUT rejects the CREATE Request of a contentInstance resource with error “NOT_ACCEPTABLE” when contentSize exceeds maxByteSize
*
*/
testcase TC_CSE_DMR_CRE_020() runs on CseTester system CseSystem {
// Local variables
var template RequestPrimitive v_createRequest := m_createContainerBase;
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_containerIndex := -1;
const integer c_maxByteSize := 0;
// Test control
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
v_createRequest.primitiveContent.container.maxByteSize := c_maxByteSize;
v_containerIndex := f_cse_createResource(int3, v_createRequest, v_aeIndex);
// Test Body
v_request := f_getCreateRequestPrimitive(int4, m_createContentInstanceBase, v_containerIndex);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int5207))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Maximum byte size exceeded");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Bad responseStatusCode in response");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Accepted creation of contentInstance exceding maximum byte size");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while creating resource type 4");
}
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}//end TC_CSE_DMR_CRE_020
}// end group g_CSE_DMR_CRE_020
group g_CSE_DMR_CRE_021{
/**
* @desc Check that the IUT updates the currentByteSize attribute in a <container> parent resource when a new <contentInstance> resource is created.
*
*/
testcase TC_CSE_DMR_CRE_021() runs on CseTester system CseSystem {
// Local variables
var template RequestPrimitive v_createRequest;
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_containerIndex := -1;
var integer v_contentInstanceIndex := -1;
const integer c_maxByteSize := 512;
// Test control
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
v_createRequest.primitiveContent.container.maxByteSize := c_maxByteSize;
v_createRequest := m_createContainerBase;
v_containerIndex := f_cse_createResource(int3, v_createRequest, v_aeIndex);
v_contentInstanceIndex := f_cse_createResource(int4, v_createRequest, v_containerIndex);
// Test Body
v_request := f_getCreateRequestPrimitive(int4, m_createContentInstanceBase, v_containerIndex); //Default content: "AnyValue" (8 bytes length)
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": ContentInstance resource created");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error when creating contentInstance resource");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while creating resource type 4");
}
}
//Check currentByteSize
mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_containerIndex), f_getOriginator(v_containerIndex))));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
if(v_response.primitive.responsePrimitive.primitiveContent.container.currentByteSize == 8) { //Default content: "AnyValue" (8 bytes length)
setverdict(pass, __SCOPE__ & ": CurrentByteSize attribute in content resource is incremented successfully");
}
else{
setverdict(fail, __SCOPE__ & ": CurrentByteSize attribute in content resource not incremented successfully");
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while retrieving resource");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
}
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}//end TC_CSE_DMR_CRE_021
}// end group g_CSE_DMR_CRE_021
}//end group Create
group Retrieve {
@@ -4429,6 +4597,17 @@ module OneM2M_Testcases {
v_responsePrimitive := f_CSE_DMR_RET_001(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
}
testcase TC_CSE_DMR_RET_001_CIN() runs on CseTester system CseSystem {
// Local variables
var ResponsePrimitive v_responsePrimitive;
var template PrimitiveContent v_contentResponse;
v_contentResponse.contentInstance := mw_contentContentInstance_rc1;
v_responsePrimitive := f_CSE_DMR_RET_001(int4, m_createContentInstanceBase, v_contentResponse);//ContentInstance
}
function f_CSE_DMR_RET_001(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester return ResponsePrimitive {
@@ -4436,6 +4615,8 @@ module OneM2M_Testcases {
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_containerIndex := -1;
var integer v_parentIndex := -1;
var integer v_resourceIndex := -1;
var CseTester v_notifyHandler;
var integer v_ae2Index := -1;
@@ -4452,7 +4633,14 @@ module OneM2M_Testcases {
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex);
if(p_resourceType == int4) { //ContentInstance
v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
v_parentIndex := v_containerIndex;
}else{
v_parentIndex := v_aeIndex;
}
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex);
// Test Body
mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))));
@@ -4580,7 +4768,7 @@ module OneM2M_Testcases {
testcase TC_CSE_DMR_RET_003_ACP() runs on CseTester system CseSystem {
// Local variables
var template RequestPrimitive v_requestPrimitive := m_createAcpBase;
v_requestPrimitive.primitiveContent.accessControlPolicy.selfPrivileges.accessControlRule_list[0].accessControlOperations := int61;
f_CSE_DMR_RET_003(int1, v_requestPrimitive);//AccessControlPolicy
@@ -4602,7 +4790,7 @@ module OneM2M_Testcases {
// Local variables
f_CSE_DMR_RET_003(int23, m_createSubscriptionBase);//Subscription
}
}
function f_CSE_DMR_RET_003(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on CseTester {
@@ -4861,7 +5049,7 @@ module OneM2M_Testcases {
v_contentResponse.subscription.parentID := ?;
f_CSE_DMR_RET_005(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
}
}
function f_CSE_DMR_RET_005(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester {
@@ -4994,7 +5182,7 @@ module OneM2M_Testcases {
v_contentResponse.subscription.creationTime := ?;
f_CSE_DMR_RET_006(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
}
}
function f_CSE_DMR_RET_006(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester {
@@ -5098,7 +5286,7 @@ module OneM2M_Testcases {
// Local variables
f_CSE_DMR_RET_007(int23, m_createSubscriptionBase);//Subscription
}
}
function f_CSE_DMR_RET_007(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on CseTester {
@@ -5197,7 +5385,7 @@ module OneM2M_Testcases {
// Local variables
f_CSE_DMR_RET_008(int23, m_createSubscriptionBase);//Subscription
}
}
function f_CSE_DMR_RET_008(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on CseTester {
@@ -5356,7 +5544,7 @@ module OneM2M_Testcases {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": resourceName attribute of <oldest> resource retrieved successfully");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))){
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
@@ -5484,7 +5672,7 @@ module OneM2M_Testcases {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": resourceName attribute of <latest> resource retrieved successfully");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))){
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
@@ -5609,9 +5797,9 @@ module OneM2M_Testcases {
if (p_resourceType!=int16){ //ResourceType != RemoteCSE
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
} else { //ResourceType = RemoteCSE
@@ -5865,9 +6053,9 @@ module OneM2M_Testcases {
if (p_resourceType!=int16){ //ResourceType != RemoteCSE
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
} else {
v_resourceIndex := f_cse_registerRemoteCse(p_requestPrimitive);
@@ -5983,7 +6171,7 @@ module OneM2M_Testcases {
v_contentResponse.subscription.parentID := ?;
f_CSE_DMR_RET_016(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
}
}
function f_CSE_DMR_RET_016(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester {
@@ -6008,9 +6196,9 @@ module OneM2M_Testcases {
if (p_resourceType!=int16){ //ResourceType != RemoteCSE
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
}else{
v_resourceIndex := f_cse_registerRemoteCse(p_requestPrimitive);
@@ -6057,7 +6245,7 @@ module OneM2M_Testcases {
* @desc Check that the IUT returns successfully multiple attributes of TARGET_RESOURCE_ADDRESS resource under CSEBase
*
*/
testcase TC_CSE_DMR_RET_BV_ACP() runs on CseTester system CseSystem {
testcase TC_CSE_DMR_RET_017_ACP() runs on CseTester system CseSystem {
// Local variables
var template PrimitiveContent v_contentResponse;
@@ -6068,7 +6256,7 @@ module OneM2M_Testcases {
f_CSE_DMR_RET_017(int1, m_createAcpBase, v_contentResponse);//AccessControlPolicy
}
testcase TC_CSE_DMR_RET_BV_AE() runs on CseTester system CseSystem {
testcase TC_CSE_DMR_RET_017_AE() runs on CseTester system CseSystem {
// Local variables
var template PrimitiveContent v_contentResponse;
@@ -6079,7 +6267,7 @@ module OneM2M_Testcases {
f_CSE_DMR_RET_017(int2, m_createAe(PX_APP_ID), v_contentResponse);//AE
}
testcase TC_CSE_DMR_RET_BV_CNT() runs on CseTester system CseSystem {
testcase TC_CSE_DMR_RET_017_CNT() runs on CseTester system CseSystem {
// Local variables
var template PrimitiveContent v_contentResponse;
@@ -6089,8 +6277,19 @@ module OneM2M_Testcases {
f_CSE_DMR_RET_017(int3, m_createContainerBase, v_contentResponse);//Container
}
/*testcase TC_CSE_DMR_RET_017_DLV() runs on CseTester system CseSystem {
// Local variables
var template PrimitiveContent v_contentResponse;
testcase TC_CSE_DMR_RET_BV_GRP() runs on CseTester system CseSystem {
v_contentResponse.delivery := m_contentDelivery_allOmit;
v_contentResponse.delivery.parentID := ?;
v_contentResponse.delivery.creationTime := ?;
f_CSE_DMR_RET_017(int6, m_createDeliveryBase, v_contentResponse);//Delivery
}*/
testcase TC_CSE_DMR_RET_017_GRP() runs on CseTester system CseSystem {
// Local variables
var template PrimitiveContent v_contentResponse;
@@ -6100,8 +6299,41 @@ module OneM2M_Testcases {
f_CSE_DMR_RET_017(int9, m_createGroupBase, v_contentResponse);//Group
}
testcase TC_CSE_DMR_RET_017_LCP() runs on CseTester system CseSystem {
// Local variables
var template PrimitiveContent v_contentResponse;
v_contentResponse.locationPolicy := m_contentLocationPolicy_allOmit;
v_contentResponse.locationPolicy.parentID := ?;
v_contentResponse.locationPolicy.creationTime := ?;
f_CSE_DMR_RET_017(int10, m_createLocationPolicyBase, v_contentResponse);//LocationPolicy
}
testcase TC_CSE_DMR_RET_017_MGC() runs on CseTester system CseSystem {
// Local variables
var template PrimitiveContent v_contentResponse;
v_contentResponse.mgmtCmd := m_contentMgmtCmd_allOmit;
v_contentResponse.mgmtCmd.parentID := ?;
v_contentResponse.mgmtCmd.creationTime := ?;
f_CSE_DMR_RET_017(int12, m_createMgmtCmdBase, v_contentResponse);//MgmtCmd
}
testcase TC_CSE_DMR_RET_017_NOD() runs on CseTester system CseSystem {
// Local variables
var template PrimitiveContent v_contentResponse;
v_contentResponse.node := m_contentNode_allOmit;
v_contentResponse.node.parentID := ?;
v_contentResponse.node.creationTime := ?;
f_CSE_DMR_RET_017(int14, m_createNodeBase, v_contentResponse);//Node
}
testcase TC_CSE_DMR_RET_BV_CSR() runs on CseTester system CseSystem {
testcase TC_CSE_DMR_RET_017_CSR() runs on CseTester system CseSystem {
// Local variables
var template PrimitiveContent v_contentResponse;
@@ -6112,7 +6344,7 @@ module OneM2M_Testcases {
f_CSE_DMR_RET_017(int16, m_createRemoteCSEBase, v_contentResponse);//RemoteCSE
}
testcase TC_CSE_DMR_RET_BV_SCH() runs on CseTester system CseSystem {
testcase TC_CSE_DMR_RET_017_SCH() runs on CseTester system CseSystem {
// Local variables
var template PrimitiveContent v_contentResponse;
@@ -6123,7 +6355,29 @@ module OneM2M_Testcases {
f_CSE_DMR_RET_017(int18, m_createScheduleBase, v_contentResponse);//Schedule
}
testcase TC_CSE_DMR_RET_BV_SUB() runs on CseTester system CseSystem {
testcase TC_CSE_DMR_RET_017_STCL() runs on CseTester system CseSystem {
// Local variables
var template PrimitiveContent v_contentResponse;
v_contentResponse.statsCollect := m_contentStatsCollect_allOmit;
v_contentResponse.statsCollect.parentID := ?;
v_contentResponse.statsCollect.creationTime := ?;
f_CSE_DMR_RET_017(int21, m_createStatsCollectBase, v_contentResponse);//StatsCollect
}
testcase TC_CSE_DMR_RET_017_STCG() runs on CseTester system CseSystem {
// Local variables
var template PrimitiveContent v_contentResponse;
v_contentResponse.statsConfig := m_contentStatsConfig_allOmit;
v_contentResponse.statsConfig.parentID := ?;
v_contentResponse.statsConfig.creationTime := ?;
f_CSE_DMR_RET_017(int22, m_createStatsConfigBase, v_contentResponse);//StatsConfig
}
testcase TC_CSE_DMR_RET_017_SUB() runs on CseTester system CseSystem {
// Local variables
var template PrimitiveContent v_contentResponse;
@@ -6132,7 +6386,7 @@ module OneM2M_Testcases {
v_contentResponse.subscription.creationTime := ?;
f_CSE_DMR_RET_017(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
}
}
function f_CSE_DMR_RET_017(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester {
@@ -6157,9 +6411,9 @@ module OneM2M_Testcases {
if (p_resourceType!=int16){ //ResourceType != RemoteCSE
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
}else{
v_resourceIndex := f_cse_registerRemoteCse(p_requestPrimitive);
@@ -6247,7 +6501,7 @@ module OneM2M_Testcases {
// Local variables
f_CSE_DMR_RET_018(int23, m_createSubscriptionBase);//Subscription
}
}
function f_CSE_DMR_RET_018(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on CseTester {
@@ -6272,9 +6526,9 @@ module OneM2M_Testcases {
if (p_resourceType!=int16){ //ResourceType != RemoteCSE
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
}else{
v_resourceIndex := f_cse_registerRemoteCse(p_requestPrimitive);
@@ -6358,7 +6612,7 @@ module OneM2M_Testcases {
// Local variables
f_CSE_DMR_RET_019(int23, m_createSubscriptionBase);//Subscription
}
}
function f_CSE_DMR_RET_019(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on CseTester {
@@ -6383,9 +6637,9 @@ module OneM2M_Testcases {
if (p_resourceType!=int16){ //ResourceType != RemoteCSE
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
}else{
v_resourceIndex := f_cse_registerRemoteCse(p_requestPrimitive);
@@ -6422,7 +6676,7 @@ module OneM2M_Testcases {
}//end f_CSE_DMR_RET_019
} // end f_CSE_DMR_RET_019
group g_CSE_DMR_RET_020 {
/**
@@ -7195,8 +7449,8 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.container)) {
if(v_primitiveContentRetrieveResource.container.labels != v_labels_2){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
}
}
@@ -7227,8 +7481,8 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.group_)) {
if(v_primitiveContentRetrieveResource.group_.labels != v_labels_2){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
}
}
@@ -7259,7 +7513,7 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.accessControlPolicy)) {
if(v_primitiveContentRetrieveResource.accessControlPolicy.labels != v_labels_2){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
@@ -7292,7 +7546,7 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.schedule)) {
if(v_primitiveContentRetrieveResource.schedule.labels != v_labels_2){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
@@ -7325,8 +7579,8 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.pollingChannel)) {
if(v_primitiveContentRetrieveResource.pollingChannel.labels != v_labels_2){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
}
}
@@ -7357,7 +7611,7 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.subscription)) {
if(v_primitiveContentRetrieveResource.subscription.labels != v_labels_2){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
@@ -7409,7 +7663,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType)));
}
}
f_checkCseTesterStatus();
//Used to check that the resource has been updated
@@ -7458,8 +7712,8 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.container)) {
if(v_primitiveContentRetrieveResource.container.labels != v_labels_1){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
}
}
@@ -7488,8 +7742,8 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.group_)) {
if(v_primitiveContentRetrieveResource.group_.labels != v_labels_1){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
}
}
@@ -7518,8 +7772,8 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.accessControlPolicy)) {
if(v_primitiveContentRetrieveResource.accessControlPolicy.labels != v_labels_1){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
}
}
@@ -7548,8 +7802,8 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.schedule)) {
if(v_primitiveContentRetrieveResource.schedule.labels != v_labels_1){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
}
}
@@ -7578,8 +7832,8 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.pollingChannel)) {
if(v_primitiveContentRetrieveResource.pollingChannel.labels != v_labels_1){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
}
}
@@ -7608,8 +7862,8 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.subscription)) {
if(v_primitiveContentRetrieveResource.subscription.labels != v_labels_1){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
}
}
@@ -7659,7 +7913,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType)));
}
}
//Used to check that the resource has been updated
p_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex);
@@ -7715,8 +7969,8 @@ module OneM2M_Testcases {
if(ispresent(v_primitiveContentRetrieveResource.container.labels)) {
if(not(match(v_primitiveContentRetrieveResource.container.labels,{""}))){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
}
}
}
}
}
}
}
@@ -7753,8 +8007,8 @@ module OneM2M_Testcases {
if(ispresent(v_primitiveContentRetrieveResource.group_.labels)) {
if(not(match(v_primitiveContentRetrieveResource.group_.labels,{""}))){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
}
}
}
}
}
}
}
@@ -7791,8 +8045,8 @@ module OneM2M_Testcases {
if(ispresent(v_primitiveContentRetrieveResource.accessControlPolicy.labels)) {
if(not(match(v_primitiveContentRetrieveResource.accessControlPolicy.labels,{""}))){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
}
}
}
}
}
}
}
@@ -7829,8 +8083,8 @@ module OneM2M_Testcases {
if(ispresent(v_primitiveContentRetrieveResource.schedule.labels)) {
if(not(match(v_primitiveContentRetrieveResource.schedule.labels,{""}))){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
}
}
}
}
}
}
}
@@ -7867,8 +8121,8 @@ module OneM2M_Testcases {
if(ispresent(v_primitiveContentRetrieveResource.pollingChannel.labels)) {
if(not(match(v_primitiveContentRetrieveResource.pollingChannel.labels,{""}))){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
}
}
}
}
}
}
}
@@ -7905,8 +8159,8 @@ module OneM2M_Testcases {
if(ispresent(v_primitiveContentRetrieveResource.subscription.labels)) {
if(not(match(v_primitiveContentRetrieveResource.subscription.labels,{""}))){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
}
}
}
}
}
}
}
@@ -7959,7 +8213,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType)));
}
}
p_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex);
// Postamble
@@ -8022,11 +8276,11 @@ module OneM2M_Testcases {
//Check attribute 1
if(v_primitiveContentRetrieveResource.container.expirationTime != valueof(v_updateRequest.primitiveContent.container.expirationTime)){
setverdict(fail, __SCOPE__ & ": Error: Expiration Time attribute not updated correctly")
}
}
//Check attribute 2
if(v_primitiveContentRetrieveResource.container.maxNrOfInstances != valueof(v_updateRequest.primitiveContent.container.maxNrOfInstances)){
setverdict(fail, __SCOPE__ & ": Error: MaxNrOfInstances attribute not updated correctly")
}
}
//Check attribute 3
if(ispresent(v_primitiveContentRetrieveResource.container.labels)){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
@@ -8079,11 +8333,11 @@ module OneM2M_Testcases {
//Check attribute 1
if(v_primitiveContentRetrieveResource.group_.groupName != valueof(v_updateRequest.primitiveContent.group_.groupName)){
setverdict(fail, __SCOPE__ & ": Error: groupName attribute not updated correctly")
}
}
//Check attribute 2
if(v_primitiveContentRetrieveResource.group_.expirationTime != valueof(v_updateRequest.primitiveContent.group_.expirationTime)){
setverdict(fail, __SCOPE__ & ": Error: expirationTime attribute not updated correctly")
}
}
//Check attribute 3
if(ispresent(v_primitiveContentRetrieveResource.group_.labels)){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
@@ -8145,11 +8399,11 @@ module OneM2M_Testcases {
//Check attribute 1
if(not match (v_primitiveContentRetrieveResource.accessControlPolicy.privileges.accessControlRule_list[0].accessControlOperations, v_privileges_2.accessControlRule_list[0].accessControlOperations)){
setverdict(fail, __SCOPE__ & ": Error: Privileges attribute not updated correctly")
}
}
//Check attribute 2
if(not match (v_primitiveContentRetrieveResource.accessControlPolicy.announceTo, valueof(v_updateRequest.primitiveContent.accessControlPolicy.announceTo))){
setverdict(fail, __SCOPE__ & ": Error: Announce_to attribute not updated correctly")
}
}
//Check attribute 3
if(ispresent(v_primitiveContentRetrieveResource.accessControlPolicy.labels)){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
@@ -8200,11 +8454,11 @@ module OneM2M_Testcases {
//Check attribute 1
if(v_primitiveContentRetrieveResource.schedule.scheduleElement != valueof(v_updateRequest.primitiveContent.schedule.scheduleElement)){
setverdict(fail, __SCOPE__ & ": Error: Schedule Element attribute not updated correctly")
}
}
//Check attribute 2
if(v_primitiveContentRetrieveResource.schedule.announceTo != valueof(v_updateRequest.primitiveContent.schedule.announceTo)){
setverdict(fail, __SCOPE__ & ": Error: Announce_To attribute not updated correctly")
}
}
//Check attribute 3
if(ispresent(v_primitiveContentRetrieveResource.schedule.labels)){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
@@ -8253,8 +8507,8 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.pollingChannel)) {
if(ispresent (v_primitiveContentRetrieveResource.pollingChannel.labels)){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
}
}
}
}
}
}
@@ -8299,11 +8553,11 @@ module OneM2M_Testcases {
//Check attribute 1
if(not match (v_primitiveContentRetrieveResource.subscription.labels, valueof(v_updateRequest.primitiveContent.subscription.labels))){
setverdict(fail, __SCOPE__ & ": Error: Label attribute not updated correctly")
}
}
//Check attribute 2
if(not match (v_primitiveContentRetrieveResource.subscription.expirationTime, valueof(v_updateRequest.primitiveContent.subscription.expirationTime))){
setverdict(fail, __SCOPE__ & ": Error: expirationTime attribute not updated correctly")
}
}
//Check attribute 3
if(ispresent(v_primitiveContentRetrieveResource.subscription.expirationCounter)){
setverdict(fail, __SCOPE__ & ": Error: expirationCounter attribute not deleted correctly")
@@ -8358,7 +8612,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType)));
}
}
p_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex);
// Postamble
@@ -8523,7 +8777,7 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.container)) {
if(v_primitiveContentRetrieveResource.container.labels == v_labels_1){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute updated")
}
}
}
}
}
@@ -8542,7 +8796,7 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.group_)) {
if(v_primitiveContentRetrieveResource.group_.labels == v_labels_1){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute updated")
}
}
}
}
}
@@ -8564,7 +8818,7 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.accessControlPolicy)) {
if(v_primitiveContentRetrieveResource.accessControlPolicy.labels == v_labels_1){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute updated")
}
}
}
}
}
@@ -8583,7 +8837,7 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.schedule)) {
if(v_primitiveContentRetrieveResource.schedule.labels == v_labels_1){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute updated")
}
}
}
}
}
@@ -8602,7 +8856,7 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.pollingChannel)) {
if(v_primitiveContentRetrieveResource.pollingChannel.labels == v_labels_1){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute updated")
}
}
}
}
}
@@ -8678,8 +8932,8 @@ module OneM2M_Testcases {
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType)));
}
}
}
p_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex);
// Postamble
@@ -8714,7 +8968,7 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.container_update_invalid)) {
if(v_primitiveContentRetrieveResource.container_update_invalid.creationTime == v_creationTime){
setverdict(fail, __SCOPE__ & ": Error: Creation Time attribute updated")
}
}
}
}
}
@@ -8734,7 +8988,7 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.group_update_invalid)) {
if(v_primitiveContentRetrieveResource.group_update_invalid.creationTime == v_creationTime){
setverdict(fail, __SCOPE__ & ": Error: Creation Time attribute updated")
}
}
}
}
}
@@ -8754,7 +9008,7 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.aCP_update_invalid)) {
if(v_primitiveContentRetrieveResource.aCP_update_invalid.creationTime == v_creationTime){
setverdict(fail, __SCOPE__ & ": Error: Creation Time attribute updated")
}
}
}
}
}
@@ -8774,7 +9028,7 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.schedule_update_invalid)) {
if(v_primitiveContentRetrieveResource.schedule_update_invalid.creationTime == v_creationTime){
setverdict(fail, __SCOPE__ & ": Error: Creation Time attribute updated")
}
}
}
}
}
@@ -8794,7 +9048,7 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.pollingChannel_update_invalid)) {
if(v_primitiveContentRetrieveResource.pollingChannel_update_invalid.creationTime == v_creationTime){
setverdict(fail, __SCOPE__ & ": Error: Creation Time attribute updated")
}
}
}
}
}
@@ -8865,7 +9119,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType)));
}
}
p_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex);
// Postamble
@@ -8901,7 +9155,7 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.container)) {
if(v_primitiveContentRetrieveResource.container.expirationTime == v_expirationTime){
setverdict(fail, __SCOPE__ & ": Error: Expiration time attribute updated")
}
}
}
}
}
@@ -8923,7 +9177,7 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.group_)) {
if(v_primitiveContentRetrieveResource.group_.expirationTime == v_expirationTime){
setverdict(fail, __SCOPE__ & ": Error: Expiration time attribute updated")
}
}
}
}
}
@@ -8945,7 +9199,7 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.accessControlPolicy)) {
if(v_primitiveContentRetrieveResource.accessControlPolicy.expirationTime == v_expirationTime){
setverdict(fail, __SCOPE__ & ": Error: Expiration time attribute updated")
}
}
}
}
}
@@ -8967,7 +9221,7 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.schedule)) {
if(v_primitiveContentRetrieveResource.schedule.expirationTime == v_expirationTime){
setverdict(fail, __SCOPE__ & ": Error: Expiration time attribute updated")
}
}
}
}
}
@@ -8989,7 +9243,7 @@ module OneM2M_Testcases {
if(ischosen(v_primitiveContentRetrieveResource.pollingChannel)) {
if(v_primitiveContentRetrieveResource.pollingChannel.expirationTime == v_expirationTime){
setverdict(fail, __SCOPE__ & ": Error: Expiration time attribute updated")
}
}
}
}
}
@@ -9062,7 +9316,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType)));
}
}
p_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex);
// Postamble
@@ -9198,8 +9452,8 @@ module OneM2M_Testcases {
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while updating contentInstance");
}
}
}
v_primitiveContentRetrieveResource:=f_cse_retrieveResource(v_contentInstanceIndex);
if(getverdict == pass){
//Check that the resource has NOT been udpated
@@ -9234,7 +9488,7 @@ module OneM2M_Testcases {
var integer v_containerIndex := -1;
var integer v_contentInstanceIndex := -1;
var template RequestPrimitive v_updateRequest := m_updateContentInstanceBase;
var Labels v_labels := {"LABEL"};
var Labels v_labels := {"LABEL"};
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.contentInstance.labels := v_labels;
@@ -9276,8 +9530,8 @@ module OneM2M_Testcases {
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while updating a latest resource");
}
}
}
v_primitiveContentRetrieveResource:=f_cse_retrieveResource(v_contentInstanceIndex);
if(getverdict == pass){
//Check that the resource has NOT been udpated
@@ -9315,65 +9569,789 @@ module OneM2M_Testcases {
var Labels v_labels:= {"LABEL"};
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.contentInstance.labels := v_labels;
// Test control
v_updateRequest.primitiveContent.contentInstance.labels := v_labels;
// Test control
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
v_contentInstanceIndex := f_cse_createResource(int4, m_createContentInstanceBase, v_containerIndex);
//Test Body
v_request := f_getUpdateRequestPrimitive(int4, v_containerIndex, v_updateRequest);
v_request.to_ := v_request.to_ & "/" & c_resourceShortNameOldest; //<oldest>
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Not allowed to update an oldest resource with error OPERATION_NOT_ALLOWED");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Accepted update of an oldest resource");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while updating an oldest resource");
}
}
v_primitiveContentRetrieveResource:=f_cse_retrieveResource(v_contentInstanceIndex);
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.contentInstance)) {
if(v_primitiveContentRetrieveResource.contentInstance.labels == v_labels){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute updated")
}
}
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}//end TC_CSE_DMR_UPD_013
} // end group g_CSE_DMR_UPD_013
group g_CSE_DMR_UPD_014 {
/**
* @desc Check that the IUT updates successfully the value of the optional attribute OPTIONAL_ATTRIBUTE of the RESOURCE_TYPE resource.
*
*/
testcase TC_CSE_DMR_UPD_014_ACP_ET() runs on CseTester system CseSystem {
// Local variables
var Timestamp v_expirationTime_1 := "20301231T012345";
var Timestamp v_expirationTime_2 := "20401020T012345";
var template RequestPrimitive v_createRequest := m_createAcpBase;
var template RequestPrimitive v_updateRequest := m_updateAcpBase;
var ResponsePrimitive v_responsePrimitive;
v_createRequest.primitiveContent.accessControlPolicy.expirationTime := v_expirationTime_1;
v_updateRequest.primitiveContent.accessControlPolicy.expirationTime := v_expirationTime_2;
v_responsePrimitive := f_CSE_DMR_UPD_014(int1, v_createRequest, v_updateRequest);//ACP
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.accessControlPolicy)) {
if(v_responsePrimitive.primitiveContent.accessControlPolicy.expirationTime != v_expirationTime_2){
setverdict(fail, __SCOPE__ & ": Error: ExpirationTime attribute not updated correctly")
}
}
}
}
}
testcase TC_CSE_DMR_UPD_014_ACP_LBL() runs on CseTester system CseSystem {
// Local variables
var Labels v_labels_1 := {"VALUE_1"};
var Labels v_labels_2 := {"VALUE_2"};
var template RequestPrimitive v_createRequest := m_createAcpBase;
var template RequestPrimitive v_updateRequest := m_updateAcpBase;
var ResponsePrimitive v_responsePrimitive;
v_createRequest.primitiveContent.accessControlPolicy.labels := v_labels_1;
v_updateRequest.primitiveContent.accessControlPolicy.labels := v_labels_2;
v_responsePrimitive := f_CSE_DMR_UPD_014(int1, v_createRequest, v_updateRequest);//ACP
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.accessControlPolicy)) {
if(v_responsePrimitive.primitiveContent.accessControlPolicy.labels != v_labels_2){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
}
testcase TC_CSE_DMR_UPD_014_ACP_PV() runs on CseTester system CseSystem {
// Local variables
var SetOfAcrs v_privileges_1;
var SetOfAcrs v_privileges_2;
var template RequestPrimitive v_createRequest := m_createAcpBase;
var template RequestPrimitive v_updateRequest := m_updateAcpBase;
var ResponsePrimitive v_responsePrimitive;
v_privileges_1.accessControlRule_list[0].accessControlOperations := int31;
v_privileges_2.accessControlRule_list[0].accessControlOperations := int63;
v_createRequest.primitiveContent.accessControlPolicy.privileges := v_privileges_1;
v_updateRequest.primitiveContent.accessControlPolicy.privileges := v_privileges_2;
v_responsePrimitive := f_CSE_DMR_UPD_014(int1, v_createRequest, v_updateRequest);//ACP
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.accessControlPolicy)) {
if(v_responsePrimitive.primitiveContent.accessControlPolicy.privileges != v_privileges_2){
setverdict(fail, __SCOPE__ & ": Error: Privileges attribute not updated correctly")
}
}
}
}
}
testcase TC_CSE_DMR_UPD_014_ACP_PVS() runs on CseTester system CseSystem {
// Local variables
var SetOfAcrs v_selfPrivileges_1;
var SetOfAcrs v_selfPrivileges_2;
var template RequestPrimitive v_createRequest := m_createAcpBase;
var template RequestPrimitive v_updateRequest := m_updateAcpBase;
var ResponsePrimitive v_responsePrimitive;
v_selfPrivileges_1.accessControlRule_list[0].accessControlOperations := int31;
v_selfPrivileges_2.accessControlRule_list[0].accessControlOperations := int63;
v_createRequest.primitiveContent.accessControlPolicy.selfPrivileges := v_selfPrivileges_1;
v_updateRequest.primitiveContent.accessControlPolicy.selfPrivileges := v_selfPrivileges_2;
v_responsePrimitive := f_CSE_DMR_UPD_014(int1, v_createRequest, v_updateRequest);//ACP
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.accessControlPolicy)) {
if(v_responsePrimitive.primitiveContent.accessControlPolicy.selfPrivileges != v_selfPrivileges_2){
setverdict(fail, __SCOPE__ & ": Error: SelfPrivileges attribute not updated correctly")
}
}
}
}
}
testcase TC_CSE_DMR_UPD_014_CNT_ACPI() runs on CseTester system CseSystem {
// Local variables
var AcpType v_accessControlPolicyIDs_1 := {"NotInitialized_1"};
var AcpType v_accessControlPolicyIDs_2 := {"NotInitialized_2"};
var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_createRequest := m_createContainerBase;
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
v_createRequest.primitiveContent.container.accessControlPolicyIDs := v_accessControlPolicyIDs_1;
v_updateRequest.primitiveContent.container.accessControlPolicyIDs := v_accessControlPolicyIDs_2;
v_responsePrimitive := f_CSE_DMR_UPD_014(int3, v_createRequest, v_updateRequest);//Container
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.container)) {
if(v_responsePrimitive.primitiveContent.container.accessControlPolicyIDs != v_accessControlPolicyIDs_2){
setverdict(fail, __SCOPE__ & ": Error: AccessControlPolicyIDs attribute not updated correctly")
}
}
}
}
}
testcase TC_CSE_DMR_UPD_014_CNT_ET() runs on CseTester system CseSystem {
// Local variables
var Timestamp v_expirationTime_1 := "20301231T012345";
var Timestamp v_expirationTime_2 := "20401020T012345";
var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_createRequest := m_createContainerBase;
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
v_createRequest.primitiveContent.container.expirationTime := v_expirationTime_1;
v_updateRequest.primitiveContent.container.expirationTime := v_expirationTime_2;
v_responsePrimitive := f_CSE_DMR_UPD_014(int3, v_createRequest, v_updateRequest);//Container
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.container)) {
if(v_responsePrimitive.primitiveContent.container.expirationTime != v_expirationTime_2){
setverdict(fail, __SCOPE__ & ": Error: ExpirationTime attribute not updated correctly")
}
}
}
}
}
testcase TC_CSE_DMR_UPD_014_CNT_LBL() runs on CseTester system CseSystem {
// Local variables
var Labels v_labels_1 := {"VALUE_1"};
var Labels v_labels_2 := {"VALUE_2"};
var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_createRequest := m_createContainerBase;
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
v_createRequest.primitiveContent.container.labels := v_labels_1;
v_updateRequest.primitiveContent.container.labels := v_labels_2;
v_responsePrimitive := f_CSE_DMR_UPD_014(int3, v_createRequest, v_updateRequest);//Container
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.container)) {
if(v_responsePrimitive.primitiveContent.container.labels != v_labels_2){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
}
testcase TC_CSE_DMR_UPD_014_CNT_MBS() runs on CseTester system CseSystem {
// Local variables
var XSD.NonNegativeInteger v_maxByteSize_1 := 256;
var XSD.NonNegativeInteger v_maxByteSize_2 := 512;
var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_createRequest := m_createContainerBase;
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
v_createRequest.primitiveContent.container.maxByteSize := v_maxByteSize_1;
v_updateRequest.primitiveContent.container.maxByteSize := v_maxByteSize_2;
v_responsePrimitive := f_CSE_DMR_UPD_014(int3, v_createRequest, v_updateRequest);//Container
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.container)) {
if(v_responsePrimitive.primitiveContent.container.maxByteSize != v_maxByteSize_2){
setverdict(fail, __SCOPE__ & ": Error: MaxByteSize attribute not updated correctly")
}
}
}
}
}
testcase TC_CSE_DMR_UPD_014_CNT_MIA() runs on CseTester system CseSystem {
// Local variables
var XSD.NonNegativeInteger v_maxInstanceAge_1 := 60;
var XSD.NonNegativeInteger v_maxInstanceAge_2 := 120;
var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_createRequest := m_createContainerBase;
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
v_createRequest.primitiveContent.container.maxInstanceAge := v_maxInstanceAge_1;
v_updateRequest.primitiveContent.container.maxInstanceAge := v_maxInstanceAge_2;
v_responsePrimitive := f_CSE_DMR_UPD_014(int3, v_createRequest, v_updateRequest);//Container
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.container)) {
if(v_responsePrimitive.primitiveContent.container.maxInstanceAge != v_maxInstanceAge_2){
setverdict(fail, __SCOPE__ & ": Error: MaxInstanceAge attribute not updated correctly")
}
}
}
}
}
testcase TC_CSE_DMR_UPD_014_CNT_MNI() runs on CseTester system CseSystem {
// Local variables
var XSD.NonNegativeInteger v_maxNrOfInstances_1 := 1;
var XSD.NonNegativeInteger v_maxNrOfInstances_2 := 2;
var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_createRequest := m_createContainerBase;
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
v_createRequest.primitiveContent.container.maxNrOfInstances := v_maxNrOfInstances_1;
v_updateRequest.primitiveContent.container.maxNrOfInstances := v_maxNrOfInstances_2;
v_responsePrimitive := f_CSE_DMR_UPD_014(int3, v_createRequest, v_updateRequest);//Container
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.container)) {
if(v_responsePrimitive.primitiveContent.container.maxNrOfInstances != v_maxNrOfInstances_2){
setverdict(fail, __SCOPE__ & ": Error: MaxNrOfInstances attribute not updated correctly")
}
}
}
}
}
testcase TC_CSE_DMR_UPD_014_CNT_OR() runs on CseTester system CseSystem {
// Local variables
var XSD.AnyURI v_ontologyRef_1 := "MyOntologyRef_1";
var XSD.AnyURI v_ontologyRef_2 := "MyOntologyRef_2";
var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_createRequest := m_createContainerBase;
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
v_createRequest.primitiveContent.container.ontologyRef := v_ontologyRef_1;
v_updateRequest.primitiveContent.container.ontologyRef := v_ontologyRef_2;
v_responsePrimitive := f_CSE_DMR_UPD_014(int3, v_createRequest, v_updateRequest);//Container
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.container)) {
if(v_responsePrimitive.primitiveContent.container.ontologyRef != v_ontologyRef_2){
setverdict(fail, __SCOPE__ & ": Error: OntologyRef attribute not updated correctly")
}
}
}
}
}
testcase TC_CSE_DMR_UPD_014_SUB_ACPI() runs on CseTester system CseSystem {
// Local variables
var AcpType v_accessControlPolicyIDs_1 := {"NotInitialized_1"};
var AcpType v_accessControlPolicyIDs_2 := {"NotInitialized_2"};
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
v_createRequest.primitiveContent.subscription.accessControlPolicyIDs := v_accessControlPolicyIDs_1;
v_updateRequest.primitiveContent.subscription.accessControlPolicyIDs := v_accessControlPolicyIDs_2;
v_responsePrimitive := f_CSE_DMR_UPD_014(int23, v_createRequest, v_updateRequest);//Subscription
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.subscription)) {
if(v_responsePrimitive.primitiveContent.subscription.accessControlPolicyIDs != v_accessControlPolicyIDs_2){
setverdict(fail, __SCOPE__ & ": Error: AccessControlPolicyIDs attribute not updated correctly")
}
}
}
}
}
testcase TC_CSE_DMR_UPD_014_SUB_BN() runs on CseTester system CseSystem {
// Local variables
var BatchNotify v_batchNotify_1 := {1, "PT1S"};
var BatchNotify v_batchNotify_2 := {2, "PT1S"};
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
v_createRequest.primitiveContent.subscription.batchNotify := v_batchNotify_1;
v_updateRequest.primitiveContent.subscription.batchNotify := v_batchNotify_2;
v_responsePrimitive := f_CSE_DMR_UPD_014(int23, v_createRequest, v_updateRequest);//Subscription
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.subscription)) {
if(v_responsePrimitive.primitiveContent.subscription.batchNotify != v_batchNotify_2){
setverdict(fail, __SCOPE__ & ": Error: EventNotificationCriteria attribute not updated correctly")
}
}
}
}
}
testcase TC_CSE_DMR_UPD_014_SUB_ENC() runs on CseTester system CseSystem {
// Local variables
var EventNotificationCriteria v_eventNotificationCriteria_1 := valueof(m_eventNotificationCriteria({int1}, -));
var EventNotificationCriteria v_eventNotificationCriteria_2 := valueof(m_eventNotificationCriteria({int2}, -));
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
v_createRequest.primitiveContent.subscription.eventNotificationCriteria := v_eventNotificationCriteria_1;
v_updateRequest.primitiveContent.subscription.eventNotificationCriteria := v_eventNotificationCriteria_2;
v_responsePrimitive := f_CSE_DMR_UPD_014(int23, v_createRequest, v_updateRequest);//Subscription
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.subscription)) {
if(v_responsePrimitive.primitiveContent.subscription.eventNotificationCriteria != v_eventNotificationCriteria_2){
setverdict(fail, __SCOPE__ & ": Error: EventNotificationCriteria attribute not updated correctly")
}
}
}
}
}
testcase TC_CSE_DMR_UPD_014_SUB_ET() runs on CseTester system CseSystem {
// Local variables
var Timestamp v_expirationTime_1 := "20301231T012345";
var Timestamp v_expirationTime_2 := "20401020T012345";
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
v_createRequest.primitiveContent.subscription.expirationTime := v_expirationTime_1;
v_updateRequest.primitiveContent.subscription.expirationTime := v_expirationTime_2;
v_responsePrimitive := f_CSE_DMR_UPD_014(int23, v_createRequest, v_updateRequest);//Subscription
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.subscription)) {
if(v_responsePrimitive.primitiveContent.subscription.expirationTime != v_expirationTime_2){
setverdict(fail, __SCOPE__ & ": Error: ExpirationTime attribute not updated correctly")
}
}
}
}
}
testcase TC_CSE_DMR_UPD_014_SUB_EXC() runs on CseTester system CseSystem {
// Local variables
var XSD.PositiveInteger v_expirationCounter_1 := 10;
var XSD.PositiveInteger v_expirationCounter_2 := 20;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
v_createRequest.primitiveContent.subscription.expirationCounter := v_expirationCounter_1;
v_updateRequest.primitiveContent.subscription.expirationCounter := v_expirationCounter_2;
v_responsePrimitive := f_CSE_DMR_UPD_014(int23, v_createRequest, v_updateRequest);//Subscription
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.subscription)) {
if(v_responsePrimitive.primitiveContent.subscription.expirationCounter != v_expirationCounter_2){
setverdict(fail, __SCOPE__ & ": Error: ExpirationCounter attribute not updated correctly")
}
}
}
}
}
testcase TC_CSE_DMR_UPD_014_SUB_GPI() runs on CseTester system CseSystem {
// Local variables
var XSD.AnyURI v_groupID_1 := "MyGroupID_1";
var XSD.AnyURI v_groupID_2 := "MyGroupID_2";
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
v_createRequest.primitiveContent.subscription.groupID := v_groupID_1;
v_updateRequest.primitiveContent.subscription.groupID := v_groupID_2;
v_responsePrimitive := f_CSE_DMR_UPD_014(int23, v_createRequest, v_updateRequest);//Subscription
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.subscription)) {
if(v_responsePrimitive.primitiveContent.subscription.groupID != v_groupID_2){
setverdict(fail, __SCOPE__ & ": Error: GroupID attribute not updated correctly")
}
}
}
}
}
testcase TC_CSE_DMR_UPD_014_SUB_LBL() runs on CseTester system CseSystem {
// Local variables
var Labels v_labels_1 := {"VALUE_1"};
var Labels v_labels_2 := {"VALUE_2"};
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
v_createRequest.primitiveContent.subscription.labels := v_labels_1;
v_updateRequest.primitiveContent.subscription.labels := v_labels_2;
v_responsePrimitive := f_CSE_DMR_UPD_014(int23, v_createRequest, v_updateRequest);//Subscription
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.subscription)) {
if(v_responsePrimitive.primitiveContent.subscription.labels != v_labels_2){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
}
testcase TC_CSE_DMR_UPD_014_SUB_LN() runs on CseTester system CseSystem {
// Local variables
var XSD.Boolean v_latestNotify_1 := true;
var XSD.Boolean v_latestNotify_2 := false;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
v_createRequest.primitiveContent.subscription.latestNotify := v_latestNotify_1;
v_updateRequest.primitiveContent.subscription.latestNotify := v_latestNotify_2;
v_responsePrimitive := f_CSE_DMR_UPD_014(int23, v_createRequest, v_updateRequest);//Subscription
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.subscription)) {
if(v_responsePrimitive.primitiveContent.subscription.latestNotify != v_latestNotify_2){
setverdict(fail, __SCOPE__ & ": Error: LatestNotify attribute not updated correctly")
}
}
}
}
}
testcase TC_CSE_DMR_UPD_014_SUB_NCT() runs on CseTester system CseSystem {
// Local variables
var NotificationContentType v_notificationContentType_1 := int1;
var NotificationContentType v_notificationContentType_2 := int2;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
v_createRequest.primitiveContent.subscription.notificationContentType := v_notificationContentType_1;
v_updateRequest.primitiveContent.subscription.notificationContentType := v_notificationContentType_2;
v_responsePrimitive := f_CSE_DMR_UPD_014(int23, v_createRequest, v_updateRequest);//Subscription
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.subscription)) {
if(v_responsePrimitive.primitiveContent.subscription.notificationContentType != v_notificationContentType_2){
setverdict(fail, __SCOPE__ & ": Error: NotificationContentType attribute not updated correctly")
}
}
}
}
}
testcase TC_CSE_DMR_UPD_014_SUB_NEC() runs on CseTester system CseSystem {
// Local variables
var EventCat v_notificationEventCat_1 := {alt_1 := 100};
var EventCat v_notificationEventCat_2 := {alt_1 := 101};
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
v_createRequest.primitiveContent.subscription.notificationEventCat := v_notificationEventCat_1;
v_updateRequest.primitiveContent.subscription.notificationEventCat := v_notificationEventCat_2;
v_responsePrimitive := f_CSE_DMR_UPD_014(int23, v_createRequest, v_updateRequest);//Subscription
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.subscription)) {
if(v_responsePrimitive.primitiveContent.subscription.notificationEventCat != v_notificationEventCat_2){
setverdict(fail, __SCOPE__ & ": Error: NotificationEventCat attribute not updated correctly")
}
}
}
}
}
testcase TC_CSE_DMR_UPD_014_SUB_NFU() runs on CseTester system CseSystem {
// Local variables
var XSD.AnyURI v_notificationForwardingURI_1 := "MyForwardingURI_1";
var XSD.AnyURI v_notificationForwardingURI_2 := "MyForwardingURI_2";
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
v_createRequest.primitiveContent.subscription.notificationForwardingURI := v_notificationForwardingURI_1;
v_updateRequest.primitiveContent.subscription.notificationForwardingURI := v_notificationForwardingURI_2;
v_responsePrimitive := f_CSE_DMR_UPD_014(int23, v_createRequest, v_updateRequest);//Subscription
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.subscription)) {
if(v_responsePrimitive.primitiveContent.subscription.notificationForwardingURI != v_notificationForwardingURI_2){
setverdict(fail, __SCOPE__ & ": Error: NotificationForwardingURI attribute not updated correctly")
}
}
}
}
}
testcase TC_CSE_DMR_UPD_014_SUB_NSP() runs on CseTester system CseSystem {
// Local variables
var XSD.PositiveInteger v_notificationStoragePriority_1 := 1;
var XSD.PositiveInteger v_notificationStoragePriority_2 := 2;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
// Test component configuration
f_cf01Up();
v_createRequest.primitiveContent.subscription.notificationStoragePriority := v_notificationStoragePriority_1;
v_updateRequest.primitiveContent.subscription.notificationStoragePriority := v_notificationStoragePriority_2;
// Test adapter configuration
v_responsePrimitive := f_CSE_DMR_UPD_014(int23, v_createRequest, v_updateRequest);//Subscription
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.subscription)) {
if(v_responsePrimitive.primitiveContent.subscription.notificationStoragePriority != v_notificationStoragePriority_2){
setverdict(fail, __SCOPE__ & ": Error: NotificationStoragePriority attribute not updated correctly")
}
}
}
}
v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
}
testcase TC_CSE_DMR_UPD_014_SUB_PN() runs on CseTester system CseSystem {
// Local variables
var PendingNotification v_pendingNotification_1 := int1;
var PendingNotification v_pendingNotification_2 := int2;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
v_contentInstanceIndex := f_cse_createResource(int4, m_createContentInstanceBase, v_containerIndex);
v_createRequest.primitiveContent.subscription.pendingNotification := v_pendingNotification_1;
v_updateRequest.primitiveContent.subscription.pendingNotification := v_pendingNotification_2;
//Test Body
v_request := f_getUpdateRequestPrimitive(int4, v_containerIndex, v_updateRequest);
v_request.to_ := v_request.to_ & "/" & c_resourceShortNameOldest; //<oldest>
v_responsePrimitive := f_CSE_DMR_UPD_014(int23, v_createRequest, v_updateRequest);//Subscription
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Not allowed to update an oldest resource with error OPERATION_NOT_ALLOWED");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Accepted update of an oldest resource");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while updating an oldest resource");
}
}
v_primitiveContentRetrieveResource:=f_cse_retrieveResource(v_contentInstanceIndex);
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.contentInstance)) {
if(v_primitiveContentRetrieveResource.contentInstance.labels == v_labels){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute updated")
}
}
}
// Postamble
f_cse_postamble_deleteResources();
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.subscription)) {
if(v_responsePrimitive.primitiveContent.subscription.pendingNotification != v_pendingNotification_2){
setverdict(fail, __SCOPE__ & ": Error: PendingNotification attribute not updated correctly")
}
}
}
}
// Tear down
f_cf01Down();
}
testcase TC_CSE_DMR_UPD_014_SUB_RL() runs on CseTester system CseSystem {
// Local variables
var RateLimit v_rateLimit_1 := {0, omit};
var RateLimit v_rateLimit_2 := {1, omit};
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
}//end TC_CSE_DMR_UPD_013
v_createRequest.primitiveContent.subscription.rateLimit := v_rateLimit_1;
v_updateRequest.primitiveContent.subscription.rateLimit := v_rateLimit_2;
} // end group g_CSE_DMR_UPD_013
v_responsePrimitive := f_CSE_DMR_UPD_014(int23, v_createRequest, v_updateRequest);//Subscription
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.subscription)) {
if(v_responsePrimitive.primitiveContent.subscription.rateLimit != v_rateLimit_2){
setverdict(fail, __SCOPE__ & ": Error: RateLimit attribute not updated correctly")
}
}
}
}
}
function f_CSE_DMR_UPD_014(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on CseTester return ResponsePrimitive{
// Local variables
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
var CseTester v_notifyHandler;
var integer v_ae2Index := -1;
// Test control
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_createRequestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex);
// Test Body
v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while updating resource type " & int2str(enum2int(p_resourceType)));
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType)));
}
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
return v_response.primitive.responsePrimitive;
}//end f_CSE_DMR_UPD_014
} // end g_CSE_DMR_UPD_014
}//end group Update
@@ -9425,13 +10403,19 @@ module OneM2M_Testcases {
f_CSE_DMR_DEL_001(int23, m_createSubscriptionBase);//Subscription
};
testcase TC_CSE_DMR_DEL_001_CIN() runs on CseTester system CseSystem {
// Local variables
f_CSE_DMR_DEL_001(int4, m_createContentInstanceBase);//ContentInstance
};
function f_CSE_DMR_DEL_001(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive) runs on CseTester {
// Local variables
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_parentIndex := -1;
var integer v_containerIndex := -1;
var integer v_resourceIndex := -1;
var CseTester v_notifyHandler;
var integer v_ae2Index := -1;
@@ -9447,8 +10431,15 @@ module OneM2M_Testcases {
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi)
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_createRequestPrimitive, p_resourceType);
if(p_resourceType == int4) {
v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
v_parentIndex := v_containerIndex;
}else{
v_parentIndex := v_aeIndex;
}
v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex);
v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex);
// Test Body
v_request := valueof(m_deleteRequest(f_getResourceAddress(v_resourceIndex)));
@@ -9460,10 +10451,10 @@ module OneM2M_Testcases {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Resource" & int2str(enum2int(p_resourceType)) & " deleted successfully");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while deleting resource type " & int2str(enum2int(p_resourceType)));
@@ -9593,11 +10584,11 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error resource deleted without having privileges");
}
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while deleting resource type " & int2str(enum2int(p_resourceType)));
}
@@ -9826,10 +10817,10 @@ module OneM2M_Testcases {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(c_containerResourceType)) & " delete successfully");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while deleting resource type " & int2str(enum2int(c_containerResourceType)));
@@ -9971,7 +10962,7 @@ module OneM2M_Testcases {
v_contentInstanceIndex_2 := f_cse_createResource(int4, m_createContentInstance_noResourceName, v_containerIndex);
// Test Body
v_request := valueof(m_deleteRequest(f_getResourceAddress(v_containerIndex) & "/la"));
v_request := valueof(m_deleteRequest(f_getResourceAddress(v_containerIndex) & "/" & c_resourceShortNameLatest));
mcaPort.send(m_request(v_request));
tc_ac.start;
@@ -10050,7 +11041,7 @@ module OneM2M_Testcases {
v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
// Test Body
v_request := valueof(m_deleteRequest(f_getResourceAddress(v_containerIndex) & "/la"));
v_request := valueof(m_deleteRequest(f_getResourceAddress(v_containerIndex) & "/" & c_resourceShortNameLatest));
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
@@ -10112,7 +11103,7 @@ module OneM2M_Testcases {
v_contentInstanceIndex_2 := f_cse_createResource(int4, m_createContentInstance_noResourceName, v_containerIndex);
// Test Body
v_request := valueof(m_deleteRequest(f_getResourceAddress(v_containerIndex) & "/ol"));
v_request := valueof(m_deleteRequest(f_getResourceAddress(v_containerIndex) & "/" & c_resourceShortNameOldest));
mcaPort.send(m_request(v_request));
tc_ac.start;
@@ -10191,7 +11182,7 @@ module OneM2M_Testcases {
v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
// Test Body
v_request := valueof(m_deleteRequest(f_getResourceAddress(v_containerIndex) & "/ol"));
v_request := valueof(m_deleteRequest(f_getResourceAddress(v_containerIndex) & "/" & c_resourceShortNameOldest));
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
@@ -10315,10 +11306,10 @@ module OneM2M_Testcases {
setverdict(pass, __SCOPE__ & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!");
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, v_aeAuxIndex);
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error occurrs with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)) & "while handling a valid locationPolicy resource create request!");
@@ -10327,7 +11318,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": Timeout due to no response from requested server!");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is present or not
@@ -10398,7 +11389,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": Timeout due to no response from requested server!");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
@@ -10459,7 +11450,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": Timeout due to no response from requested server!");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
@@ -10526,7 +11517,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": Timeout due to no response from requested server!");
}
}
f_checkCseTesterStatus();
//TODO: Check to see if the resource has been updated or not
@@ -10555,7 +11546,7 @@ module OneM2M_Testcases {
var RequestPrimitive v_loc_request_preamble;
var RequestPrimitive v_container_request_preamble;
var MsgIn v_response;
var LocationSource v_locationSource := int1;//Network-based
var LocationSource v_locationSource := int1;//Network-based
//Test component configuration
f_cf01Up();
@@ -10638,10 +11629,10 @@ module OneM2M_Testcases {
setverdict(pass, __SCOPE__ & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!");
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, v_aeAuxIndex);
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error occurrs with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)) & "while handling a valid locationPolicy resource create request!");
@@ -10649,8 +11640,8 @@ module OneM2M_Testcases {
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": Timeout due to no response from requested server!");
}
}
}
f_checkCseTesterStatus();
//Check to see if the resource is present or not
@@ -10702,10 +11693,10 @@ module OneM2M_Testcases {
setverdict(pass, __SCOPE__ & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!");
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, v_aeAuxIndex);
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error occurrs with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)) & "while handling a valid locationPolicy resource create request!");
@@ -10713,8 +11704,8 @@ module OneM2M_Testcases {
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": Timeout due to no response from requested server!");
}
}
}
f_checkCseTesterStatus();
//Check to see if the resource is present or not
@@ -10977,10 +11968,10 @@ module OneM2M_Testcases {
tc_ac.stop;
setverdict(pass, __SCOPE__ & "Subscription resource is successfully!");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response{
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response{
tc_ac.stop;
setverdict(fail, __SCOPE__ & "Requested container resource is not found!");
@@ -11125,7 +12116,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
@@ -11205,7 +12196,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
@@ -11694,7 +12685,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while updating resource");
}
}
v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_groupIndex);
if(getverdict == pass){
if(ischosen(v_primitiveContentRetrievedResource.group_)){
@@ -11773,7 +12764,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while updating resource");
}
}
v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_groupIndex);
if(getverdict == pass){
if(ischosen(v_primitiveContentRetrievedResource.group_)){
@@ -11868,7 +12859,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
}
}
v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_groupIndex);
if(getverdict == pass){
if(ischosen(v_primitiveContentRetrievedResource.group_)){
@@ -11970,7 +12961,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while updating resource");
}
}
v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_groupIndex);
if(getverdict == pass){
if(ischosen(v_primitiveContentRetrievedResource.group_)){
@@ -12123,7 +13114,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
}
}
v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_groupIndex);
if(getverdict == pass){
//Check that the resource has NOT been udpated
@@ -12198,7 +13189,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while updating resource");
}
}
v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_groupIndex);
if(getverdict == pass){
//Check that the resource has NOT been udpated
@@ -12310,7 +13301,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
}
}
v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_groupIndex);
if(getverdict == pass){
if(ischosen(v_primitiveContentRetrievedResource.group_)){
@@ -12921,7 +13912,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource");
}
}
// Postamble
f_cse_postamble_deleteResources();
@@ -13543,8 +14534,8 @@ module OneM2M_Testcases {
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while creating resource");
}
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
@@ -13608,7 +14599,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
@@ -13680,7 +14671,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
@@ -13746,7 +14737,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
@@ -13816,7 +14807,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
@@ -13886,7 +14877,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
@@ -14033,10 +15024,10 @@ module OneM2M_Testcases {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Resource type int3 (Container) created successfully");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while creating resource type int3 (Container)");
@@ -14310,7 +15301,7 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while updating resource type int2 (Ae)");
@@ -15173,8 +16164,8 @@ module OneM2M_Testcases {
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(c_accessControlPolicyType)));
}
}
}
f_checkCseTesterStatus();
//Check to see if the resource is present or not
@@ -15245,8 +16236,8 @@ module OneM2M_Testcases {
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(c_accessControlPolicyType)));
}
}
}
f_checkCseTesterStatus();
//Check to see if the resource is present or not
@@ -15328,7 +16319,7 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while operation on resource type int2 (Ae)");
@@ -15359,7 +16350,7 @@ module OneM2M_Testcases {
log(__SCOPE__ & ":INFO: No answer while updating resource type ACP");
}
}
f_cse_postamble_deleteResources();
//Tear down
@@ -15437,7 +16428,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource type int2 (Ae)");
}
}
//Postamble
f_cse_postamble_deleteResources();
@@ -15861,7 +16852,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while executing update operation on resource type int2 (Ae)");
}
}
v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_aeIndex);
if(getverdict == pass){
if(ischosen(v_primitiveContentRetrievedResource.aE)) {
@@ -15946,7 +16937,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource type int3 (Container)");
}
}
v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_aeIndex);
if(getverdict == pass){
if(ischosen(v_primitiveContentRetrievedResource.aE)) {
Loading