diff --git a/OneM2M_PermutationFunctions.ttcn b/OneM2M_PermutationFunctions.ttcn index c65e76a97faa5a15c4a8e6ed3b1827a123908394..ffc746b2f8b423aa7a8dac6bc917035e04ba2d12 100644 --- a/OneM2M_PermutationFunctions.ttcn +++ b/OneM2M_PermutationFunctions.ttcn @@ -9230,7 +9230,7 @@ module OneM2M_PermutationFunctions { p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); } p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); - p_requestPrimitive.responseType.responseTypeValue := int1; //nonBlockingRequestSynch + p_requestPrimitive.responseType := {int1, omit}; //nonBlockingRequestSynch // Test Body @@ -9298,7 +9298,7 @@ module OneM2M_PermutationFunctions { p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); } p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); - p_requestPrimitive.responseType.responseTypeValue := int1; //nonBlockingRequestSynch + p_requestPrimitive.responseType := {int1,omit}; //nonBlockingRequestSynch // Test Body @@ -9398,7 +9398,7 @@ module OneM2M_PermutationFunctions { p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); } p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); - p_requestPrimitive.responseType.responseTypeValue := int1; //nonBlockingRequestSynch + p_requestPrimitive.responseType := {int1, omit}; //nonBlockingRequestSynch // Test Body @@ -9443,7 +9443,8 @@ module OneM2M_PermutationFunctions { v_primitiveContent := f_getTemplateFromPrimitiveContent(p_requestPrimitive.primitiveContent); }else if (p_operation == int4){ //delete v_statusCode := int2002; - v_primitiveContent := omit; + v_primitiveContent.container := mw_contentContainer_rc1; + //v_primitiveContent := omit; } mcaPort.send(f_getMsgOutPrimitive(m_request(m_retrieve(v_requestResourceURI, f_getOriginator(v_aeIndex))))); tc_ac.start; @@ -9453,11 +9454,24 @@ module OneM2M_PermutationFunctions { v_requestStatus := v_response.primitive.responsePrimitive.primitiveContent.request.requestStatus; if (v_requestStatus==int1){ //COMPLETED tc_ac.stop; - if (match(v_response, mw_response(mw_responsePrimitive(v_statusCode,v_primitiveContent)))){ - setverdict(pass, testcasename() & ": RequestStatus: COMPLETED and operationResult attribute correctly received"); + if (valueof(p_requestPrimitive.requestIdentifier) == valueof(v_response.primitive.responsePrimitive.primitiveContent.request.operationResult.requestIdentifier) ){ + setverdict(pass, testcasename() & ": RequestStatus: COMPLETED and requestIdentifier attribute correctly received"); }else{ - setverdict(fail, testcasename() & ": RequestStatus: COMPLETED and operationResult attribute not correctly received"); + setverdict(fail, testcasename() & ": RequestStatus: COMPLETED and requestIdentifier attribute not correctly received"); } + + if (valueof(v_statusCode) == valueof(v_response.primitive.responsePrimitive.primitiveContent.request.operationResult.responseStatusCode) ){ + setverdict(pass, testcasename() & ": RequestStatus: COMPLETED and responseStatusCode attribute correctly received"); + }else{ + setverdict(fail, testcasename() & ": RequestStatus: COMPLETED and responseStatusCode attribute not correctly received"); + } + + if (match(v_response.primitive.responsePrimitive.primitiveContent.request.operationResult.primitiveContent, v_primitiveContent) ){ + setverdict(pass, testcasename() & ": RequestStatus: COMPLETED and primitiveContent template correctly received"); + }else{ + setverdict(fail, testcasename() & ": RequestStatus: COMPLETED and primitiveContent template not correctly received"); + } + }else if (v_requestStatus==int2){ //FAILED tc_ac.stop; setverdict(fail, testcasename() & ": RequestStatus: FAIL"); @@ -9523,8 +9537,7 @@ module OneM2M_PermutationFunctions { p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); } p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); - p_requestPrimitive.responseType.responseTypeValue := int2; //nonBlockingRequestAsynch - + p_requestPrimitive.responseType := {int2,omit}; //nonBlockingRequestAsynch // Test Body mcaPort.send(f_getMsgOutPrimitive(m_request(valueof(p_requestPrimitive)))); @@ -9602,18 +9615,18 @@ module OneM2M_PermutationFunctions { p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); } p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); - p_requestPrimitive.responseType.responseTypeValue := int2; //nonBlockingRequestAsynch + p_requestPrimitive.responseType := {int2,omit}; //nonBlockingRequestAsynch // Test Body mcaPort.send(f_getMsgOutPrimitive(m_request(valueof(p_requestPrimitive)))); tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int1001, v_contentResponse))) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int1002, v_contentResponse))) -> value v_response { tc_ac.stop; setverdict(pass, __SCOPE__ & ": URI attribute is set to <request> resource address"); } - [] mcaPort.receive(mw_response(mw_responsePrimitive(int1001))) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int1002))) -> value v_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": URI attribute is not set to <request> resource address"); } @@ -9688,8 +9701,7 @@ module OneM2M_PermutationFunctions { v_contentResponse.uRI := ?; - v_aeIndex := f_cse_preamble_registerAe(-, {f_getAnnouncementTargetPoA(PX_PROTOCOL_BINDING_AE1, PX_AE1_ADDRESS,-)});//c_CRUDNDi); - + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); if(ispresent(p_parentRequestPrimitive)) { v_resourceIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_aeIndex); p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); @@ -9702,11 +9714,11 @@ module OneM2M_PermutationFunctions { mcaPort.send(f_getMsgOutPrimitive(m_request(valueof(p_requestPrimitive)))); tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int1000, v_contentResponse))) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int1002, v_contentResponse))) -> value v_response { tc_ac.stop; setverdict(pass, __SCOPE__ & ": URI attribute is set to <request> resource address"); } - [] mcaPort.receive(mw_response(mw_responsePrimitive(int1001))) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int1002))) -> value v_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": URI attribute is not set to <request> resource address"); } @@ -9780,11 +9792,11 @@ module OneM2M_PermutationFunctions { mcaPort.send(f_getMsgOutPrimitive(m_request(valueof(p_requestPrimitive)))); tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int1001, v_contentResponse))) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int1002, v_contentResponse))) -> value v_response { tc_ac.stop; setverdict(pass, __SCOPE__ & ": URI attribute is set to <request> resource address"); } - [] mcaPort.receive(mw_response(mw_responsePrimitive(int1001))) -> value v_response { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int1002))) -> value v_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": URI attribute is not set to <request> resource address"); }