Skip to content
Snippets Groups Projects
Commit 36aa60a9 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Correct numbering for TC_CSE_GMG_BV_007 and TC_CSE_GMG_BV_008

parent e3c4e085
Branches
Tags
1 merge request!25Ae fixes
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* @author oneM2M * @author oneM2M
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Testcases.ttcn $ * @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 * @desc Module containing test cases for oneM2M
* *
*/ */
...@@ -8949,7 +8949,7 @@ module OneM2M_Testcases { ...@@ -8949,7 +8949,7 @@ module OneM2M_Testcases {
// Test objective: // Test objective:
// Check that the IUT handles unsuccessful validation of the resource type during the creation of the // 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 // group resource when memberType attribute is not ‘mixed’ and the consistencyStrategy attribute is
// ABANDON_MEMBER,. // ABANDON_GROUP.
group g_CSE_GMG_BV_007 { group g_CSE_GMG_BV_007 {
testcase TC_CSE_GMG_BV_007() runs on CseTester system CseSystem { testcase TC_CSE_GMG_BV_007() runs on CseTester system CseSystem {
...@@ -8973,36 +8973,22 @@ module OneM2M_Testcases { ...@@ -8973,36 +8973,22 @@ module OneM2M_Testcases {
v_containerIndex := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer"), v_aeIndex); v_containerIndex := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer"), v_aeIndex);
v_groupIndex := f_cse_createResource(int9, m_createGroupBase, 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_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, omit)); //Member type is set to container and consistencyStrategy is set to ABANDON MEMBER (default value) 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); v_createRequest := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
// Test Body // Test Body
mcaPort.send(m_request(v_createRequest)); mcaPort.send(m_request(v_createRequest));
tc_ac.start; tc_ac.start;
alt { alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitive(int6011))) -> value v_response {
tc_ac.stop; tc_ac.stop;
setverdict(pass, testcasename() & ": Resource created successfully"); setverdict(pass, testcasename() & ": unsuccessful validation of the resource type during the creation of the group");
// check for memberTypeValidated
if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)){
setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided");
} else {
if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated == false){
setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not correct");
}
}
// check for membersId
if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs)){
setverdict(fail, testcasename(), ": Error, memberIDs attribute not provided");
}
else {
if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs[0] != f_getResourceAddress(v_containerIndex)){
setverdict(fail, testcasename(), ": Error, memberIDs attribute not correct");
}
} }
[] 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)) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop; tc_ac.stop;
setverdict(fail, testcasename() & ": Error while creating resource"); setverdict(fail, testcasename() & ": Error while creating resource");
} }
...@@ -9024,7 +9010,7 @@ module OneM2M_Testcases { ...@@ -9024,7 +9010,7 @@ module OneM2M_Testcases {
// Test objective: // Test objective:
// Check that the IUT handles unsuccessful validation of the resource type during the creation of the // 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 // group resource when memberType attribute is not ‘mixed’ and the consistencyStrategy attribute is
// ABANDON_GROUP. // ABANDON_MEMBER,.
group g_CSE_GMG_BV_008 { group g_CSE_GMG_BV_008 {
testcase TC_CSE_GMG_BV_008() runs on CseTester system CseSystem { testcase TC_CSE_GMG_BV_008() runs on CseTester system CseSystem {
...@@ -9048,22 +9034,36 @@ module OneM2M_Testcases { ...@@ -9048,22 +9034,36 @@ module OneM2M_Testcases {
v_containerIndex := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer"), v_aeIndex); v_containerIndex := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer"), v_aeIndex);
v_groupIndex := f_cse_createResource(int9, m_createGroupBase, 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_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 := valueof(m_createGroup(2, v_memberIDs, omit, int3, omit)); //Member type is set to container and consistencyStrategy is set to ABANDON MEMBER (default value)
v_createRequest := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex); v_createRequest := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
// Test Body // Test Body
mcaPort.send(m_request(v_createRequest)); mcaPort.send(m_request(v_createRequest));
tc_ac.start; tc_ac.start;
alt { alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int6011))) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
tc_ac.stop; tc_ac.stop;
setverdict(pass, testcasename() & ": unsuccessful validation of the resource type during the creation of the group"); setverdict(pass, testcasename() & ": Resource created successfully");
// check for memberTypeValidated
if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)){
setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided");
} else {
if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated == false){
setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not correct");
} }
[] 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)) { // check for membersId
if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs)){
setverdict(fail, testcasename(), ": Error, memberIDs attribute not provided");
}
else {
if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs[0] != f_getResourceAddress(v_containerIndex)){
setverdict(fail, testcasename(), ": Error, memberIDs attribute not correct");
}
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop; tc_ac.stop;
setverdict(fail, testcasename() & ": Error while creating resource"); setverdict(fail, testcasename() & ": Error while creating resource");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment