diff --git a/OneM2M_Testcases.ttcn b/OneM2M_Testcases.ttcn index a450bfc68ef9be79f094e1c314e9015d9d6cc889..8139360396e1355f4ecb65bd70e7b47abd020462 100644 --- a/OneM2M_Testcases.ttcn +++ b/OneM2M_Testcases.ttcn @@ -7,7 +7,7 @@ * * @author oneM2M * @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Testcases.ttcn $ - * $Id: OneM2M_Testcases.ttcn 275 2017-05-17 09:47:12Z reinaortega $ + * $Id: OneM2M_Testcases.ttcn 276 2017-05-18 01:31:08Z reinaortega $ * @desc Module containing test cases for oneM2M * */ @@ -8946,13 +8946,74 @@ module OneM2M_Testcases { } } // end group g_CSE_GMG_BV_006 + // Test objective: + // Check that the IUT handles unsuccessful validation of the resource type during the creation of the + // group resource when memberType attribute is not ‘mixed’ and the consistencyStrategy attribute is + // ABANDON_GROUP. + group g_CSE_GMG_BV_007 { + + testcase TC_CSE_GMG_BV_007() runs on CseTester system CseSystem { + //Local variables + var MsgIn v_response; + var RequestPrimitive v_createRequest; + var integer v_aeIndex := -1; + var integer v_containerIndex := -1; + var integer v_groupIndex := -1; + var ListOfURIs v_memberIDs; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi + v_containerIndex := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer"), v_aeIndex); + v_groupIndex := f_cse_createResource(int9, m_createGroupBase, v_aeIndex); + v_memberIDs := {f_getResourceId(vc_resourcesList[v_groupIndex].resource), f_getResourceId(vc_resourcesList[v_containerIndex].resource)}; + v_createRequest := valueof(m_createGroup(2, v_memberIDs, omit, int3, int2)); //Member type is set to container and consistencyStrategy is set to ABANDON GROUP + v_createRequest := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex); + + // Test Body + mcaPort.send(m_request(v_createRequest)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int6011))) -> value v_response { + tc_ac.stop; + setverdict(pass, testcasename() & ": unsuccessful validation of the resource type during the creation of the group"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, testcasename() & ": Error create succesfull while the operation should be aborted"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, testcasename() & ": Error while creating resource"); + } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": No answer while creating resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + } + + } // end group g_CSE_GMG_BV_007 + // Test objective: // Check that the IUT handles unsuccessful validation of the resource type during the creation of the // group resource when memberType attribute is not ‘mixed’ and the consistencyStrategy attribute is // ABANDON_MEMBER,. - group g_CSE_GMG_BV_007 { + group g_CSE_GMG_BV_008 { - testcase TC_CSE_GMG_BV_007() runs on CseTester system CseSystem { + testcase TC_CSE_GMG_BV_008() runs on CseTester system CseSystem { //Local variables var MsgIn v_response; var RequestPrimitive v_createRequest; @@ -9019,67 +9080,6 @@ module OneM2M_Testcases { } - } // end group g_CSE_GMG_BV_007 - - // Test objective: - // Check that the IUT handles unsuccessful validation of the resource type during the creation of the - // group resource when memberType attribute is not ‘mixed’ and the consistencyStrategy attribute is - // ABANDON_GROUP. - group g_CSE_GMG_BV_008 { - - testcase TC_CSE_GMG_BV_008() runs on CseTester system CseSystem { - //Local variables - var MsgIn v_response; - var RequestPrimitive v_createRequest; - var integer v_aeIndex := -1; - var integer v_containerIndex := -1; - var integer v_groupIndex := -1; - var ListOfURIs v_memberIDs; - - // Test control - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi - v_containerIndex := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer"), v_aeIndex); - v_groupIndex := f_cse_createResource(int9, m_createGroupBase, v_aeIndex); - v_memberIDs := {f_getResourceId(vc_resourcesList[v_groupIndex].resource), f_getResourceId(vc_resourcesList[v_containerIndex].resource)}; - v_createRequest := valueof(m_createGroup(2, v_memberIDs, omit, int3, int2)); //Member type is set to container and consistencyStrategy is set to ABANDON GROUP - v_createRequest := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex); - - // Test Body - mcaPort.send(m_request(v_createRequest)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int6011))) -> value v_response { - tc_ac.stop; - setverdict(pass, testcasename() & ": unsuccessful validation of the resource type during the creation of the group"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, testcasename() & ": Error create succesfull while the operation should be aborted"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, testcasename() & ": Error while creating resource"); - } - [] tc_ac.timeout { - setverdict(inconc, testcasename() & ": No answer while creating resource"); - } - } - - // Postamble - f_cse_postamble_deleteResources(); - - // Tear down - f_cf01Down(); - - } - } // end group g_CSE_GMG_BV_008 // Test objective: