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

TC_CSE_GMG_UPD_010 - Some corrections (not finalised yet)

parent 12f6e199
......@@ -15214,26 +15214,26 @@ module OneM2M_Testcases {
{
//Local constants
const ResourceType c_ResourceTypeGroup := int9;
const ResourceType c_ResourceType1 := int4;
const MemberType c_memberType1 := int4; // should be set same type as c_ResourceType1
const XSD.String c_primitiveContent := "primitive_contet";
const ConsistencyStrategy c_consistentcyStrategy := int1; // ABANDOND_MEMBER
// const XSD.AnyURI c_targetResourceAddress := "TARGET_RESOURCE_ADDRESS";
const XSD.AnyURI c_memberResourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1";
const XSD.AnyURI c_memberResourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2";
const integer c_maxNrOfMembers := 2;
// Local variables
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_remoteCSEIndex := -1;
var integer v_groupIndex := -1;
var integer v_contentInstanceIndex := -1;
var integer v_containerIndex_1 := -1;
var integer v_containerIndex_2 := -1;
var integer v_subscriptionIndex := -1;
var template RequestPrimitive v_createRequest := m_createGroupBase;
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var template RequestPrimitive v_createMember;
var XSD.AnyURI v_memberId_1;
var XSD.AnyURI v_memberId_2;
var CseTester v_notifyHandler;
// Test control
// Test component configuration
......@@ -15243,27 +15243,21 @@ module OneM2M_Testcases {
// Preamble
v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
// TODO: -> register IUT to the remoteCSE
//v_remoteCSEIndex := ...
v_createRequest := f_getCreateRequestPrimitive(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
v_createRequest.primitiveContent.group_ := m_contentCreateGroup(2, {c_memberResourceAddress1, c_memberResourceAddress2}, omit);
v_createRequest.primitiveContent.group_.memberType := c_memberType1;
v_createRequest.primitiveContent.group_.memberTypeValidated := false;
v_createRequest.primitiveContent.group_.consistencyStrategy := c_consistentcyStrategy;
v_groupIndex := f_cse_createResource(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
// TODO: -> the AE having a subscription to c_targetResourceAddress
// TODO: -> do the resources actually need to be created?
// TODO: choose the right template for member resource
v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_1");
v_contentInstanceIndex := f_cse_createResource(c_ResourceType1, v_createMember, v_aeIndex);
// TODO: create resource of type <group> at c_memberResourceAddress2 on remoteCSE
// TODO: set onlineStatus to false on remoteCSE
//TODO: -> register IUT to the 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
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, v_memberId_2}, omit, int3));
v_groupIndex := f_cse_createResource(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
v_subscriptionIndex := f_cse_createResource(int23,m_createSubscriptionBase, v_groupIndex);
v_notifyHandler.start(f_cse_notifyProcedure_subscriptionVerificationHandler(v_aeIndex));
//Test Body
v_request := f_getUpdateRequestPrimitive(c_ResourceTypeGroup, v_groupIndex, v_updateRequest);
//v_request.from_ := CSE-ID
......@@ -15275,9 +15269,8 @@ module OneM2M_Testcases {
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response {
tc_ac.stop;
}
setverdict(pass, __SCOPE__ & ": update successful");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while retrieving resource");
......
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