Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -80,6 +80,7 @@ module OneM2M_TestSystem { ...@@ -80,6 +80,7 @@ module OneM2M_TestSystem {
type component AeSystem { type component AeSystem {
port OneM2MPort mcaPort; port OneM2MPort mcaPort;
port OneM2MPort mcaPortIn;
port AdapterControlPort acPort; port AdapterControlPort acPort;
port UpperTesterPort utPort; port UpperTesterPort utPort;
} }
......
...@@ -83,13 +83,13 @@ module OneM2M_Testcases_AE { ...@@ -83,13 +83,13 @@ module OneM2M_Testcases_AE {
f_cf03Up(); f_cf03Up();
//Send Trigger Message //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"; v_utRequest.from_ := "UNINITIALIZED";
f_sendUtPrimitive(v_utRequest, v_action); f_sendUtPrimitive(v_utRequest, v_action);
tc_ac.start; tc_ac.start;
alt { alt {
[] mcaPortIn.receive(mw_request(mw_createContainer(omit,v_utRequest.to_))) { [] mcaPortIn.receive(mw_request(mw_createContainer(-,v_utRequest.to_))) {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__, " : Container creation request received successfuly"); setverdict(pass, __SCOPE__, " : Container creation request received successfuly");
......
...@@ -5664,11 +5664,11 @@ module OneM2M_Testcases_CSE { ...@@ -5664,11 +5664,11 @@ module OneM2M_Testcases_CSE {
// Local variables // Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createContainerBase; 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; v_ae1.done;
} }
...@@ -5702,11 +5702,11 @@ module OneM2M_Testcases_CSE { ...@@ -5702,11 +5702,11 @@ module OneM2M_Testcases_CSE {
// Local variables // Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createContentInstanceBase; 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; v_ae1.done;
} }
...@@ -5959,11 +5959,11 @@ module OneM2M_Testcases_CSE { ...@@ -5959,11 +5959,11 @@ module OneM2M_Testcases_CSE {
// Local variables // Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase; 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; v_ae1.done;
} }
...@@ -5981,7 +5981,7 @@ module OneM2M_Testcases_CSE { ...@@ -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 // Local variables
var MsgIn v_response; var MsgIn v_response;
...@@ -5994,7 +5994,7 @@ module OneM2M_Testcases_CSE { ...@@ -5994,7 +5994,7 @@ module OneM2M_Testcases_CSE {
var integer v_resourceIndex := -1; var integer v_resourceIndex := -1;
// Test control // Test control
if(p_optionalAttribute[0] == c_accessControlPolicyIDs) { if(p_optionalAttribute.name == c_accessControlPolicyIDs) {
if(not(PICS_ACP_SUPPORT)) { if(not(PICS_ACP_SUPPORT)) {
setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case");
stop; stop;
...@@ -6007,7 +6007,7 @@ module OneM2M_Testcases_CSE { ...@@ -6007,7 +6007,7 @@ module OneM2M_Testcases_CSE {
// Test adapter configuration // Test adapter configuration
// Preamble // Preamble
if (p_optionalAttribute[0] == c_accessControlPolicyIDs) { if (p_optionalAttribute.name == c_accessControlPolicyIDs) {
v_acpAuxIndex := f_cse_preamble_createAcpAux();//c_CRUDNDi) v_acpAuxIndex := f_cse_preamble_createAcpAux();//c_CRUDNDi)
} }
...@@ -6022,17 +6022,18 @@ module OneM2M_Testcases_CSE { ...@@ -6022,17 +6022,18 @@ module OneM2M_Testcases_CSE {
} }
// Test Body // 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); 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; tc_ac.start;
alt { alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response {
tc_ac.stop; 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); f_checkAttributesToBeSaved(p_resourceType, v_request, v_response.primitive.responsePrimitive);
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_parentIndex); 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