Commit 0504eca0 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Improvement for DIS test cases where only one element is to be discovered


Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 66fef580
......@@ -9752,10 +9752,14 @@ module OneM2M_Testcases_CSE_Release_1 {
f_send(e_mca_port, m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responseDiscovery)){
[] mcaPort.receive(mw_response(mw_responseDiscovery({?}))){
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": URI List Representation available");
}
[] mcaPort.receive(mw_response(mw_responseDiscovery)){
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": URI List Representation available but not the expected number of elements");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
......@@ -9944,7 +9948,6 @@ module OneM2M_Testcases_CSE_Release_1 {
var RequestPrimitive v_request;
var integer v_childResourceIndex := -1;
const ResourceType c_containerResourceType := int3;
var integer v_i_cont := 0;
// Test control
......@@ -9964,17 +9967,18 @@ module OneM2M_Testcases_CSE_Release_1 {
f_send(e_mca_port, m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responseDiscovery)) -> value v_response {
[] mcaPort.receive(mw_response(mw_responseDiscovery({?}))) -> value v_response {
tc_ac.stop;
while (v_i_cont<lengthof(v_response.primitive.responsePrimitive.primitiveContent.uRIList)){
if (f_isNonHierarchical(v_response.primitive.responsePrimitive.primitiveContent.uRIList[v_i_cont])) {
setverdict(pass, __SCOPE__ & ": Non-hierarchical address form present in URIList[" & int2str(v_i_cont) & "] element");
} else {
setverdict(fail, __SCOPE__ & ": Non-hierarchical address form absent in URIList[" & int2str(v_i_cont) & "] element");
}
v_i_cont := v_i_cont + 1;
if (f_isNonHierarchical(v_response.primitive.responsePrimitive.primitiveContent.uRIList[0])) {
setverdict(pass, __SCOPE__ & ": Non-hierarchical address form present in URIList[0] element");
} else {
setverdict(fail, __SCOPE__ & ": Non-hierarchical address form absent in URIList[0] element");
}
}
[] mcaPort.receive(mw_response(mw_responseDiscovery)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": URI List Representation available but not the expected number of elements");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
......@@ -10014,6 +10018,7 @@ module OneM2M_Testcases_CSE_Release_1 {
var RequestPrimitive v_requestPrimitive := valueof(m_createContainerBase);
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
var integer v_childResourceIndex := -1;
var RequestPrimitive v_request;
const ResourceType c_containerResourceType := int3;
......@@ -10033,9 +10038,11 @@ module OneM2M_Testcases_CSE_Release_1 {
v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred;
v_resourceIndex := f_cse_createResource(c_containerResourceType, v_requestPrimitive, v_aeIndex);
v_requestPrimitive := f_setAcpId(v_requestPrimitive, {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)});
v_childResourceIndex := f_cse_createResource(c_containerResourceType, v_requestPrimitive, v_resourceIndex);
v_resourceIndex := f_cse_createResource(c_containerResourceType, v_requestPrimitive, v_aeIndex);
v_request := valueof(m_retrieveFilterUsageOption(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex), int1));
f_send(e_mca_port, m_request(v_request));
tc_ac.start;
......@@ -10375,7 +10382,6 @@ module OneM2M_Testcases_CSE_Release_1 {
var RequestPrimitive v_request;
var integer v_childResourceIndex := -1;
const ResourceType c_containerResourceType := int3;
var integer v_i_cont := 0;
// Test control
......@@ -10395,17 +10401,18 @@ module OneM2M_Testcases_CSE_Release_1 {
f_send(e_mca_port, m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responseDiscovery)) -> value v_response {
[] mcaPort.receive(mw_response(mw_responseDiscovery({?}))) -> value v_response {
tc_ac.stop;
while (v_i_cont<lengthof(v_response.primitive.responsePrimitive.primitiveContent.uRIList)){
if (f_isHierarchical(v_response.primitive.responsePrimitive.primitiveContent.uRIList[v_i_cont])) {
setverdict(pass, __SCOPE__ & ": Hierarchical address form present in URIList[" & int2str(v_i_cont) & "] element");
} else {
setverdict(fail, __SCOPE__ & ": Hierarchical address form absent in URIList[" & int2str(v_i_cont) & "] element");
}
v_i_cont := v_i_cont + 1;
if (f_isHierarchical(v_response.primitive.responsePrimitive.primitiveContent.uRIList[0])) {
setverdict(pass, __SCOPE__ & ": Hierarchical address form present in URIList[0] element");
} else {
setverdict(fail, __SCOPE__ & ": Hierarchical address form absent in URIList[0] element");
}
}
[] mcaPort.receive(mw_response(mw_responseDiscovery)){
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": URI List Representation available but not the expected number of elements");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
......@@ -10448,7 +10455,6 @@ module OneM2M_Testcases_CSE_Release_1 {
var RequestPrimitive v_request;
var integer v_childResourceIndex := -1;
const ResourceType c_containerResourceType := int3;
var integer v_i_cont := 0;
// Test control
......@@ -10468,17 +10474,18 @@ module OneM2M_Testcases_CSE_Release_1 {
f_send(e_mca_port, m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responseDiscovery)) -> value v_response {
[] mcaPort.receive(mw_response(mw_responseDiscovery({?}))) -> value v_response {
tc_ac.stop;
while (v_i_cont<lengthof(v_response.primitive.responsePrimitive.primitiveContent.uRIList)){
if (f_isHierarchical(v_response.primitive.responsePrimitive.primitiveContent.uRIList[v_i_cont])) {
setverdict(pass, __SCOPE__ & ": Hierarchical address form present in URIList[" & int2str(v_i_cont) & "] element");
} else {
setverdict(fail, __SCOPE__ & ": Hierarchical address form absent in URIList[" & int2str(v_i_cont) & "] element");
}
v_i_cont := v_i_cont + 1;
if (f_isHierarchical(v_response.primitive.responsePrimitive.primitiveContent.uRIList[0])) {
setverdict(pass, __SCOPE__ & ": Hierarchical address form present in URIList[0] element");
} else {
setverdict(fail, __SCOPE__ & ": Hierarchical address form absent in URIList[0] element");
}
}
[] mcaPort.receive(mw_response(mw_responseDiscovery)){
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": URI List Representation available but not the expected number of elements");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
......
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