Commit 4089c4e8 authored by Naum Spaseski's avatar Naum Spaseski
Browse files

STF531: Added CSE_REG_CRE_013 and small bugfixes


Signed-off-by: default avatarNaum Spaseski <naum.spaseski@gmail.com>
parent 161632d5
......@@ -14,7 +14,7 @@
module OneM2M_TestControl {
import from OneM2M_Testcases all;
import from OneM2M_Testcases_CSE all;
control {
execute(TC_CSE_GEN_CRE_001_CSR());
......@@ -262,11 +262,11 @@ module OneM2M_TestControl {
execute(TC_CSE_GMG_CRE_005());
execute(TC_CSE_GMG_CRE_006());
execute(TC_CSE_GMG_CRE_007());
execute(TC_CSE_GMG_CRE_008_CRE());
/*execute(TC_CSE_GMG_CRE_008_CRE());
execute(TC_CSE_GMG_CRE_008_UPD());
execute(TC_CSE_GMG_CRE_008_RET());
execute(TC_CSE_GMG_CRE_008_DEL());
execute(TC_CSE_GMG_CRE_009());
execute(TC_CSE_GMG_CRE_009());*/
execute(TC_CSE_GMG_UPD_001());
execute(TC_CSE_GMG_UPD_002());
execute(TC_CSE_GMG_UPD_003());
......
......@@ -874,10 +874,9 @@ module OneM2M_Testcases_CSE {
f_cf01Up();
//Preamble
v_cseBaseIndex := f_cse_preamble_createServiceSubscribedProfile({"S*"}); //c_CRUDNDi);
//Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, omit));
v_request := valueof(m_createAe(PX_APP_ID, omit, "SAE-ID-STEM"));
v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1);
......@@ -949,6 +948,25 @@ module OneM2M_Testcases_CSE {
// Tear down
f_cf01Down();
}
/**
* @desc Check that the IUT accepts a create request of <AE> resource with attributes multiplicity equals to 1 and provided preprovisioned SP_relative_AE_ID.
*/
testcase TC_CSE_REG_CRE_003() runs on CseSimu system CseSystem{
var integer v_remoteCseIndex := -1;
//Test Configuration
f_cf02Up();
//Preamble
v_remoteCseIndex := f_cse_registrationRemoteCse();
vc_aeSimu := AeSimu.create("AE1") alive;
//vc_aeSimu.start(f_a);
}
/**
......@@ -1225,6 +1243,76 @@ module OneM2M_Testcases_CSE {
}; //end TC_CSE_REG_CRE_010
group g_CSE_REG_CRE_013 {
testcase TC_CSE_REG_CRE_013_AE_LBL() runs on AeSimu system CseSystem {
var template RequestPrimitive m_create := m_createAe(PX_APP_ID, omit, omit);
m_create.primitiveContent.aE.labels := {"labels"};
}
testcase TC_CSE_REG_CRE_013_AE_APN() runs on AeSimu system CseSystem {
var template RequestPrimitive m_create := m_createAe(PX_APP_ID, omit, omit);
m_create.primitiveContent.aE.appName := "AeAppName";
}
testcase TC_CSE_REG_CRE_013_AE_POA() runs on AeSimu system CseSystem {
var template RequestPrimitive m_create := m_createAe(PX_APP_ID, omit, omit);
m_create.primitiveContent.aE.pointOfAccess := {PX_AE1_ADDRESS};
}
testcase TC_CSE_REG_CRE_013_AE_NL() runs on AeSimu system CseSystem {
var template RequestPrimitive m_create := m_createAe(PX_APP_ID, omit, omit);
m_create.primitiveContent.aE.nodeLink := "http://127.0.0.1/";
}
testcase TC_CSE_REG_CRE_013_AE_OR() runs on AeSimu system CseSystem {
var template RequestPrimitive m_create := m_createAe(PX_APP_ID, omit, omit);
m_create.primitiveContent.aE.ontologyRef := "MyOntologyRef";
}
function TC_CSE_REG_CRE_013(in template RequestPrimitive p_createAe) runs on AeSimu {
//Local variables
var MsgIn v_response;
var RequestPrimitive v_request;
var ResourceType v_resourceType := int2; //AE
// Test control
// Test component configuration
f_cf01Up();
//Test Body
v_request := valueof(p_createAe);
v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": AE creation successfull.");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while creating AE");
}
}
//Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}
}
group g_CSE_REG_CRE_016 {
/**
......
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