summaryrefslogtreecommitdiffstats
path: root/msc
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-06-21 01:46:33 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-07-30 23:18:47 +0700
commitce8cc378576ccbdb39d5149057eb07913816728b (patch)
treeda446619017f68c7fd313210aa076e41f6229445 /msc
parent23b45974ce6401638ce0e69d704effc9719b9712 (diff)
msc/USSD: introduce common GSUP/DTAP matching functions
In order to avoid code duplication in the upcoming test cases, let's introduce a few functions which basically do a GSUP/DTAP message matching within the alternative statement. Change-Id: I846c2d40a7c37afa8647e644673b4df905e3e116
Diffstat (limited to 'msc')
-rw-r--r--msc/MSC_Tests.ttcn42
1 files changed, 42 insertions, 0 deletions
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 4a6b822..640940d 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -2141,6 +2141,48 @@ testcase TC_smpp_mt_sms() runs on MTC_CT {
* USSD Testing
***********************************************************************/
+private altstep as_unexp_gsup_or_bssap_msg()
+runs on BSC_ConnHdlr {
+ [] GSUP.receive {
+ setverdict(fail, "Unknown/unexpected GSUP received");
+ self.stop;
+ }
+ [] BSSAP.receive {
+ setverdict(fail, "Unknown/unexpected BSSAP message received");
+ self.stop;
+ }
+}
+
+private function f_expect_gsup_msg(template GSUP_PDU msg)
+runs on BSC_ConnHdlr return GSUP_PDU {
+ var GSUP_PDU gsup_msg_complete;
+
+ alt {
+ [] GSUP.receive(msg) -> value gsup_msg_complete {
+ setverdict(pass);
+ }
+ /* We don't expect anything else */
+ [] as_unexp_gsup_or_bssap_msg();
+ }
+
+ return gsup_msg_complete;
+}
+
+private function f_expect_mt_dtap_msg(template PDU_ML3_NW_MS msg)
+runs on BSC_ConnHdlr return PDU_ML3_NW_MS {
+ var PDU_DTAP_MT bssap_msg_complete;
+
+ alt {
+ [] BSSAP.receive(tr_PDU_DTAP_MT(msg)) -> value bssap_msg_complete {
+ setverdict(pass);
+ }
+ /* We don't expect anything else */
+ [] as_unexp_gsup_or_bssap_msg();
+ }
+
+ return bssap_msg_complete.dtap;
+}
+
/* LU followed by MO USSD request */
private function f_tc_lu_and_mo_ussd_single_request(charstring id, BSC_ConnHdlrPars pars)
runs on BSC_ConnHdlr {