Loading ttcn/AtsECRF/AtsECRF_TestCases.ttcn +87 −2 Original line number Diff line number Diff line Loading @@ -216,7 +216,7 @@ module AtsECRF_TestCases { /** * @desc "IUT successfully responds with an error response for unknown service URI in the service boundary */ testcase TC_ECRF_LOST_BI_01() runs on HttpComponent system TestAdapter { testcase TC_ECRF_LOST_BV_03() runs on HttpComponent system TestAdapter { // Test control f_check_statements({ Loading Loading @@ -261,7 +261,7 @@ module AtsECRF_TestCases { /** * @desc "IUT successfully responds with an error response for an unrecognized location profile */ testcase TC_ECRF_LOST_BI_02() runs on HttpComponent system TestAdapter { testcase TC_ECRF_LOST_BV_04() runs on HttpComponent system TestAdapter { // Test control f_check_statements({ Loading Loading @@ -299,6 +299,91 @@ module AtsECRF_TestCases { ) ); // Postamble f_cf_01_http_down(); } /** * @desc "IUT successfully responds the service boundary by value" */ testcase TC_ECRF_LOST_BV_05() runs on HttpComponent system TestAdapter { // Local variables var HttpMessage v_response; // Test control f_check_statements({ { name := "PICS_ECRF_FIND_SERVICE", val := PICS_ECRF_FIND_SERVICE }, { name := "PICS_ECRF_GEOMETRY_POINT", val := PICS_ECRF_GEOMETRY_POINT } }) // Test component configuration f_cf_01_http_up(); // Preamble f_sendFindServiceRequest( m_find_service_request( { m_location( PX_LOCATION_ID, { m_extension_point(encvalue_unichar(valueof(m_point(PX_POINT_IN_E_POLICE_SERVICE_BOUNDARY, PX_SRS_NAME, "point1")))) }, "geodetic-2d" // TODO Use a Pixit ) }, {}, PX_E_POLICE_SERVICE_URN, true, value_ ) ); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body tc_ac.start; v_response := f_receiveResponse(mw_http_find_service_response( mw_find_service_response( { mw_mapping( mw_expires_date_time(PX_LOST_EXPIRES), PX_LOST_LAST_UPDATED, PX_V_POLICE_SOURCE, PX_E_POLICE_SOURCE_ID, { mw_display_name(-, PX_E_POLICE_DISPLAY_NAME) }, { PX_E_POLICE_SIP_URI }, mw_mapping_service_boundary( mw_service_boundary( { mw_service_boundary_item("geodetic-2d") } ) ), PX_E_POLICE_SERVICE_URN, -, -, -, "112" ) } ) ) ); var universal charstring v_temp; var integer v_result; var PolygonType v_polygon; tc_ac.stop; v_temp := v_response.response.body.xml_body.findServiceResponse.mapping_list[0].choice.serviceBoundary.serviceBoundary_list[0].extensionPoint_list[0].elem; v_result := decvalue_unichar(v_temp, v_polygon); if (v_result == 0) { log("v_polygon= ", v_polygon); log("match(v_polygon, mw_polygon(PX_SRS_NAME))= ", match(v_polygon, mw_polygon(PX_SRS_NAME))); log("*** " & testcasename() & ": PASS: IUT successfully responds with a Polygon ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } else { log("*** " & testcasename() & ": FAIL: Cannot decode Polygon ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } // Postamble f_cf_01_http_down(); } Loading Loading
ttcn/AtsECRF/AtsECRF_TestCases.ttcn +87 −2 Original line number Diff line number Diff line Loading @@ -216,7 +216,7 @@ module AtsECRF_TestCases { /** * @desc "IUT successfully responds with an error response for unknown service URI in the service boundary */ testcase TC_ECRF_LOST_BI_01() runs on HttpComponent system TestAdapter { testcase TC_ECRF_LOST_BV_03() runs on HttpComponent system TestAdapter { // Test control f_check_statements({ Loading Loading @@ -261,7 +261,7 @@ module AtsECRF_TestCases { /** * @desc "IUT successfully responds with an error response for an unrecognized location profile */ testcase TC_ECRF_LOST_BI_02() runs on HttpComponent system TestAdapter { testcase TC_ECRF_LOST_BV_04() runs on HttpComponent system TestAdapter { // Test control f_check_statements({ Loading Loading @@ -299,6 +299,91 @@ module AtsECRF_TestCases { ) ); // Postamble f_cf_01_http_down(); } /** * @desc "IUT successfully responds the service boundary by value" */ testcase TC_ECRF_LOST_BV_05() runs on HttpComponent system TestAdapter { // Local variables var HttpMessage v_response; // Test control f_check_statements({ { name := "PICS_ECRF_FIND_SERVICE", val := PICS_ECRF_FIND_SERVICE }, { name := "PICS_ECRF_GEOMETRY_POINT", val := PICS_ECRF_GEOMETRY_POINT } }) // Test component configuration f_cf_01_http_up(); // Preamble f_sendFindServiceRequest( m_find_service_request( { m_location( PX_LOCATION_ID, { m_extension_point(encvalue_unichar(valueof(m_point(PX_POINT_IN_E_POLICE_SERVICE_BOUNDARY, PX_SRS_NAME, "point1")))) }, "geodetic-2d" // TODO Use a Pixit ) }, {}, PX_E_POLICE_SERVICE_URN, true, value_ ) ); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body tc_ac.start; v_response := f_receiveResponse(mw_http_find_service_response( mw_find_service_response( { mw_mapping( mw_expires_date_time(PX_LOST_EXPIRES), PX_LOST_LAST_UPDATED, PX_V_POLICE_SOURCE, PX_E_POLICE_SOURCE_ID, { mw_display_name(-, PX_E_POLICE_DISPLAY_NAME) }, { PX_E_POLICE_SIP_URI }, mw_mapping_service_boundary( mw_service_boundary( { mw_service_boundary_item("geodetic-2d") } ) ), PX_E_POLICE_SERVICE_URN, -, -, -, "112" ) } ) ) ); var universal charstring v_temp; var integer v_result; var PolygonType v_polygon; tc_ac.stop; v_temp := v_response.response.body.xml_body.findServiceResponse.mapping_list[0].choice.serviceBoundary.serviceBoundary_list[0].extensionPoint_list[0].elem; v_result := decvalue_unichar(v_temp, v_polygon); if (v_result == 0) { log("v_polygon= ", v_polygon); log("match(v_polygon, mw_polygon(PX_SRS_NAME))= ", match(v_polygon, mw_polygon(PX_SRS_NAME))); log("*** " & testcasename() & ": PASS: IUT successfully responds with a Polygon ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } else { log("*** " & testcasename() & ": FAIL: Cannot decode Polygon ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } // Postamble f_cf_01_http_down(); } Loading