Commit ee71ce85 authored by Pramod Kulkarni's avatar Pramod Kulkarni
Browse files

Implemented TCs ANNC_UPD_004, ANNC_UPD_006 and ANNC_UPD_008

parent 056a7645
......@@ -698,7 +698,8 @@ module OneM2M_Templates {
tokens := *,
tokenIDs := *,
localTokenIDs := *,
tokenRequestIndicator := *
tokenRequestIndicator := *,
releaseVersionIndicator := ?
}
......
......@@ -7237,6 +7237,49 @@ module OneM2M_PermutationFunctions {
// Tear down
f_cf02Down();
} //end f_CSE_ANNC_UPD_003
function f_CSE_ANNC_UPD_004(ResourceType p_resourceType, template RequestPrimitive p_requestCreatePrimitive, template RequestPrimitive p_createRequestAnnc, template RequestPrimitive p_requestUpdatePrimitive) runs on CseSimu {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var MsgIn v_request;
var RequestPrimitive v_requestUpdatePrimitive;
var integer v_parentIndex := -1;
var integer v_aeIndex := -1;
var integer v_resourceIndex;
var integer v_aEAnncIndex := -1;
var integer v_latestResourceIndex;
var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_create := m_createAe(PX_APP_ID, omit, omit);
v_create.primitiveContent.aE.announceTo := {PX_CSE_ID};
//Test control
// Test component configuration
f_cf02UpCseSimuMaster();
// Test adapter configuration
// Register the CSE
f_cse_registerRemoteCse(m_createRemoteCSEBase);
//Preamble
v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, vc_aeAuxIndex));
v_ae1.done;
v_latestResourceIndex := f_getLatestResourceIndex(v_ae1);
// Test Body
v_ae1.start(f_cse_updateResource(p_resourceType, v_latestResourceIndex, p_requestUpdatePrimitive));
v_ae1.done;
// Postamble
f_cse_postamble_deleteResourcesCSE();
// Tear down
f_cf02DownCseSimuMaster();
}//end f_CSE_ANNC_UPD_004
function f_CSE_ANNC_UPD_005(ResourceType p_resourceType, template RequestPrimitive p_requestCreatePrimitive, template RequestPrimitive p_createRequestAnnc, template RequestPrimitive p_requestUpdatePrimitive, template RequestPrimitive p_updateRequestAnnc, template (omit) AttributeAux_list p_nullFields := omit) runs on CseSimu {
// Local variables
......@@ -7302,6 +7345,125 @@ module OneM2M_PermutationFunctions {
}//end f_CSE_ANNC_UPD_005
function f_CSE_ANNC_UPD_006(ResourceType p_resourceType, template RequestPrimitive p_requestCreatePrimitive, template RequestPrimitive p_createRequestAnnc, template RequestPrimitive p_requestUpdatePrimitive) runs on CseSimu {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var MsgIn v_request;
var RequestPrimitive v_requestUpdatePrimitive;
var integer v_parentIndex := -1;
var integer v_aeIndex := -1;
var integer v_resourceIndex;
var integer v_aEAnncIndex := -1;
var integer v_latestResourceIndex;
var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_create := m_createAe(PX_APP_ID, omit, omit);
v_create.primitiveContent.aE.announceTo := {PX_CSE_ID};
//Test control
// Test component configuration
f_cf02UpCseSimuMaster();
// Test adapter configuration
// Register the CSE
f_cse_registerRemoteCse(m_createRemoteCSEBase);
//Preamble
v_ae1.start(f_cse_createResource(int2,v_create));
f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -));
v_ae1.done;
v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, vc_aeAuxIndex));
f_cse_announcementProcedure_createHandler(p_createRequestAnnc);
v_ae1.done;
v_latestResourceIndex := f_getLatestResourceIndex(v_ae1);
// Test Body
v_ae1.start(f_cse_updateResource(p_resourceType, v_latestResourceIndex, p_requestUpdatePrimitive));
tc_ac.start;
alt {
[] mccPortIn.receive(mw_request(p_createRequestAnnc)) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ":INFO: CREATE Request received");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ":ERROR: No CREATE request received");
}
}
v_ae1.done;
// Postamble
f_cse_postamble_deleteResourcesCSE();
// Tear down
f_cf02DownCseSimuMaster();
}//end f_CSE_ANNC_UPD_006
function f_CSE_ANNC_UPD_007(ResourceType p_resourceType, template RequestPrimitive p_requestCreatePrimitive, template RequestPrimitive p_createRequestAnnc, template RequestPrimitive p_requestUpdatePrimitive) runs on CseSimu {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var MsgIn v_request;
var RequestPrimitive v_requestUpdatePrimitive;
var integer v_parentIndex := -1;
var integer v_aeIndex := -1;
var integer v_resourceIndex;
var integer v_aEAnncIndex := -1;
var integer v_latestResourceIndex;
var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_create := m_createAe(PX_APP_ID, omit, omit);
v_create.primitiveContent.aE.announceTo := {PX_CSE_ID};
//Test control
// Test component configuration
f_cf02UpCseSimuMaster();
// Test adapter configuration
// Register the CSE
f_cse_registerRemoteCse(m_createRemoteCSEBase);
//Preamble
v_ae1.start(f_cse_createResource(int2,v_create));
f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -));
v_ae1.done;
v_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, vc_aeAuxIndex));
f_cse_announcementProcedure_createHandler(p_createRequestAnnc);
v_ae1.done;
v_latestResourceIndex := f_getLatestResourceIndex(v_ae1);
// Test Body
v_ae1.start(f_cse_updateResource(p_resourceType, v_latestResourceIndex, p_requestUpdatePrimitive));
tc_ac.start;
alt {
[] mccPortIn.receive(mw_request(p_createRequestAnnc)) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ":INFO: CREATE Request received");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ":ERROR: No CREATE request received");
}
}
v_ae1.done;
// Postamble
f_cse_postamble_deleteResourcesCSE();
// Tear down
f_cf02DownCseSimuMaster();
}//end f_CSE_ANNC_UPD_007
function f_CSE_ANNC_UPD_009(ResourceType p_resourceType, template RequestPrimitive p_requestCreatePrimitive, template RequestPrimitive p_createRequestAnnc, template RequestPrimitive p_requestUpdatePrimitive, template RequestPrimitive p_updateRequestAnnc) runs on CseSimu {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
......
......@@ -7865,6 +7865,54 @@ module OneM2M_Testcases_CSE_Release_2 {
}
}// end group g_CSE_ANNC_UPD_003
group g_CSE_ANNC_UPD_004 {
testcase TC_CSE_ANNC_UPD_004_ACP() runs on Tester system CseSystem {
// Local variables
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template RequestPrimitive v_createRequest := m_createAcpBase;
var template RequestPrimitive v_createRequestAnnc := mw_createAccessControlPolicyAnnc;
var template RequestPrimitive v_updateRequest := m_updateAcpBase;
v_updateRequest.primitiveContent.accessControlPolicy.announceTo := {PX_CSE1_ID};
v_updateRequest.primitiveContent.accessControlPolicy.announcedAttribute := {"ToBeDeleted"};
v_updateRequest.primitiveContent.accessControlPolicy.parentID := PX_CSE1_ID;
v_cse1.start(f_CSE_ANNC_UPD_004(int1, v_createRequest, v_createRequestAnnc, v_updateRequest));//AccessControlPolicy
v_cse1.done;
}
testcase TC_CSE_ANNC_UPD_004_CNT() runs on Tester system CseSystem {
// Local variables
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template RequestPrimitive v_createRequest := m_createContainerBase;
var template RequestPrimitive v_createRequestAnnc := mw_createContainerAnncBase;
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
v_updateRequest.primitiveContent.container.announceTo := {PX_CSE1_ID};
v_updateRequest.primitiveContent.container.announcedAttribute := {"ToBeDeleted"};
v_updateRequest.primitiveContent.container.parentID := PX_CSE1_ID;
v_cse1.start(f_CSE_ANNC_UPD_004(int3, v_createRequest, v_createRequestAnnc, v_updateRequest));//Container
v_cse1.done;
}
testcase TC_CSE_ANNC_UPD_004_GRP() runs on Tester system CseSystem {
// Local variables
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template RequestPrimitive v_createRequest := m_createGroupBase;
var template RequestPrimitive v_createRequestAnnc := mw_createGroupAnncBase;
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
v_updateRequest.primitiveContent.group_.announceTo := {PX_CSE1_ID};
v_updateRequest.primitiveContent.group_.announcedAttribute := {"ToBeDeleted"};
v_updateRequest.primitiveContent.group_.parentID := PX_CSE1_ID;
v_cse1.start(f_CSE_ANNC_UPD_004(int9, v_createRequest, v_createRequestAnnc, v_updateRequest));//Group
v_cse1.done;
}
} // end group g_CSE_ANNC_UPD_004
group g_CSE_ANNC_UPD_005 {
......@@ -7904,6 +7952,90 @@ module OneM2M_Testcases_CSE_Release_2 {
}
} // end group g_CSE_ANNC_UPD_005
group g_CSE_ANNC_UPD_006 {
testcase TC_CSE_ANNC_UPD_006_ACP() runs on Tester system CseSystem {
//Local variables
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template RequestPrimitive v_createRequest := m_createAcpBase;
var template RequestPrimitive v_createRequestAnnc := mw_createAccessControlPolicyAnnc;
var template RequestPrimitive v_updateRequest := m_updateAcpBase;
v_updateRequest.primitiveContent.accessControlPolicy.announceTo := {PX_CSE1_ID};
v_cse1.start(f_CSE_ANNC_UPD_006(int1, v_createRequest, v_createRequestAnnc, v_updateRequest));//AccessControlPolicy
v_cse1.done;
}
testcase TC_CSE_ANNC_UPD_006_CNT() runs on Tester system CseSystem {
//Local variables
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template RequestPrimitive v_createRequest := m_createContainerBase;
var template RequestPrimitive v_createRequestAnnc := mw_createContainerAnncBase;
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
v_updateRequest.primitiveContent.container.announceTo := {PX_CSE1_ID};
v_cse1.start(f_CSE_ANNC_UPD_006(int3, v_createRequest, v_createRequestAnnc, v_updateRequest));//Container
v_cse1.done;
}
testcase TC_CSE_ANNC_UPD_006_GRP() runs on Tester system CseSystem {
//Local variables
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template RequestPrimitive v_createRequest := m_createGroupBase;
var template RequestPrimitive v_createRequestAnnc := mw_createGroupAnncBase;
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
v_updateRequest.primitiveContent.group_.announceTo := {PX_CSE1_ID};
v_cse1.start(f_CSE_ANNC_UPD_006(int9, v_createRequest, v_createRequestAnnc, v_updateRequest));//Group
v_cse1.done;
}
}// end group g_CSE_ANNC_UPD_006
group g_CSE_ANNC_UPD_007 {
testcase TC_CSE_ANNC_UPD_007_ACP() runs on Tester system CseSystem {
//Local variables
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template RequestPrimitive v_createRequest := m_createAcpBase;
var template RequestPrimitive v_createRequestAnnc := mw_createAccessControlPolicyAnnc;
var template RequestPrimitive v_updateRequest := m_updateAcpBase;
v_updateRequest.primitiveContent.accessControlPolicy.announceTo := {PX_CSE1_ID};
v_cse1.start(f_CSE_ANNC_UPD_007(int1, v_createRequest, v_createRequestAnnc, v_updateRequest));//AccessControlPolicy
v_cse1.done;
}
testcase TC_CSE_ANNC_UPD_007_CNT() runs on Tester system CseSystem {
//Local variables
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template RequestPrimitive v_createRequest := m_createContainerBase;
var template RequestPrimitive v_createRequestAnnc := mw_createContainerAnncBase;
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
v_updateRequest.primitiveContent.container.announceTo := {PX_CSE1_ID};
v_cse1.start(f_CSE_ANNC_UPD_007(int3, v_createRequest, v_createRequestAnnc, v_updateRequest));//Container
v_cse1.done;
}
testcase TC_CSE_ANNC_UPD_007_GRP() runs on Tester system CseSystem {
//Local variables
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template RequestPrimitive v_createRequest := m_createGroupBase;
var template RequestPrimitive v_createRequestAnnc := mw_createGroupAnncBase;
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
v_updateRequest.primitiveContent.group_.announceTo := {PX_CSE1_ID};
v_cse1.start(f_CSE_ANNC_UPD_007(int9, v_createRequest, v_createRequestAnnc, v_updateRequest));//Group
v_cse1.done;
}
} //end group g_CSE_ANNC_UPD_007
group g_CSE_ANNC_UPD_009{
testcase TC_CSE_ANNC_UPD_009_CNT_MBS() runs on Tester system CseSystem {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment