@@ -40,6 +40,12 @@ class ngap_nas_message_routine_test : public ngap_test
4040
4141 bool was_dl_nas_transport_dropped (const test_ue& ue) const { return ue.rrc_ue_dl_nas_handler .last_nas_pdu .empty (); }
4242
43+ bool was_ue_radio_capability_info_indication_sent () const
44+ {
45+ return n2_gw.last_ngap_msgs .back ().pdu .init_msg ().value .type () ==
46+ asn1::ngap::ngap_elem_procs_o::init_msg_c::types_opts::ue_radio_cap_info_ind;
47+ }
48+
4349 bool was_ul_nas_transport_forwarded () const
4450 {
4551 return n2_gw.last_ngap_msgs .back ().pdu .init_msg ().value .type () ==
@@ -125,6 +131,29 @@ TEST_F(ngap_nas_message_routine_test, when_no_ue_present_dl_nas_transport_is_dro
125131 ASSERT_TRUE (was_error_indication_sent ());
126132}
127133
134+ // / Test DL NAS transport handling
135+ TEST_F (ngap_nas_message_routine_test,
136+ when_dl_nas_transport_contains_ue_cap_info_request_then_ue_radio_cap_info_indication_is_sent)
137+ {
138+ // Test preamble
139+ ue_index_t ue_index = this ->start_procedure ();
140+
141+ auto & ue = test_ues.at (ue_index);
142+ ue.amf_ue_id = uint_to_amf_ue_id (
143+ test_rgen::uniform_int<uint64_t >(amf_ue_id_to_uint (amf_ue_id_t ::min), amf_ue_id_to_uint (amf_ue_id_t ::max)));
144+
145+ // Inject DL NAS transport message from AMF
146+ ngap_message dl_nas_transport =
147+ generate_downlink_nas_transport_message_with_ue_cap_info_request (ue.amf_ue_id .value (), ue.ran_ue_id .value ());
148+ ngap->handle_message (dl_nas_transport);
149+
150+ // Check that RRC notifier was called
151+ ASSERT_TRUE (was_dl_nas_transport_forwarded (ue));
152+
153+ // Check that UE Radio Capability Info Indication was sent to AMF
154+ ASSERT_TRUE (was_ue_radio_capability_info_indication_sent ());
155+ }
156+
128157// / Test UL NAS transport handling
129158TEST_F (ngap_nas_message_routine_test, when_ue_present_and_amf_set_ul_nas_transport_is_forwared)
130159{
0 commit comments