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

Incorporated code review comments for REG/RET/004 and REG/RET/007


Signed-off-by: default avatarpkulkarni <pkulkarni75@gmail.com>
parent 40db3605
No related branches found
No related tags found
1 merge request!24STF531 REG TCs
...@@ -2015,65 +2015,81 @@ module OneM2M_Testcases_CSE { ...@@ -2015,65 +2015,81 @@ module OneM2M_Testcases_CSE {
testcase TC_CSE_REG_RET_004_LBL() runs on Tester system CseSystem { testcase TC_CSE_REG_RET_004_LBL() runs on Tester system CseSystem {
// Local variables // Local variables
var Labels v_labels_1 := {"VALUE_1"};
var template RequestPrimitive v_createRequest := m_createAe(PX_APP_ID);
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template PrimitiveContent v_contentResponse; var template PrimitiveContent v_contentResponse;
v_createRequest.primitiveContent.aE.labels := v_labels_1;
v_contentResponse.aE := mw_contentAeBase; v_contentResponse.aE := mw_contentAeBase;
v_contentResponse.aE.labels := ?; v_contentResponse.aE.labels := ?;
v_ae1.start(f_CSE_REG_RET_004(v_contentResponse)); v_ae1.start(f_CSE_REG_RET_004(v_createRequest, v_contentResponse));
v_ae1.done; v_ae1.done;
} }
testcase TC_CSE_REG_RET_004_APN() runs on Tester system CseSystem { testcase TC_CSE_REG_RET_004_APN() runs on Tester system CseSystem {
//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_createAe(PX_APP_ID);
var template PrimitiveContent v_contentResponse; var template PrimitiveContent v_contentResponse;
v_createRequest.primitiveContent.aE.appName := "AeAppName";
v_contentResponse.aE := mw_contentAeBase; v_contentResponse.aE := mw_contentAeBase;
v_contentResponse.aE.appName := ?; v_contentResponse.aE.appName := ?;
v_ae1.start(f_CSE_REG_RET_004(v_contentResponse)); v_ae1.start(f_CSE_REG_RET_004(v_createRequest,v_contentResponse));
v_ae1.done; v_ae1.done;
} }
testcase TC_CSE_REG_RET_004_POA() runs on Tester system CseSystem { testcase TC_CSE_REG_RET_004_POA() runs on Tester system CseSystem {
//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_createAe(PX_APP_ID);
var template PrimitiveContent v_contentResponse; var template PrimitiveContent v_contentResponse;
v_createRequest.primitiveContent.aE.pointOfAccess := {PX_AE1_ADDRESS};
v_contentResponse.aE := mw_contentAeBase; v_contentResponse.aE := mw_contentAeBase;
v_contentResponse.aE.pointOfAccess := ?; v_contentResponse.aE.pointOfAccess := ?;
v_ae1.start(f_CSE_REG_RET_004(v_contentResponse)); v_ae1.start(f_CSE_REG_RET_004(v_createRequest, v_contentResponse));
v_ae1.done; v_ae1.done;
} }
testcase TC_CSE_REG_RET_004_NL() runs on Tester system CseSystem { testcase TC_CSE_REG_RET_004_NL() runs on Tester system CseSystem {
//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_createAe(PX_APP_ID);
var template PrimitiveContent v_contentResponse; var template PrimitiveContent v_contentResponse;
v_createRequest.primitiveContent.aE.nodeLink := "http://127.0.0.1/";
v_contentResponse.aE := mw_contentAeBase; v_contentResponse.aE := mw_contentAeBase;
v_contentResponse.aE.nodeLink := ?; v_contentResponse.aE.nodeLink := ?;
v_ae1.start(f_CSE_REG_RET_004(v_contentResponse)); v_ae1.start(f_CSE_REG_RET_004(v_createRequest,v_contentResponse));
v_ae1.done; v_ae1.done;
} }
testcase TC_CSE_REG_RET_004_CSZ() runs on Tester system CseSystem { testcase TC_CSE_REG_RET_004_CSZ() runs on Tester system CseSystem {
//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_createAe(PX_APP_ID);
var template PrimitiveContent v_contentResponse; var template PrimitiveContent v_contentResponse;
v_createRequest.primitiveContent.aE.contentSerialization := {applicationxml};
v_contentResponse.aE := mw_contentAeBase; v_contentResponse.aE := mw_contentAeBase;
v_contentResponse.aE.contentSerialization := ?; v_contentResponse.aE.contentSerialization := ?;
v_ae1.start(f_CSE_REG_RET_004(v_contentResponse)); v_ae1.start(f_CSE_REG_RET_004(v_createRequest,v_contentResponse));
v_ae1.done; v_ae1.done;
} }
function f_CSE_REG_RET_004(template PrimitiveContent p_contentResponse) runs on AeSimu { function f_CSE_REG_RET_004(template RequestPrimitive p_createRequestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu {
//Local variables //Local variables
var MsgIn v_response; var MsgIn v_response;
var integer v_aeIndex := -1; var integer v_aeIndex := -1;
...@@ -2086,7 +2102,7 @@ module OneM2M_Testcases_CSE { ...@@ -2086,7 +2102,7 @@ module OneM2M_Testcases_CSE {
// Test adapter configuration // Test adapter configuration
// Preamble // Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); v_aeIndex := f_cse_createResource(int2, p_createRequestPrimitive, -1);
mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(v_aeIndex))));//TODO Maybe PX_SUPER_AE_ID mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(v_aeIndex))));//TODO Maybe PX_SUPER_AE_ID
tc_ac.start; tc_ac.start;
...@@ -2279,52 +2295,65 @@ module OneM2M_Testcases_CSE { ...@@ -2279,52 +2295,65 @@ module OneM2M_Testcases_CSE {
testcase TC_CSE_REG_RET_007_LBL() runs on Tester system CseSystem { testcase TC_CSE_REG_RET_007_LBL() runs on Tester system CseSystem {
// Local variables // Local variables
var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var Labels v_labels_1 := {"VALUE_1"};
var template RequestPrimitive v_createRequest := m_createRemoteCSEBase;
var template PrimitiveContent v_contentResponse; var template PrimitiveContent v_contentResponse;
v_createRequest.primitiveContent.remoteCSE.labels := v_labels_1;
v_contentResponse.remoteCSE := mw_contentRemoteCSEBase; v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
v_contentResponse.remoteCSE.labels := ?; v_contentResponse.remoteCSE.labels := ?;
v_cse1.start(f_CSE_REG_RET_007(v_contentResponse)); v_cse1.start(f_CSE_REG_RET_007(v_createRequest, v_contentResponse));
v_cse1.done; v_cse1.done;
} }
testcase TC_CSE_REG_RET_007_CST() runs on Tester system CseSystem { testcase TC_CSE_REG_RET_007_CST() runs on Tester system CseSystem {
// Local variables // Local variables
var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template RequestPrimitive v_createRequest := m_createRemoteCSEBase;
var template PrimitiveContent v_contentResponse; var template PrimitiveContent v_contentResponse;
v_createRequest.primitiveContent.remoteCSE.cseType := int1;
v_contentResponse.remoteCSE := mw_contentRemoteCSEBase; v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
v_contentResponse.remoteCSE.cseType := ?; v_contentResponse.remoteCSE.cseType := ?;
v_cse1.start(f_CSE_REG_RET_007(v_contentResponse)); v_cse1.start(f_CSE_REG_RET_007(v_createRequest, v_contentResponse));
v_cse1.done; v_cse1.done;
} }
testcase TC_CSE_REG_RET_007_POA() runs on Tester system CseSystem { testcase TC_CSE_REG_RET_007_POA() runs on Tester system CseSystem {
// Local variables // Local variables
var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template RequestPrimitive v_createRequest := m_createRemoteCSEBase;
var template PrimitiveContent v_contentResponse; var template PrimitiveContent v_contentResponse;
v_createRequest.primitiveContent.remoteCSE.pointOfAccess := {"http://" & PX_CSE1_ADDRESS & "/"};
v_contentResponse.remoteCSE := mw_contentRemoteCSEBase; v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
v_contentResponse.remoteCSE.pointOfAccess := ?; v_contentResponse.remoteCSE.pointOfAccess := ?;
v_cse1.start(f_CSE_REG_RET_007(v_contentResponse)); v_cse1.start(f_CSE_REG_RET_007(v_createRequest, v_contentResponse));
v_cse1.done; v_cse1.done;
} }
testcase TC_CSE_REG_RET_007_NL() runs on Tester system CseSystem { testcase TC_CSE_REG_RET_007_NL() runs on Tester system CseSystem {
// Local variables // Local variables
var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template RequestPrimitive v_createRequest := m_createRemoteCSEBase;
var template PrimitiveContent v_contentResponse; var template PrimitiveContent v_contentResponse;
v_createRequest.primitiveContent.remoteCSE.nodeLink := c_defaultNodeID;
v_contentResponse.remoteCSE := mw_contentRemoteCSEBase; v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
v_contentResponse.remoteCSE.nodeLink := ?; v_contentResponse.remoteCSE.nodeLink := ?;
v_cse1.start(f_CSE_REG_RET_007(v_contentResponse)); v_cse1.start(f_CSE_REG_RET_007(v_createRequest, v_contentResponse));
v_cse1.done; v_cse1.done;
} }
function f_CSE_REG_RET_007(template PrimitiveContent p_contentResponse) runs on CseSimu { function f_CSE_REG_RET_007(template RequestPrimitive p_createRequestPrimitive, template PrimitiveContent p_contentResponse) runs on CseSimu {
var MsgIn v_response; var MsgIn v_response;
var RequestPrimitive v_request; var RequestPrimitive v_request;
var ResourceType v_resourceType := int16; //remoteCSE var ResourceType v_resourceType := int16; //remoteCSE
...@@ -2339,7 +2368,7 @@ module OneM2M_Testcases_CSE { ...@@ -2339,7 +2368,7 @@ module OneM2M_Testcases_CSE {
// Preamble // Preamble
if(PICS_IN_CSE){ if(PICS_IN_CSE){
vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase); vc_remoteCseIndex := f_cse_registerRemoteCse(p_createRequestPrimitive);
mccPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(vc_remoteCseIndex)))); mccPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(vc_remoteCseIndex))));
tc_ac.start; tc_ac.start;
alt { alt {
...@@ -2364,7 +2393,7 @@ module OneM2M_Testcases_CSE { ...@@ -2364,7 +2393,7 @@ module OneM2M_Testcases_CSE {
} }
} }
} else if (PICS_MN_CSE){ } else if (PICS_MN_CSE){
vc_remoteCseIndex := f_cse_registrationRemoteCse(m_createRemoteCSEBase); vc_remoteCseIndex := f_cse_registrationRemoteCse(p_createRequestPrimitive);
mccPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(vc_remoteCseIndex)))); mccPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(vc_remoteCseIndex))));
tc_ac.start; tc_ac.start;
alt { alt {
......
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