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

f_CSE_DMR_CRE_012 updated to use forcedFields for Creator attribute

parent 5b21bdbd
No related branches found
No related tags found
No related merge requests found
......@@ -5664,11 +5664,11 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createContainerBase;
const AttributeList c_optionalAttribute := {"creator"};
var AttributeAux v_optionalAttribute := {"creator", omit};
v_createRequest.primitiveContent.container.creator := "";
v_createRequest.primitiveContent.container.creator := "NullValue";
v_ae1.start(f_CSE_DMR_CRE_012(int3, v_createRequest, c_optionalAttribute));
v_ae1.start(f_CSE_DMR_CRE_012(int3, v_createRequest, v_optionalAttribute));
v_ae1.done;
}
......@@ -5702,11 +5702,11 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createContentInstanceBase;
const AttributeList c_optionalAttribute := {"creator"};
var AttributeAux v_optionalAttribute := {"creator", omit};
v_createRequest.primitiveContent.contentInstance.creator := "NotInitialized";
v_createRequest.primitiveContent.contentInstance.creator := "NullValue";
v_ae1.start(f_CSE_DMR_CRE_012(int4, v_createRequest, c_optionalAttribute));
v_ae1.start(f_CSE_DMR_CRE_012(int4, v_createRequest, v_optionalAttribute));
v_ae1.done;
}
......@@ -5959,11 +5959,11 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
const AttributeList c_optionalAttribute := {"creator"};
var AttributeAux v_optionalAttribute := {"creator", omit};
v_createRequest.primitiveContent.subscription.creator := "MyCreator";
v_createRequest.primitiveContent.subscription.creator := "NullValue";
v_ae1.start(f_CSE_DMR_CRE_012(int23, v_createRequest, c_optionalAttribute));
v_ae1.start(f_CSE_DMR_CRE_012(int23, v_createRequest, v_optionalAttribute));
v_ae1.done;
}
......@@ -5981,7 +5981,7 @@ module OneM2M_Testcases_CSE {
}
function f_CSE_DMR_CRE_012(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, in AttributeList p_optionalAttribute) runs on AeSimu {
function f_CSE_DMR_CRE_012(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, in AttributeAux p_optionalAttribute) runs on AeSimu {
// Local variables
var MsgIn v_response;
......@@ -5994,7 +5994,7 @@ module OneM2M_Testcases_CSE {
var integer v_resourceIndex := -1;
// Test control
if(p_optionalAttribute[0] == c_accessControlPolicyIDs) {
if(p_optionalAttribute.name == c_accessControlPolicyIDs) {
if(not(PICS_ACP_SUPPORT)) {
setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case");
stop;
......@@ -6007,7 +6007,7 @@ module OneM2M_Testcases_CSE {
// Test adapter configuration
// Preamble
if (p_optionalAttribute[0] == c_accessControlPolicyIDs) {
if (p_optionalAttribute.name == c_accessControlPolicyIDs) {
v_acpAuxIndex := f_cse_preamble_createAcpAux();//c_CRUDNDi)
}
......@@ -6022,17 +6022,18 @@ module OneM2M_Testcases_CSE {
}
// Test Body
// if(p_optionalAttribute[0] == "creator") {
// p_requestPrimitive.primitiveContent.container.creator := vc_resourcesList[v_parentIndex].resource.aE.aE_ID;
// }
v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex);
mcaPort.send(m_request(v_request));
if(p_optionalAttribute.name == "creator") {
mcaPort.send(m_request(v_request, {p_optionalAttribute}));
} else {
mcaPort.send(m_request(v_request));
}
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Accepted creation for resource type " & int2str(enum2int(p_resourceType)) & " containing attribute " & p_optionalAttribute[0]);
setverdict(pass, __SCOPE__ & ": Accepted creation for resource type " & int2str(enum2int(p_resourceType)) & " containing attribute " & p_optionalAttribute.name);
f_checkAttributesToBeSaved(p_resourceType, v_request, v_response.primitive.responsePrimitive);
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_parentIndex);
}
......
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