Profile files referencing Release 2 test cases files

Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 75c82e3e
......@@ -15,6 +15,7 @@ module OneM2M_TestControl_IN_profile {
import from OneM2M_Testcases_CSE_Release_1 all;
import from OneM2M_Testcases_CSE_Release_2 all;
import from OneM2M_Pics all;
control {
......
......@@ -15,6 +15,7 @@ module OneM2M_TestControl_MN_profile {
import from OneM2M_Testcases_CSE_Release_1 all;
import from OneM2M_Testcases_CSE_Release_2 all;
import from OneM2M_Pics all;
control {
......
......@@ -8633,161 +8633,7 @@ module OneM2M_Testcases_CSE_Release_1 {
group Subscription_And_Notification {
group Create {
/**
* @desc Check that the IUT rejects the creation of the <subscription> resource when the target subscribed-to RESOURCE_TYPE resource is not subscribable.
*
*/
testcase TC_CSE_SUB_CRE_001_SUB() runs on Tester system CseSystem {
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
v_ae1.done;
v_ae1.start(f_CSE_SUB_CRE_001_SUB());
v_ae1.done;
}
function f_CSE_SUB_CRE_001_SUB() runs on AeSimu {
// Local variables
var MsgIn v_response;
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var RequestPrimitive v_request;
var integer v_ae2Index := -1;
// Test control
// Test component configuration
f_cf01Up(true);
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred;
f_cse_preamble_subscriptionVerification(v_ae2Index, v_createRequest, int23);
v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription resource is created
v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_resourceIndex);
// Test Body
mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int5203))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": <Subscription> Resource not subscribable");
}
[] 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__ & ": Subscription successful whereas <Subscription> resource is not subscribable");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while creating resource");
}
}
f_checkAeSimuStatus();
//Check to see if the resource is NOT present
if(f_cse_isResourceNotPresent(v_resourceIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
}
//Postamble
f_cse_postamble_deleteResources();
//Tear down
f_cf01Down();
} // end TC_CSE_SUB_CRE_001_SUB
testcase TC_CSE_SUB_CRE_001_CIN() runs on Tester system CseSystem {
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
v_ae1.done;
v_ae1.start(f_CSE_SUB_CRE_001_CIN());
v_ae1.done;
}
function f_CSE_SUB_CRE_001_CIN() runs on AeSimu {
// Local variables
var MsgIn v_response;
var integer v_aeIndex := -1;
var integer v_containerResourceIndex := -1;
var integer v_contentInstanceResourceIndex := -1;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var RequestPrimitive v_request;
// Test control
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
v_containerResourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);//Container
v_contentInstanceResourceIndex := f_cse_createResource(int4, m_createContentInstance(f_getResourceAddress(v_aeIndex), "Random Value"), v_containerResourceIndex);//ContentInstance
v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_contentInstanceResourceIndex);
// Test Body
mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int5203))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": <Subscription> Resource not subscribable");
}
[] 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__ & ": Subscription successful whereas <Subscription> resource is not subscribable");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while creating resource");
}
}
f_checkAeSimuStatus();
//Check to see if the resource is NOT present
if(f_cse_isResourceNotPresent(v_contentInstanceResourceIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
}
//Postamble
f_cse_postamble_deleteResources();
//Tear down
f_cf01Down();
} // end TC_CSE_SUB_CRE_001_CIN
/**
* @desc Check that the IUT rejects the creation of the <subscription> resource when the originator does not have privileges for retrieving the subscribed-to resource.
*
......
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