TC_CSE_REG_RET_005 Updated for support of MN CSE testing

Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 9b9fb0da
......@@ -54,7 +54,7 @@ module OneM2M_TestControl_IN_profile {
if(true) {execute (TC_CSE_REG_UPD_001());}
if(true) {execute (TC_CSE_REG_DEL_001());}
if(PICS_CB_CST) {execute (TC_CSE_REG_RET_002_CST());}
if(PICS_IN_CSE) {execute (TC_CSE_REG_RET_005());}
if(true) {execute (TC_CSE_REG_RET_005());}
if(PICS_CB_NL) {execute (TC_CSE_REG_RET_002_NL());}
//CE_REG_00002
......
......@@ -54,6 +54,7 @@ module OneM2M_TestControl_MN_profile {
if(true) {execute (TC_CSE_REG_UPD_001());}
if(true) {execute (TC_CSE_REG_DEL_001());}
if(PICS_CB_CST) {execute (TC_CSE_REG_RET_002_CST());}
if(true) {execute (TC_CSE_REG_RET_005());}
if(PICS_CB_NL) {execute (TC_CSE_REG_RET_002_NL());}
//CE_REG_00002
......
......@@ -2258,13 +2258,8 @@ module OneM2M_Testcases_CSE_Release_1 {
// Local variables
var MsgIn v_response;
var integer v_aeIndex := -1;
var template PrimitiveContent v_contentResponse;
// Test control
if(not(PICS_IN_CSE)) {
setverdict(inconc, __SCOPE__ & ": IUT shall be IN-CSE to run this test case");
stop;
}
var template PrimitiveContent v_contentResponse_MN;
var template PrimitiveContent v_contentResponse_IN;
// Test component configuration
f_cf01Up();
......@@ -2275,18 +2270,34 @@ module OneM2M_Testcases_CSE_Release_1 {
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
// Test Body
v_contentResponse.cSEBase := mw_contentCSEBase_rc1;
v_contentResponse.cSEBase.cseType := int1;
v_contentResponse_MN.cSEBase := mw_contentCSEBase_rc1;
v_contentResponse_IN.cSEBase := mw_contentCSEBase_rc1;
v_contentResponse_IN.cSEBase.cseType := int1;
mcaPort.send(m_request(m_retrieve(f_getResourceAddress(), f_getOriginator(v_aeIndex))));//TODO Maybe PX_SUPER_AE_ID
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse), {"parentID"})) -> value v_response {
[PX_IN_CSE] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse_IN), {"parentID"})) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": cseType attribute is set to 1 (IN_CSE)");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response {
[PX_MN_CSE] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse_MN), {"parentID"})) -> value v_response {
tc_ac.stop;
if(ispresent(v_response.primitive.responsePrimitive.primitiveContent.cSEBase.cseType)) {
if(v_response.primitive.responsePrimitive.primitiveContent.cSEBase.cseType == int2) {
setverdict(pass, __SCOPE__ & ": cseType attribute is set to 2 (MN_CSE)");
} else {
setverdict(fail, __SCOPE__ & ": cseType attribute is set to other than 2 (MN_CSE)");
}
}
}
[PX_IN_CSE] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse_IN))) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
[PX_MN_CSE] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse_MN))) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
......
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