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

Implemented TP DMR/CRE/019

parent 863b9bbb
......@@ -2653,6 +2653,60 @@ module OneM2M_PermutationFunctions {
f_cf01Down();
}//end f_CSE_DMR_CRE_017
function f_CSE_DMR_CRE_019(ResourceType p_resourceType, template RequestPrimitive p_createRequestAnnc) runs on CseSimu {
// Local variables
var MsgIn v_request;
var integer v_parentIndex := -1;
var integer v_aeIndex := -1;
var integer v_resourceIndex;
var integer v_aEAnncIndex := -1;
var RequestPrimitive v_createAEAnnc;
var RequestPrimitive v_aeAnnc;
var ResponsePrimitive v_responsePrimitive;
// Test control
// Test component configuration
f_cf04Up();
// Test adapter configuration
// Register the CSE
f_cse_registerRemoteCse(m_createRemoteCSEBase);
// Test Body
v_createAEAnnc := m_createAEAnnc(omit, omit, omit, PX_CSE1_ID);
v_aeAnnc := f_getCreateRequestPrimitive(int10002, v_createAEAnnc, -1);
mccPort.send(m_request(v_aeAnnc));
// Test Body
tc_ac.start;
alt {
[] mccPortIn.receive(mw_request(p_createRequestAnnc)) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ":INFO: CREATE REQUEST received");
if(match(v_request.primitive.requestPrimitive.to_, f_getLocalResourceAddress(v_aEAnncIndex, e_hierarchical, e_spRelative)) or
match(v_request.primitive.requestPrimitive.to_, f_getLocalResourceAddress(v_aEAnncIndex, e_nonHierarchical, e_spRelative))) {
setverdict(pass, __SCOPE__ & ":matching ANNC_PARENT_RESOURCE_ADDRESS");
} else {
setverdict(fail, __SCOPE__ & ":mis-matching ANNC_PARENT_RESOURCE_ADDRESS");
}
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ":ERROR: No CREATE REQUEST received");
}
}
// Postamble
f_cse_postamble_deleteResourcesCSE();
// Tear down
f_cf04Down();
}//end f_CSE_DMR_CRE_019
function f_CSE_DMR_CRE_020(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template (present) RequestPrimitive p_requestAnnc) runs on AeSimu {
......
......@@ -1255,6 +1255,60 @@ module OneM2M_Testcases_CSE_Release_2 {
} // end g_CSE_DMR_CRE_017
group g_CSE_DMR_CRE_019 {
testcase TC_CSE_DMR_CRE_019_CNTA_AEA() runs on Tester system CseSystem {
// Local variables
var template RequestPrimitive v_createRequest := m_createContainerBase;
var ResponsePrimitive v_responsePrimitive;
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
v_createRequest.primitiveContent.subscription.resourceName := omit;
v_cse1.start(f_CSE_DMR_CRE_019(int3, v_createRequest));//Container
v_cse1.done;
if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
if(not ispresent(v_responsePrimitive.primitiveContent.subscription.resourceName)){
setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
}
}
}
testcase TC_CSE_DMR_CRE_019_GRPA_AEA() runs on Tester system CseSystem {
// Local variables
var template RequestPrimitive v_createRequest := m_createGroupBase;
var ResponsePrimitive v_responsePrimitive;
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
v_createRequest.primitiveContent.subscription.resourceName := omit;
v_cse1.start(f_CSE_DMR_CRE_019(int9, v_createRequest));//Group
v_cse1.done;
if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
if(not ispresent(v_responsePrimitive.primitiveContent.subscription.resourceName)){
setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
}
}
}
testcase TC_CSE_DMR_CRE_019_ACPA_AEA() runs on Tester system CseSystem {
// Local variables
var template RequestPrimitive v_createRequest := m_createAcpBase;
var ResponsePrimitive v_responsePrimitive;
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
v_createRequest.primitiveContent.subscription.resourceName := omit;
v_cse1.start(f_CSE_DMR_CRE_019(int1, v_createRequest));//Access Control Policy
v_cse1.done;
if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
if(not ispresent(v_responsePrimitive.primitiveContent.subscription.resourceName)){
setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
}
}
}
} //end g_CSE_DMR_CRE_019
group g_CSE_DMR_CRE_020 {
......
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