Skip to content
Snippets Groups Projects
Commit e28e46c6 authored by Pramod Kulkarni's avatar Pramod Kulkarni
Browse files

* TC_CSE_GMG_UPD_010 - Some corrections (not finalised yet)

parent d610bdb6
No related branches found
No related tags found
1 merge request!25Ae fixes
......@@ -15217,14 +15217,9 @@ module OneM2M_Testcases {
testcase TC_CSE_GMG_UPD_010() runs on CseTester system CseSystem
{
//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 ResourceType c_ResourceTypeGroup := int9;
const integer c_maxNrOfMembers := 2;
// Local variables
var MsgIn v_response;
......@@ -15232,11 +15227,17 @@ module OneM2M_Testcases {
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
......@@ -15249,24 +15250,19 @@ module OneM2M_Testcases {
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
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);
......@@ -15279,8 +15275,7 @@ 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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment