Commit ce629822 authored by Yann Garcia's avatar Yann Garcia

Add RnisAPI tests

parent 0dd2792e
...@@ -65,7 +65,7 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy ...@@ -65,7 +65,7 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
} else if (it->second.find("\"problemDetails\"") != std::string::npos) { } else if (it->second.find("\"problemDetails\"") != std::string::npos) {
UEidentityAPI__TypesAndValues::ProblemDetails problem_details; UEidentityAPI__TypesAndValues::ProblemDetails problem_details;
problem_details.decode(UEidentityAPI__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); problem_details.decode(UEidentityAPI__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
msg.problemDetails() = problem_details; msg.problemDetails__ue__identity() = problem_details;
} else { } else {
loggers::get_instance().warning("json_codec::decode: Unsupported variant"); loggers::get_instance().warning("json_codec::decode: Unsupported variant");
return -1; return -1;
......
...@@ -52,7 +52,7 @@ find .. -type f -name "*.bak" -exec rm {} \; ...@@ -52,7 +52,7 @@ find .. -type f -name "*.bak" -exec rm {} \;
find .. -type f -name "*.log" -exec rm {} \; find .. -type f -name "*.log" -exec rm {} \;
# Build JSON files if any and put them in objs directory # Build JSON files if any and put them in objs directory
REFERENCES="LibCommon LibHttp LibMec LibMec/LocationAPI LibMec/UEidentityAPI" REFERENCES="LibCommon LibHttp LibMec LibMec/LocationAPI LibMec/RnisAPI LibMec/UEidentityAPI"
for i in ${REFERENCES} for i in ${REFERENCES}
do do
# TTCN code # TTCN code
......
...@@ -146,7 +146,7 @@ do ...@@ -146,7 +146,7 @@ do
then then
cp ${TTCN_3_ORG_PATH}/$i/ttcn/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn cp ${TTCN_3_ORG_PATH}/$i/ttcn/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn
cp ${TTCN_3_ORG_PATH}/$i/json/*.json ${TTCN_3_DST_PATH}/$i/json cp ${TTCN_3_ORG_PATH}/$i/json/*.json ${TTCN_3_DST_PATH}/$i/json
elif [ "$i" == "LibMec/RnsiAPI" ] elif [ "$i" == "LibMec/RnisAPI" ]
then then
cp ${TTCN_3_ORG_PATH}/$i/ttcn/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn cp ${TTCN_3_ORG_PATH}/$i/ttcn/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn
cp ${TTCN_3_ORG_PATH}/$i/json/*.json ${TTCN_3_DST_PATH}/$i/json cp ${TTCN_3_ORG_PATH}/$i/json/*.json ${TTCN_3_DST_PATH}/$i/json
......
...@@ -40,7 +40,7 @@ module AtsMec_RnisAPI_TestCases { ...@@ -40,7 +40,7 @@ module AtsMec_RnisAPI_TestCases {
* @desc Check that the RNIS service sends all RNIS subscriptions when requested * @desc Check that the RNIS service sends all RNIS subscriptions when requested
* @see Check that the RNIS service sends all RNIS subscriptions when requested * @see Check that the RNIS service sends all RNIS subscriptions when requested
*/ */
testcase TC_MEC025_RNI_SUBSCRIPTION_05() runs on HttpComponent system HttpTestAdapter { testcase TC_MEC025_RNI_SUBSCRIPTION_005() runs on HttpComponent system HttpTestAdapter {
// Local variables // Local variables
var HeaderLines v_headers; var HeaderLines v_headers;
var HttpMessage v_response; var HttpMessage v_response;
...@@ -90,9 +90,9 @@ module AtsMec_RnisAPI_TestCases { ...@@ -90,9 +90,9 @@ module AtsMec_RnisAPI_TestCases {
// Postamble // Postamble
f_cf_01_http_down(); f_cf_01_http_down();
} // End of testcase TC_MEC025_RNI_SUBSCRIPTION_05 } // End of testcase TC_MEC025_RNI_SUBSCRIPTION_005
} // End of group me_app_role } // End of group me_app_role
} // End of module AtsMec_RnisAPI_TestCases } // End of module AtsMec_RnisAPI_TestCases
module RnisAPI_Pixits {
modulepar universal charstring PX_SUBSCRIPTION_ID := "7777";
} // End of module RnisAPI_Pixits
module RnisAPI_TypesAndValues { module RnisAPI_Templates {
// LibCommon // LibCommon
import from LibCommon_BasicTypesAndValues all; import from LibCommon_BasicTypesAndValues all;
// LibMec/RnisAPI // LibMec/RnisAPI
import from module RnisAPI_TypesAndValues all; import from RnisAPI_TypesAndValues all;
group subscriptions { group subscriptions {
...@@ -17,7 +17,7 @@ module RnisAPI_TypesAndValues { ...@@ -17,7 +17,7 @@ module RnisAPI_TypesAndValues {
in template (omit) TimeStamp p_expiryDeadline := omit in template (omit) TimeStamp p_expiryDeadline := omit
) := { ) := {
callbackReference := p_callbackReference, callbackReference := p_callbackReference,
_links := p_links, links := p_links,
filterCriteria := p_filterCriteria, filterCriteria := p_filterCriteria,
expiryDeadline := p_expiryDeadline expiryDeadline := p_expiryDeadline
} // End of template m_cell_change_subscription } // End of template m_cell_change_subscription
...@@ -29,7 +29,7 @@ module RnisAPI_TypesAndValues { ...@@ -29,7 +29,7 @@ module RnisAPI_TypesAndValues {
template TimeStamp p_expiryDeadline := * template TimeStamp p_expiryDeadline := *
) := { ) := {
callbackReference := p_callbackReference, callbackReference := p_callbackReference,
_links := p_links, links := p_links,
filterCriteria := p_filterCriteria, filterCriteria := p_filterCriteria,
expiryDeadline := p_expiryDeadline expiryDeadline := p_expiryDeadline
} // End of template mw_cell_change_subscription } // End of template mw_cell_change_subscription
...@@ -38,4 +38,4 @@ module RnisAPI_TypesAndValues { ...@@ -38,4 +38,4 @@ module RnisAPI_TypesAndValues {
} // End of group subscriptions } // End of group subscriptions
} // End of module RnisAPI_TypesAndValues } // End of module RnisAPI_Templates
...@@ -4,7 +4,9 @@ module LibItsHttp_JsonMessageBodyTypes { ...@@ -4,7 +4,9 @@ module LibItsHttp_JsonMessageBodyTypes {
import from LocationAPI_TypesAndValues all; import from LocationAPI_TypesAndValues all;
// LibMec/UEidentityAPI // LibMec/UEidentityAPI
import from UEidentityAPI_TypesAndValues all; import from UEidentityAPI_TypesAndValues all;
// LibMec/RnisAPI
import from RnisAPI_TypesAndValues all;
/** /**
* This file volontary contains a trivial declaration of the type JsonBody. * This file volontary contains a trivial declaration of the type JsonBody.
* In accordance with your TTCN-3 module LibItsHttp_JSONTypes, you have to change the JsonBody typing. * In accordance with your TTCN-3 module LibItsHttp_JSONTypes, you have to change the JsonBody typing.
...@@ -13,13 +15,14 @@ module LibItsHttp_JsonMessageBodyTypes { ...@@ -13,13 +15,14 @@ module LibItsHttp_JsonMessageBodyTypes {
type union JsonBody { type union JsonBody {
// TODO Add here your custom variants // TODO Add here your custom variants
UserInfo userInfo, UserInfo userInfo,
UserList userList, UserList userList,
ZoneInfo zoneInfo, ZoneInfo zoneInfo,
ProblemDetails problemDetails, UEidentityAPI_TypesAndValues.ProblemDetails problemDetails_ue_identity,
UeIdentityTagInfo ueIdentityTagInfo, UeIdentityTagInfo ueIdentityTagInfo,
CellChangeSubscription cellChangeSubscription, CellChangeSubscription cellChangeSubscription,
universal charstring raw RnisAPI_TypesAndValues.ProblemDetails problemDetails_rnis,
universal charstring raw
} with { } with {
variant "" variant ""
} }
......
...@@ -16,6 +16,9 @@ module LibItsHttp_JsonTemplates { ...@@ -16,6 +16,9 @@ module LibItsHttp_JsonTemplates {
// LibMec/UEidentityAPI // LibMec/UEidentityAPI
import from UEidentityAPI_TypesAndValues all; import from UEidentityAPI_TypesAndValues all;
import from UEidentityAPI_Templates all; import from UEidentityAPI_Templates all;
// LibMec/RnisAPI
import from RnisAPI_TypesAndValues all;
import from RnisAPI_Templates all;
// TODO Add here your custom RFCs import // TODO Add here your custom RFCs import
...@@ -90,15 +93,15 @@ module LibItsHttp_JsonTemplates { ...@@ -90,15 +93,15 @@ module LibItsHttp_JsonTemplates {
} // End of template mw_body_json_ue_identity_tag_info } // End of template mw_body_json_ue_identity_tag_info
template (value) JsonBody m_body_json_ue_problem_details( template (value) JsonBody m_body_json_ue_problem_details(
in template (value) ProblemDetails p_problemDetails in template (value) UEidentityAPI_TypesAndValues.ProblemDetails p_problemDetails
) := { ) := {
problemDetails := p_problemDetails problemDetails_ue_identity := p_problemDetails
} // End of template m_body_json_ue_problem_details } // End of template m_body_json_ue_problem_details
template (present) JsonBody mw_body_json_ue_problem_details( template (present) JsonBody mw_body_json_ue_problem_details(
template (present) ProblemDetails p_problemDetails := ? template (present) UEidentityAPI_TypesAndValues.ProblemDetails p_problemDetails := ?
) := { ) := {
problemDetails := p_problemDetails problemDetails_ue_identity := p_problemDetails
} // End of template mw_body_json_ue_problem_details } // End of template mw_body_json_ue_problem_details
} // End of group ue_identity_api } // End of group ue_identity_api
......
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