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

TTCN corrections to TC_CSE_REG_CRE_004

parent 1513114e
No related branches found
No related tags found
No related merge requests found
...@@ -68,6 +68,29 @@ module OneM2M_Functions { ...@@ -68,6 +68,29 @@ module OneM2M_Functions {
} // end f_cf02Up } // end f_cf02Up
/**
* @desc Ports mapping and default behaviour activation for Config 01
*/
function f_cf01UpCseSimuMaster() runs on CseSimu {
// Variables
vc_config := e_cf01;
vc_aeSimu := AeSimu.create("AE1") alive;
// Map
map(self:mccPort, system:mcaPort);
map(vc_aeSimu:mcaPort, system:mcaPort);
map(self:acPort, system:acPort);
activate(a_default());
activate(a_cse_cseSimu());
// Connect
f_connectInfoPort(vc_aeSimu);
//Initialze the IUT
} // end f_cf01UpCseSimuMaster
/** /**
* @desc Ports mapping and default behaviour activation for Config 02 * @desc Ports mapping and default behaviour activation for Config 02
*/ */
...@@ -160,7 +183,19 @@ module OneM2M_Functions { ...@@ -160,7 +183,19 @@ module OneM2M_Functions {
unmap(self:mcaPort, system:mcaPort); unmap(self:mcaPort, system:mcaPort);
unmap(self:acPort, system:acPort); unmap(self:acPort, system:acPort);
} }
/**
* @desc Ports unmapping
* @verdict
*/
function f_cf01DownCseSimuMaster() runs on CseSimu {
unmap(self:mccPort, system:mccPort);
unmap(vc_aeSimu:mcaPort, system:mcaPort);
unmap(self:acPort, system:acPort);
unmap(vc_aeSimu:acPort, system:acPort);
}
/** /**
* @desc Ports unmapping * @desc Ports unmapping
* @verdict * @verdict
......
...@@ -955,7 +955,7 @@ module OneM2M_Testcases { ...@@ -955,7 +955,7 @@ module OneM2M_Testcases {
* @desc Check that the IUT rejects an AE registration (allowed App-ID, not allowed C-AE-ID-STEM provided by AE) * @desc Check that the IUT rejects an AE registration (allowed App-ID, not allowed C-AE-ID-STEM provided by AE)
* *
*/ */
testcase TC_CSE_REG_CRE_004() runs on AeSimu system CseSystem { testcase TC_CSE_REG_CRE_004() runs on InCseSimu system CseSystem {
var MsgIn v_response; var MsgIn v_response;
var RequestPrimitive v_request; var RequestPrimitive v_request;
...@@ -963,24 +963,26 @@ module OneM2M_Testcases { ...@@ -963,24 +963,26 @@ module OneM2M_Testcases {
var ResourceType v_resourceType := int2; var ResourceType v_resourceType := int2;
// Test component configuration // Test component configuration
f_cf01Up(); f_cf01UpCseSimuMaster();
//Preambule //Preambule
v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule(-);//c_CRUDNDi); //v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule(-);//c_CRUDNDi);
vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSEBase);
//Test Body //Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM")); //v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));
v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex); //v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex);
vc_aeSimu.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM")));
mcaPort.send(m_request(v_request)); //mcaPort.send(m_request(v_request));
tc_ac.start; tc_ac.start;
alt { alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) { [] mccPort.receive(mw_response(mw_responsePrimitive(int4005))) {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__ & ": AE creation rejected."); setverdict(pass, __SCOPE__ & ": AE creation rejected.");
} }
[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int4005))) -> value v_response{ [] mccPort.receive(mw_response(mw_responsePrimitiveInverse(int4005))) -> value v_response{
tc_ac.stop; tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))); setverdict(fail, __SCOPE__ & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
} }
...@@ -990,10 +992,10 @@ module OneM2M_Testcases { ...@@ -990,10 +992,10 @@ module OneM2M_Testcases {
} }
// Postamble // Postamble
f_cse_postamble_deleteResources(); f_cse_postamble_deleteResourcesCSE();
// Tear down // Tear down
f_cf01Down(); f_cf01DownCseSimuMaster();
} }
......
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