New testcases for:

TP/oneM2M/CSE/GEN/CRE/BV/001
TP/oneM2M/CSE/GEN/CRE/BV/002
TP/oneM2M/CSE/GEN/RET/BV/001
TP/oneM2M/CSE/GEN/RET/BV/002
TP/oneM2M/CSE/GEN/UPD/BV/001
TP/oneM2M/CSE/GEN/UPD/BV/002
TP/oneM2M/CSE/GEN/DEL/BV/001
TP/oneM2M/CSE/GEN/DEL/BV/002
Signed-off-by: Miguel Angel Reina Ortega's avatarMiguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org>
parent cfe3b59d
......@@ -7,7 +7,7 @@
*
* @author oneM2M
* @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Functions.ttcn $
* $Id: OneM2M_Functions.ttcn 308 2017-06-21 09:44:17Z reinaortega $
* $Id: OneM2M_Functions.ttcn 310 2017-06-23 12:40:44Z reinaortega $
* @desc Module containing functions for oneM2M
*
*/
......@@ -1619,14 +1619,14 @@ module OneM2M_Functions {
} else if (vc_primitiveScope == e_absolute) {
if(vc_addressingMethod == e_nonHierarchical) {
if(p_targetResourceIndex == -1) {
return "//" &"SpId" & "/" & PX_CSE_ID;
return "//" & PX_SP_ID & "/" & PX_CSE_ID;
} else {
v_resourceAddress := f_getResourceAddress() & "/" & f_getResourceId(vc_resourcesList[p_targetResourceIndex].resource);
return v_resourceAddress;
}
} else {
if(p_targetResourceIndex == -1) {
return "//" &"SpId" & "/" & PX_CSE_ID & "/" & PX_CSE_NAME;
return "//" & PX_SP_ID & "/" & PX_CSE_ID & "/" & PX_CSE_NAME;
} else {
v_resourceAddress := f_getResourceAddress(vc_resourcesList[p_targetResourceIndex].parentIndex) & "/" & f_getResourceName(vc_resourcesList[p_targetResourceIndex].resource);
return v_resourceAddress;
......
......@@ -7,7 +7,7 @@
*
* @author oneM2M
* @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Pics.ttcn $
* $Id: OneM2M_Pics.ttcn 307 2017-06-21 08:32:28Z reinaortega $
* $Id: OneM2M_Pics.ttcn 310 2017-06-23 12:40:44Z reinaortega $
* @desc Module containing Pixits for oneM2M
*
*/
......@@ -19,6 +19,8 @@ module OneM2M_Pics {
*/
modulepar boolean PICS_ACP_SUPPORT := true;
modulepar boolean PICS_IN_CSE := true;
modulepar boolean PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT := true;
modulepar boolean PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT := true;
} // end of module
......@@ -7,7 +7,7 @@
*
* @author oneM2M
* @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Pixits.ttcn $
* $Id: OneM2M_Pixits.ttcn 307 2017-06-21 08:32:28Z reinaortega $
* $Id: OneM2M_Pixits.ttcn 310 2017-06-23 12:40:44Z reinaortega $
* @desc Module containing Pixits for oneM2M
*
*/
......@@ -38,6 +38,8 @@ module OneM2M_Pixits {
modulepar XSD.ID PX_CSE_ID := "cseId";
modulepar XSD.ID PX_SP_ID := "om2m.org";
modulepar XSD.ID PX_CSE1_ID := "MyCSEId";
modulepar XSD.ID PX_CSE_RESOURCE_ID := "cseResourceId";
......
......@@ -7,7 +7,7 @@
*
* @author oneM2M
* @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Testcases.ttcn $
* $Id: OneM2M_Testcases.ttcn 308 2017-06-21 09:44:17Z reinaortega $
* $Id: OneM2M_Testcases.ttcn 311 2017-06-27 07:31:00Z reinaortega $
* @desc Module containing test cases for oneM2M
*
*/
......@@ -81,6 +81,679 @@ module OneM2M_Testcases {
group CSE {
group Generic {
group Create {
group g_CSE_GEN_CRE_BV_001 {
testcase TC_CSE_GEN_CRE_BV_001_CSR() runs on CseTester system CseSystem {
// Local variables
f_CSE_GEN_CRE_BV_001(e_cseRelative);
}
testcase TC_CSE_GEN_CRE_BV_001_SPR() runs on CseTester system CseSystem {
// Local variables
f_CSE_GEN_CRE_BV_001(e_spRelative);
}
testcase TC_CSE_GEN_CRE_BV_001_ABS() runs on CseTester system CseSystem {
// Local variables
f_CSE_GEN_CRE_BV_001(e_absolute);
}
function f_CSE_GEN_CRE_BV_001(in PrimitiveScope p_primitiveScope) runs on CseTester {
// Local variables
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
// Test control
if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
setverdict(inconc, testcasename() & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case");
stop;
}
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
// Test Body
//Force usage of Non-Hierarchical addressing method
vc_addressingMethod := e_nonHierarchical;
vc_primitiveScope := p_primitiveScope;
v_request := f_getCreateRequestPrimitive(int3, m_createContainerBase, v_resourceIndex);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": Container resource created using non-hierarchical addressing method");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
setverdict(fail, testcasename() & ": Wrong response status code in the response");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while creating container resource using non-hierarchical addressing method");
}
[] tc_ac.timeout {
setverdict(fail, testcasename() & ": No answer while creating resource");
}
}
// Postamble
vc_addressingMethod := PX_ADDRESSING_METHOD;
vc_primitiveScope := PX_PRIMITIVE_SCOPE;
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}//end f_CSE_GEN_CRE_BV_001
} // end of group g_CSE_GEN_CRE_BV_001
group g_CSE_GEN_CRE_BV_002 {
testcase TC_CSE_GEN_CRE_BV_002_CSR() runs on CseTester system CseSystem {
// Local variables
f_CSE_GEN_CRE_BV_002(e_cseRelative);
}
testcase TC_CSE_GEN_CRE_BV_002_SPR() runs on CseTester system CseSystem {
// Local variables
f_CSE_GEN_CRE_BV_002(e_spRelative);
}
testcase TC_CSE_GEN_CRE_BV_002_ABS() runs on CseTester system CseSystem {
// Local variables
f_CSE_GEN_CRE_BV_002(e_absolute);
}
function f_CSE_GEN_CRE_BV_002(in PrimitiveScope p_primitiveScope) runs on CseTester {
// Local variables
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
// Test control
if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
setverdict(inconc, testcasename() & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case");
stop;
}
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
// Test Body
//Force usage of Non-Hierarchical addressing method
vc_addressingMethod := e_hierarchical;
vc_primitiveScope := p_primitiveScope;
v_request := f_getCreateRequestPrimitive(int3, m_createContainerBase, v_resourceIndex);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": Container resource created using hierarchical addressing method");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
setverdict(fail, testcasename() & ": Wrong response status code in the response");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while creating container resource using hierarchical addressing method");
}
[] tc_ac.timeout {
setverdict(fail, testcasename() & ": No answer while creating resource");
}
}
// Postamble
vc_addressingMethod := PX_ADDRESSING_METHOD;
vc_primitiveScope := PX_PRIMITIVE_SCOPE;
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}//end f_CSE_GEN_CRE_BV_002
} // end of group g_CSE_GEN_CRE_BV_002
} // end of group Create
group Retrieve {
group g_CSE_GEN_RET_BV_001 {
testcase TC_CSE_GEN_RET_BV_001_CSR() runs on CseTester system CseSystem {
// Local variables
f_CSE_GEN_RET_BV_001(e_cseRelative);
}
testcase TC_CSE_GEN_RET_BV_001_SPR() runs on CseTester system CseSystem {
// Local variables
f_CSE_GEN_RET_BV_001(e_spRelative);
}
testcase TC_CSE_GEN_RET_BV_001_ABS() runs on CseTester system CseSystem {
// Local variables
f_CSE_GEN_RET_BV_001(e_absolute);
}
function f_CSE_GEN_RET_BV_001(in PrimitiveScope p_primitiveScope) runs on CseTester {
// Local variables
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
// Test control
if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
setverdict(inconc, testcasename() & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case");
stop;
}
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
// Test Body
//Force usage of Non-Hierarchical addressing method
vc_addressingMethod := e_nonHierarchical;
vc_primitiveScope := p_primitiveScope;
mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": Container resource retrieved using non-hierarchical addressing method");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
setverdict(fail, testcasename() & ": Wrong response status code in the response");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while retrieving container resource using non-hierarchical addressing method");
}
[] tc_ac.timeout {
setverdict(fail, testcasename() & ": No answer while retrieving resource");
}
}
// Postamble
vc_addressingMethod := PX_ADDRESSING_METHOD;
vc_primitiveScope := PX_PRIMITIVE_SCOPE;
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}//end f_CSE_GEN_RET_BV_001
} // end of group g_CSE_GEN_RET_BV_001
group g_CSE_GEN_RET_BV_002 {
testcase TC_CSE_GEN_RET_BV_002_CSR() runs on CseTester system CseSystem {
// Local variables
f_CSE_GEN_RET_BV_002(e_cseRelative);
}
testcase TC_CSE_GEN_RET_BV_002_SPR() runs on CseTester system CseSystem {
// Local variables
f_CSE_GEN_RET_BV_002(e_spRelative);
}
testcase TC_CSE_GEN_RET_BV_002_ABS() runs on CseTester system CseSystem {
// Local variables
f_CSE_GEN_RET_BV_002(e_absolute);
}
function f_CSE_GEN_RET_BV_002(in PrimitiveScope p_primitiveScope) runs on CseTester {
// Local variables
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
// Test control
if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
setverdict(inconc, testcasename() & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case");
stop;
}
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
// Test Body
//Force usage of Non-Hierarchical addressing method
vc_addressingMethod := e_hierarchical;
vc_primitiveScope := p_primitiveScope;
mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))));tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": Container resource retrieved using hierarchical addressing method");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
setverdict(fail, testcasename() & ": Wrong response status code in the response");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while retrieving container resource using hierarchical addressing method");
}
[] tc_ac.timeout {
setverdict(fail, testcasename() & ": No answer while retrieving resource");
}
}
// Postamble
vc_addressingMethod := PX_ADDRESSING_METHOD;
vc_primitiveScope := PX_PRIMITIVE_SCOPE;
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}//end f_CSE_GEN_RET_BV_002
} // end of group g_CSE_GEN_RET_BV_002
} // end of group Retrieve
group Update {
group g_CSE_GEN_UPD_BV_001 {
testcase TC_CSE_GEN_UPD_BV_001_CSR() runs on CseTester system CseSystem {
// Local variables
f_CSE_GEN_UPD_BV_001(e_cseRelative);
}
testcase TC_CSE_GEN_UPD_BV_001_SPR() runs on CseTester system CseSystem {
// Local variables
f_CSE_GEN_UPD_BV_001(e_spRelative);
}
testcase TC_CSE_GEN_UPD_BV_001_ABS() runs on CseTester system CseSystem {
// Local variables
f_CSE_GEN_UPD_BV_001(e_absolute);
}
function f_CSE_GEN_UPD_BV_001(in PrimitiveScope p_primitiveScope) runs on CseTester {
// Local variables
var RequestPrimitive v_updateRequest := m_updateContainerBase;
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
// Test control
if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
setverdict(inconc, testcasename() & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case");
stop;
}
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
// Test Body
//Force usage of Non-Hierarchical addressing method
vc_addressingMethod := e_nonHierarchical;
vc_primitiveScope := p_primitiveScope;
v_updateRequest.primitiveContent.container.labels := {"MyLabel"};
v_updateRequest := f_getUpdateRequestPrimitive(int3, v_resourceIndex, v_updateRequest);
mcaPort.send(m_request(v_updateRequest));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": Container resource updated using non-hierarchical addressing method");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
setverdict(fail, testcasename() & ": Wrong response status code in the response");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while updating container resource using non-hierarchical addressing method");
}
[] tc_ac.timeout {
setverdict(fail, testcasename() & ": No answer while updating resource");
}
}
// Postamble
vc_addressingMethod := PX_ADDRESSING_METHOD;
vc_primitiveScope := PX_PRIMITIVE_SCOPE;
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}//end f_CSE_GEN_UPD_BV_001
} // end of group g_CSE_GEN_UPD_BV_001
group g_CSE_GEN_UPD_BV_002 {
testcase TC_CSE_GEN_UPD_BV_002_CSR() runs on CseTester system CseSystem {
// Local variables
f_CSE_GEN_UPD_BV_002(e_cseRelative);
}
testcase TC_CSE_GEN_UPD_BV_002_SPR() runs on CseTester system CseSystem {
// Local variables
f_CSE_GEN_UPD_BV_002(e_spRelative);
}
testcase TC_CSE_GEN_UPD_BV_002_ABS() runs on CseTester system CseSystem {
// Local variables
f_CSE_GEN_UPD_BV_002(e_absolute);
}
function f_CSE_GEN_UPD_BV_002(in PrimitiveScope p_primitiveScope) runs on CseTester {
// Local variables
var RequestPrimitive v_updateRequest := m_updateContainerBase;
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
// Test control
if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
setverdict(inconc, testcasename() & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case");
stop;
}
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
// Test Body
//Force usage of Non-Hierarchical addressing method
vc_addressingMethod := e_hierarchical;
vc_primitiveScope := p_primitiveScope;
v_updateRequest.primitiveContent.container.labels := {"MyLabel"};
v_updateRequest := f_getUpdateRequestPrimitive(int3, v_resourceIndex, v_updateRequest);
mcaPort.send(m_request(v_updateRequest));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": Container resource updated using hierarchical addressing method");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
setverdict(fail, testcasename() & ": Wrong response status code in the response");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while updating container resource using hierarchical addressing method");
}
[] tc_ac.timeout {
setverdict(fail, testcasename() & ": No answer while updating resource");
}
}
// Postamble
vc_addressingMethod := PX_ADDRESSING_METHOD;
vc_primitiveScope := PX_PRIMITIVE_SCOPE;
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}//end f_CSE_GEN_UPD_BV_002
} // end of group g_CSE_GEN_UPD_BV_002
} // end of group Update
group Delete {
group g_CSE_GEN_DEL_BV_001 {
testcase TC_CSE_GEN_DEL_BV_001_CSR() runs on CseTester system CseSystem {
// Local variables
f_CSE_GEN_DEL_BV_001(e_cseRelative);
}
testcase TC_CSE_GEN_DEL_BV_001_SPR() runs on CseTester system CseSystem {
// Local variables
f_CSE_GEN_DEL_BV_001(e_spRelative);
}
testcase TC_CSE_GEN_DEL_BV_001_ABS() runs on CseTester system CseSystem {
// Local variables
f_CSE_GEN_DEL_BV_001(e_absolute);
}
function f_CSE_GEN_DEL_BV_001(in PrimitiveScope p_primitiveScope) runs on CseTester {
// Local variables
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
// Test control
if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
setverdict(inconc, testcasename() & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case");
stop;
}
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
// Test Body
//Force usage of Non-Hierarchical addressing method
vc_addressingMethod := e_nonHierarchical;
vc_primitiveScope := p_primitiveScope;
v_request := valueof(m_deleteRequest(f_getResourceAddress(v_resourceIndex)));
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": Container resource deleted using non-hierarchical addressing method");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
setverdict(fail, testcasename() & ": Wrong response status code in the response");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while deleting container resource using non-hierarchical addressing method");
}
[] tc_ac.timeout {
setverdict(fail, testcasename() & ": No answer while deleting resource");
}
}
// Postamble
vc_addressingMethod := PX_ADDRESSING_METHOD;
vc_primitiveScope := PX_PRIMITIVE_SCOPE;
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}//end f_CSE_GEN_DEL_BV_001
} // end of group g_CSE_GEN_DEL_BV_001
group g_CSE_GEN_DEL_BV_002 {
testcase TC_CSE_GEN_DEL_BV_002_CSR() runs on CseTester system CseSystem {
// Local variables
f_CSE_GEN_DEL_BV_002(e_cseRelative);
}
testcase TC_CSE_GEN_DEL_BV_002_SPR() runs on CseTester system CseSystem {
// Local variables
f_CSE_GEN_DEL_BV_002(e_spRelative);
}
testcase TC_CSE_GEN_DEL_BV_002_ABS() runs on CseTester system CseSystem {
// Local variables
f_CSE_GEN_DEL_BV_002(e_absolute);
}
function f_CSE_GEN_DEL_BV_002(in PrimitiveScope p_primitiveScope) runs on CseTester {
// Local variables
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
// Test control
if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
setverdict(inconc, testcasename() & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case");
stop;
}
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
// Test Body
//Force usage of Non-Hierarchical addressing method
vc_addressingMethod := e_hierarchical;
vc_primitiveScope := p_primitiveScope;
v_request := valueof(m_deleteRequest(f_getResourceAddress(v_resourceIndex)));
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": Container resource deleted using hierarchical addressing method");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
setverdict(fail, testcasename() & ": Wrong response status code in the response");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while deleting container resource using hierarchical addressing method");
}
[] tc_ac.timeout {
setverdict(fail, testcasename() & ": No answer while deleting resource");
}
}
// Postamble
vc_addressingMethod := PX_ADDRESSING_METHOD;
vc_primitiveScope := PX_PRIMITIVE_SCOPE;
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}//end f_CSE_GEN_DEL_BV_002
} // end of group g_CSE_GEN_DEL_BV_002
} // end of group Delete
} // end of group Generic
group Registration {
testcase TC_CSE_REG_BV_001() runs on CseTester system CseSystem {
......@@ -1265,7 +1938,7 @@ module OneM2M_Testcases {
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex);
if(p_resourceType != int15) {
v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex);
v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex);
}
// Test Body
......@@ -1386,10 +2059,11 @@ module OneM2M_Testcases {
}
}
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex);
if(p_resourceType != int15) {
v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex);
v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex);
}
// Test Body
......
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