Commit a3bbc305 authored by Naum Spaseski's avatar Naum Spaseski
Browse files

Merge branch 'Release1' of git.onem2m.org:TST/ATS into Release1

parents 8ab94acb b69c8f21
......@@ -80,6 +80,7 @@ module OneM2M_TestSystem {
type component AeSystem {
port OneM2MPort mcaPort;
port OneM2MPort mcaPortIn;
port AdapterControlPort acPort;
port UpperTesterPort utPort;
}
......
......@@ -83,13 +83,13 @@ module OneM2M_Testcases_AE {
f_cf03Up();
//Send Trigger Message
v_utRequest.to_ := f_getResourceAddress(-1, e_nonHierarchical, p_primitiveScope);
v_utRequest.to_ := f_getLocalResourceAddress(-1, e_nonHierarchical, p_primitiveScope);
v_utRequest.from_ := "UNINITIALIZED";
f_sendUtPrimitive(v_utRequest, v_action);
tc_ac.start;
alt {
[] mcaPortIn.receive(mw_request(mw_createContainer(omit,v_utRequest.to_))) {
[] mcaPortIn.receive(mw_request(mw_createContainer(-,v_utRequest.to_))) {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : Container creation request received successfuly");
......
......@@ -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);
}
......
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