Commit 83fe457a authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Review of TC_CSE_GMG_UPD_009


Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent c07a25e7
......@@ -11838,10 +11838,8 @@ module OneM2M_Testcases_CSE_Release_1 {
var integer v_aeIndex := -1;
var integer v_groupIndex := -1;
var integer v_containerIndex_1 := -1;
var integer v_containerIndex_2 := -1;
var XSD.ID v_remoteContainerAddress, v_remoteGroupAddress;
var XSD.AnyURI v_memberId_1;
var XSD.AnyURI v_memberId_2;
var template RequestPrimitive v_createRequest := m_createGroupBase;
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
......@@ -11850,26 +11848,36 @@ module OneM2M_Testcases_CSE_Release_1 {
// Test control
// Test component configuration
f_cf01Up();
f_cf02Up();
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
//TODO: -> register IUT to the remoteCSE
//TODO: Create one of the container in a remoteCSE
v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource
v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource
vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSEBase()));
f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
vc_cse1.start(f_generateAndSetLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), -, int3));
f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
v_remoteContainerAddress := f_getLatestLocalResourceAddress(vc_cse1, e_nonHierarchical, e_cseRelative);
vc_cse1.start(f_generateAndSetLocalResource(m_primitiveContentGroup(m_contentCreateGroup(1, {v_remoteContainerAddress}, omit, int3, -, -, -)), -, int9));
f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
v_remoteGroupAddress := f_getLatestLocalResourceAddress(vc_cse1, e_nonHierarchical, e_spRelative);
v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource
v_memberId_1 := f_getResourceId(vc_resourcesList[v_containerIndex_1].resource);
v_memberId_2 := f_getResourceId(vc_resourcesList[v_containerIndex_2].resource);
v_createRequest := valueof(m_createGroup(c_maxNrOfMembers, {v_memberId_1}, omit, int3));
v_groupIndex := f_cse_createResource(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
//Test Body
v_updateRequest.primitiveContent.group_.memberIDs := {v_memberId_1, v_memberId_2};
v_updateRequest.primitiveContent.group_.memberIDs := {v_memberId_1, v_remoteGroupAddress & "/" & "fopt"};
v_request := f_getUpdateRequestPrimitive(c_ResourceTypeGroup, v_groupIndex, v_updateRequest);
f_send(e_mca_port, m_request(v_request));
......@@ -11885,7 +11893,7 @@ module OneM2M_Testcases_CSE_Release_1 {
if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.group_.memberIDs) != 2) {
setverdict(fail, __SCOPE__ & ": Error, wrong number of memberIDs attribute");
} else {
if(v_response.primitive.responsePrimitive.primitiveContent.group_.memberIDs[0] == v_memberId_1 and v_response.primitive.responsePrimitive.primitiveContent.group_.memberIDs[1] == v_memberId_2) {
if(v_response.primitive.responsePrimitive.primitiveContent.group_.memberIDs[0] == v_memberId_1 and v_response.primitive.responsePrimitive.primitiveContent.group_.memberIDs[1] == v_remoteGroupAddress & "/" & "fopt") {
setverdict(pass, __SCOPE__ & ": update successful");
} else {
setverdict(fail, __SCOPE__ & ": Error, wrong memberIDs");
......@@ -11912,7 +11920,7 @@ module OneM2M_Testcases_CSE_Release_1 {
setverdict(fail, __SCOPE__ & ": Error, memberTypeValidated attribute not updated");
}
if((v_primitiveContentRetrievedResource.group_.memberIDs[0] != v_memberId_1) and (v_primitiveContentRetrievedResource.group_.memberIDs[1] != v_memberId_2)){
if((v_primitiveContentRetrievedResource.group_.memberIDs[0] != v_memberId_1) and (v_primitiveContentRetrievedResource.group_.memberIDs[1] != v_remoteGroupAddress & "/" & "fopt")){
setverdict(fail, __SCOPE__ & ": Error, memberIDs attribute not correct");
}
}
......
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