DiameterRfRo_TestCases.ttcn 432 KB
Newer Older
pintar's avatar
pintar committed
/**
garciay's avatar
garciay committed
 *  @author     STF 490
pintar's avatar
pintar committed
 *  @version    $Id$
 *  @desc       This module provides test cases
pintar's avatar
pintar committed
 *              for SIP-IMS-RfRo-DIAMETER tests.
 */

module DiameterRfRo_TestCases
{
    //LibCommon
    import from LibCommon_Sync all ;
    import from LibCommon_VerdictControl all;
pintar's avatar
pintar committed
    //LibDiameter
    import from LibDiameter_TypesAndValues all;
pintar's avatar
pintar committed
    import from LibDiameter_Interface all;
pintar's avatar
pintar committed
    //LibSip
    import from LibSip_SIPTypesAndValues {type CSeq;};

pintar's avatar
pintar committed
    //LibIms
    import from LibIms_Interface all;
    
pintar's avatar
pintar committed
    //AtsIms
    import from DiameterRfRo_TestConfiguration all;
    import from DiameterRfRo_TestSystem all;
    import from DiameterRfRo_SIP_TCFunctions all;
    import from DiameterRfRo_TCFunctions all;
    import from DiameterRfRo_PICS all;
    import from DiameterRfRo_PIXITS all;
    import from DiameterRfRo_Steps all;
    import from DiameterRfRo_TestSystem all;
    
pintar's avatar
pintar committed
    
    // 5.2.2.1. CDF Role
pintar's avatar
pintar committed
    group TP_RF_Role {
        // 5.2.2.1. CDF Role
        group TP_RF_CDF_Role { 
            
            // 5.2.2.1.2 Message Syntax
juvancic's avatar
juvancic committed
            group TP_RF_CDF_MS {
                /**
                 * @desc    Verify that the IUT can successfully process all mandatory AVPs in an AC-Request received due to Charging Data Transfer
                 * <pre>
                 * Pics Selection: PICS_CDF_IUT
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an AC-Request 
                 *                containing a Session-ID AVP
                 *                containing an Origin-Host AVP
                 *                containing an Origin-Realm AVP
                 *                containing a Destination-Realm AVP
                 *                containing an Accounting-Record-Type AVP
                 *                containing an Accounting-Record-Number AVP
                 *                containing an Acct-Application-Id AVP
                 *                    indicating the value 3
                 *        }
                 *        then {
                 *            the IUT sends a AC-Response 
                 *                containing a Session-ID AVP
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                not containing an Experimental-Result AVP
                 *                containing an Origin-Host AVP
                 *                containing an Origin-Realm AVP
                 *                containing an Accounting-Record-Type AVP
                 *                containing an Accounting-Record-Number AVP
                 *                containing an Acct-Application-Id AVP
                 *                    indicating the value 3
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.12
                 * @see        ETSI TS 103 374-2 V0.0.12 (2015-07) TP_RF_CDF_MS_01
                 */
                testcase TC_RF_CDF_MS_01() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
pintar's avatar
pintar committed
                    var DiameterRfRo v_diameterRf_ctf; 
juvancic's avatar
juvancic committed
                    if (not PICS_RF_CDF_IUT) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RF_CDF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
pintar's avatar
pintar committed
                    f_cf_1Rf_ctfUp(v_diameterRf_ctf);
pintar's avatar
pintar committed
                    v_diameterRf_ctf.start(f_TC_CDF_MS_01()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
pintar's avatar
pintar committed
                    f_cf_1Rf_ctfDown(v_diameterRf_ctf);
                } // End of testcase TC_RF_CDF_MS_01 
                
pintar's avatar
pintar committed
                /**
                 * @desc    Verify that the IUT can successfully process all mandatory AVPs in an AC-Request received due to Charging Data Transfer,
                 *          and responds with a valid AC-Answer message
pintar's avatar
pintar committed
                 * <pre>
                 * Pics Selection: PICS_CDF_IUT
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an AC-Request 
                 *                containing a Session-ID AVP
                 *                containing an Origin-Host AVP
                 *                containing an Origin-Realm AVP
                 *                containing a Destination-Realm AVP
                 *                containing an Accounting-Record-Type AVP
                 *                containing an Accounting-Record-Number AVP
                 *                containing an Acct-Application-Id AVP
                 *                    indicating the value 3
                 *        }
                 *        then {
                 *            the IUT sends an AC-Answer
                 *                containing a Diameter-Header
                 *                    containing a Version
                 *                        indicating value '1'
                 *                    containing a Command-Flags
                 *                        containing T bit
                 *                            indicating value '0'
                 *                        containing r bits
                 *                            indicating value '0000'.
pintar's avatar
pintar committed
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RF_CDF_MS_02
pintar's avatar
pintar committed
                 */
                testcase TC_RF_CDF_MS_02() runs on DiameterRfRo system TestAdapter { 
                   // Local variables
                   var DiameterRfRo v_diameterRf_ctf; 
    
                   // Test control
juvancic's avatar
juvancic committed
                   if (not PICS_RF_CDF_IUT) {
pintar's avatar
pintar committed
                       log("*** " & __SCOPE__ & ": ERROR: 'PICS_RF_CDF_IUT' shall be set to true for executing the TC. ***"); 
pintar's avatar
pintar committed
                       stop;
                   }
    
                   // Test component configuration
                   f_cf_1Rf_ctfUp(v_diameterRf_ctf);
    
                   // Start
                   v_diameterRf_ctf.start(f_TC_CDF_MS_02());
    
                   // synchronize PTC on 1 sychronization points
                   f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
    
                   f_cf_1Rf_ctfDown(v_diameterRf_ctf);
    
                } // End of testcase TC_RF_CDF_MS_01
                
            } // End of group MessageSyntax
            
            // 5.2.2.1.3 Type of Charging
juvancic's avatar
juvancic committed
            group TP_RF_CDF_TC {
                
                /**
                 * @desc    Verify that the IUT can successfully process an AC-Request [Event] where Event Based Charging is used
                 * <pre>
                 * Pics Selection: PICS_CDF_IUT and PICS_EVENT_BASED_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an AC-Request 
                 *                containing an Accounting-Record-Type AVP
                 *                    indicating EVENT_RECORD
                 *                containing an Event-Timestamp AVP 
                 *                optionally containing Service-Information AVP
                 *                    containing at least one Subscription-ID AVP
                 *                        indicating the identification of the user
                 *                    optionally containing IMS-Information AVP
                 *                        containing Node-Functionality AVP
                 *                            indicating the value 3
                 *                    optionally containing Service-Generic-Information AVP
                 *                        indicating the service specific parameters
                 *                optionally containing Service-Context-Id AVP
                 *        }
                 *        then {
                 *            the IUT sends a AC-Response 
                 *                containing a Session-ID AVP
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                not containing an Experimental-Result AVP
                 *                containing an Accounting-Record-Type AVP
                 *                    indicating EVENT_RECORD
                 *                containing an Accounting-Record-Number AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.12
                 * @see        ETSI TS 103 374-2 V0.0.12 (2015-07) TP_RF_CDF_TC_01
                 */
                testcase TC_RF_CDF_TC_01() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
pintar's avatar
pintar committed
                    var DiameterRfRo v_diameterRf_ctf; 
                    
                    // Test control
pintar's avatar
pintar committed
                    if (not (PICS_RF_CDF_IUT and PICS_RF_CDF_EVENT_BASED_CHARGING)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RF_CDF_IUT and PICS_RF_CDF_EVENT_BASED_CHARGING' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
pintar's avatar
pintar committed
                    f_cf_1Rf_ctfUp(v_diameterRf_ctf);
                    
                    // Start
                    v_diameterRf_ctf.start(f_TC_RF_CDF_TC_01());
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
pintar's avatar
pintar committed
                    f_cf_1Rf_ctfDown(v_diameterRf_ctf);
pintar's avatar
pintar committed
                } // End of testcase TC_RF_CDF_TC_01
                
                /**
                 * @desc    Verify that the IUT can successfully process an AC-Request [Start] where Session Based Charging is used
                 * <pre>
                 * Pics Selection: PICS_CDF_IUT and PICS_SESSION_BASED_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *           the IUT receives an AC-Request
pintar's avatar
pintar committed
                 *               containing an Accounting-Record-Type AVP
                 *                   containing an Accounting-Record-Type AVP
                 *                       indicating START_RECORD
                 *               containing an Accounting-Record-Number AVP
                 *               containing an Event-Timestamp AVP
                 *               containing Service-Information AVP
                 *                   indicating the service specific parameters
                 *        }
                 *        then {
                 *           the IUT sends an AC-Answer
pintar's avatar
pintar committed
                 *               containing a Result-Code AVP
                 *                   indicating DIAMETER_SUCCESS
                 *               not containing an Experimental-Result AVP
                 *               containing an Accounting-Record-Type AVP
                 *                   indicating START_RECORD
                 *               optionally containing an Acct-Interim-Interval AVP
                 *                   indicating the desired intermediate charging interval.
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RF_CDF_TC_02
pintar's avatar
pintar committed
                 */
                testcase TC_RF_CDF_TC_02() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRf_ctf; 
                    
                    // Test control
pintar's avatar
pintar committed
                    if (not (PICS_RF_CDF_IUT and PICS_RF_CDF_SESSION_BASED_CHARGING)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RF_CDF_IUT and PICS_RF_CDF_SESSION_BASED_CHARGING' shall be set to true for executing the TC. ***"); 
pintar's avatar
pintar committed
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Rf_ctfUp(v_diameterRf_ctf);
                    
                    // Start
                    v_diameterRf_ctf.start(f_TC_RF_CDF_TC_02());
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Rf_ctfDown(v_diameterRf_ctf);
                    
juvancic's avatar
juvancic committed
                } // End of testcase TC_RF_CDF_TC_02
                
                /**
garciay's avatar
garciay committed
                 * @desc    Verify that the IUT can successfully process an AC-Request [Interim] where Session Based Charging is used in case of charging condition change.
juvancic's avatar
juvancic committed
                 * <pre>
                 * Pics Selection: PICS_CDF_IUT and PICS_SESSION_BASED_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *           the IUT receives an AC-Request
juvancic's avatar
juvancic committed
                 *               containing an Accounting-Record-Type AVP
                 *                   containing an Accounting-Record-Type AVP
                 *                       indicating INTERIM_RECORD
                 *               containing an Accounting-Record-Number AVP
                 *               containing an Event-Timestamp AVP
                 *               optionally containing Service-Information AVP
juvancic's avatar
juvancic committed
                 *                   indicating Subscription-Id AVP
                 *                   indicating IMS-Information AVP
                 *        }
                 *        then {
                 *           the IUT sends an AC-Answer
juvancic's avatar
juvancic committed
                 *               containing a Result-Code AVP
                 *                   indicating DIAMETER_SUCCESS
                 *               not containing an Experimental-Result AVP
                 *               containing an Accounting-Record-Type AVP
                 *                   indicating INTERIM_RECORD
                 *               optionally containing an Acct-Interim-Interval AVP
                 *                   indicating the desired intermediate charging interval
juvancic's avatar
juvancic committed
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RF_CDF_TC_03
juvancic's avatar
juvancic committed
                 */
                testcase TC_RF_CDF_TC_03() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRf_ctf; 
                    
                    // Test control
pintar's avatar
pintar committed
                    if (not (PICS_RF_CDF_IUT and PICS_RF_CDF_SESSION_BASED_CHARGING)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RF_CDF_IUT and PICS_RF_CDF_SESSION_BASED_CHARGING' shall be set to true for executing the TC. ***"); 
juvancic's avatar
juvancic committed
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Rf_ctfUp(v_diameterRf_ctf);
                    
                    // Start
                    v_diameterRf_ctf.start(f_TC_RF_CDF_TC_03());
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Rf_ctfDown(v_diameterRf_ctf);
                    
                } // End of testcase TC_RF_CDF_TC_03
                
                /**
garciay's avatar
garciay committed
                 * @desc    Verify that the IUT can successfully process an AC-Request [Interim] where Session Based Charging is used in case of Acct-Interim-Interval AVP is present in the AC Request [Start].
juvancic's avatar
juvancic committed
                 * <pre>
                 * Pics Selection: PICS_CDF_IUT and PICS_SESSION_BASED_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *           the IUT receives an AC-Request
juvancic's avatar
juvancic committed
                 *               containing an Accounting-Record-Type AVP
                 *                   containing an Accounting-Record-Type AVP
garciay's avatar
garciay committed
                 *                       indicating START_RECORD
                 *               containing an Accounting-Record-Number AVP
                 *               containing an Acct-Interim-Interval AVP
                 *                   indicating expected intermediate charging interval
                 *        }
                 *        then {
                 *           the IUT sends an AC-Answer
                 *               containing a Result-Code AVP
                 *                   indicating DIAMETER_SUCCESS
                 *               not containing an Experimental-Result AVP
                 *               containing an Accounting-Record-Type AVP
                 *                   indicating START_RECORD
                 *               containing an Acct-Interim-Interval AVP
                 *                   indicating the required intermediate charging interval
                 *        when {
                 *           the IUT receives an AC-Request
                 *               containing an Accounting-Record-Type AVP
                 *                   containing an Accounting-Record-Type AVP
                 *                       indicating INTERIM_RECORD
juvancic's avatar
juvancic committed
                 *               containing an Accounting-Record-Number AVP
                 *               containing an Event-Timestamp AVP
                 *               optionally containing Service-Information AVP
juvancic's avatar
juvancic committed
                 *                   indicating Subscription-Id AVP
                 *                   indicating IMS-Information AVP
                 *        }
                 *        then {
                 *           the IUT sends an AC-Answer
juvancic's avatar
juvancic committed
                 *               containing a Result-Code AVP
                 *                   indicating DIAMETER_SUCCESS
                 *               not containing an Experimental-Result AVP
                 *               containing an Accounting-Record-Type AVP
garciay's avatar
garciay committed
                 *                   indicating INTERIM_RECORD
                 *               optionally containing an Acct-Interim-Interval AVP
                 *                   indicating the desired intermediate charging interval
juvancic's avatar
juvancic committed
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RF_CDF_TC_04
juvancic's avatar
juvancic committed
                 */
                testcase TC_RF_CDF_TC_04() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRf_ctf; 
                    
                    // Test control
pintar's avatar
pintar committed
                    if (not (PICS_RF_CDF_IUT and PICS_RF_CDF_SESSION_BASED_CHARGING)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RF_CDF_IUT and PICS_RF_CDF_SESSION_BASED_CHARGING' shall be set to true for executing the TC. ***"); 
juvancic's avatar
juvancic committed
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Rf_ctfUp(v_diameterRf_ctf);
                    
                    // Start
                    v_diameterRf_ctf.start(f_TC_RF_CDF_TC_04());
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Rf_ctfDown(v_diameterRf_ctf);
                    
                } // End of testcase TC_RF_CDF_TC_04
juvancic's avatar
juvancic committed
                /**
garciay's avatar
garciay committed
                 * @desc    Verify that the IUT can successfully process an AC-Request [Stop] where Session Based Charging is used
juvancic's avatar
juvancic committed
                 * <pre>
                 * Pics Selection: PICS_CDF_IUT and PICS_SESSION_BASED_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
garciay's avatar
garciay committed
                 *        when {
                 *           the IUT receives an AC-Request
                 *               containing an Accounting-Record-Type AVP
                 *                   containing an Accounting-Record-Type AVP
                 *                       indicating STOP_RECORD
                 *               containing an Accounting-Record-Number AVP
                 *               containing an Event-Timestamp AVP
                 *               optionally containing Service-Information AVP
                 *                   indicating Subscription-Id AVP
                 *                   indicating IMS-Information AVP
juvancic's avatar
juvancic committed
                 *        }
garciay's avatar
garciay committed
                 *        then {
                 *           the IUT sends an AC-Answer
                 *               containing a Result-Code AVP
                 *                   indicating DIAMETER_SUCCESS
                 *               not containing an Experimental-Result AVP
                 *               containing an Accounting-Record-Type AVP
                 *                   indicating STOP_RECORD
juvancic's avatar
juvancic committed
                 *        }
garciay's avatar
garciay committed
                 *    }
juvancic's avatar
juvancic committed
                 * </pre>
                 * 
garciay's avatar
garciay committed
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RF_CDF_TC_05
juvancic's avatar
juvancic committed
                 */
garciay's avatar
garciay committed
                testcase TC_RF_CDF_TC_05() runs on DiameterRfRo system TestAdapter { 
juvancic's avatar
juvancic committed
                    // Local variables
                    var DiameterRfRo v_diameterRf_ctf; 
                    
                    // Test control
pintar's avatar
pintar committed
                    if (not (PICS_RF_CDF_IUT and PICS_RF_CDF_SESSION_BASED_CHARGING)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RF_CDF_IUT and PICS_RF_CDF_SESSION_BASED_CHARGING' shall be set to true for executing the TC. ***"); 
juvancic's avatar
juvancic committed
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Rf_ctfUp(v_diameterRf_ctf);
                    
                    // Start
garciay's avatar
garciay committed
                    v_diameterRf_ctf.start(f_TC_RF_CDF_TC_04());
juvancic's avatar
juvancic committed
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Rf_ctfDown(v_diameterRf_ctf);
                    
garciay's avatar
garciay committed
                } // End of testcase TC_RF_CDF_TC_05
                
            } // End of group TypeOfCharging
            
            //5.2.2.1.4 ErrorCases
            group TP_RF_CDF_EC {
juvancic's avatar
juvancic committed

                /**
                 * @desc    Verify that the IUT can successfully process Duplicate Detection AC-Request [Event] where Event Based Charging is used
                 * <pre>
                 * Pics Selection: PICS_CDF_IUT and PICS_EVENT_BASED_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an AC-Request 
                 *                containing Diameter-Header
                 *                    containing Command-Flags
                 *                        containing T-flag
                 *                            indicating value '1'
                 *                containing an Accounting-Record-Type AVP
                 *                    indicating EVENT_RECORD
                 *                containing an Event-Timestamp AVP 
juvancic's avatar
juvancic committed
                 *        }
                 *        then {
                 *            the IUT sends a AC-Response
juvancic's avatar
juvancic committed
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                not containing an Experimental-Result AVP
                 *                containing an Accounting-Record-Type AVP
                 *                    indicating EVENT_RECORD
                 *                containing an Accounting-Record-Number AVP
                 *        }
                 *    }
                 * </pre>
                 * 
garciay's avatar
garciay committed
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RF_CDF_EC_01
juvancic's avatar
juvancic committed
                 */
garciay's avatar
garciay committed
                testcase TC_RF_CDF_EC_01() runs on DiameterRfRo system TestAdapter { 
juvancic's avatar
juvancic committed
                    // Local variables
                    var DiameterRfRo v_diameterRf_ctf;
                    // Test control
pintar's avatar
pintar committed
                    if (not (PICS_RF_CDF_IUT and PICS_RF_CDF_EVENT_BASED_CHARGING)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RF_CDF_IUT and PICS_RF_CDF_EVENT_BASED_CHARGING' shall be set to true for executing the TC. ***"); 
juvancic's avatar
juvancic committed
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Rf_ctfUp(v_diameterRf_ctf);
                    
                    // Start
garciay's avatar
garciay committed
                    v_diameterRf_ctf.start(f_TC_RF_CDF_EC_01());
juvancic's avatar
juvancic committed
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Rf_ctfDown(v_diameterRf_ctf);
                    
garciay's avatar
garciay committed
                } // End of testcase TC_RF_CDF_EC_01
juvancic's avatar
juvancic committed

                /**
                 * @desc    Verify that the IUT can successfully process Duplicate Detection AC-Request [Interim] where Session Based Charging is used
                 * <pre>
                 * Pics Selection: PICS_CDF_IUT and PICS_SESSION_BASED_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an AC-Request 
                 *              containing Diameter-Header
                 *                  containing Command-Flags
                 *                      containing T-flag
                 *                          indicating value '1'
juvancic's avatar
juvancic committed
                 *              containing an Accounting-Record-Type AVP
                 *                  indicating INTERIM_RECORD
                 *              containing an Event-Timestamp AVP
juvancic's avatar
juvancic committed
                 *        }
                 *        then {
                 *            the IUT sends a AC-Response 
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                not containing an Experimental-Result AVP
                 *                containing an Accounting-Record-Type AVP
                 *                    indicating EVENT_RECORD
                 *                containing an Accounting-Record-Number AVP
                 *        }
                 *    }
                 * </pre>
                 * 
garciay's avatar
garciay committed
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RF_CDF_EC_02
juvancic's avatar
juvancic committed
                 */
garciay's avatar
garciay committed
                testcase TC_RF_CDF_EC_02() runs on DiameterRfRo system TestAdapter { 
juvancic's avatar
juvancic committed
                    // Local variables
                    var DiameterRfRo v_diameterRf_ctf;
                    // Test control
pintar's avatar
pintar committed
                    if (not (PICS_RF_CDF_IUT and PICS_RF_CDF_SESSION_BASED_CHARGING)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RF_CDF_IUT and PICS_RF_CDF_SESSION_BASED_CHARGING' shall be set to true for executing the TC. ***"); 
juvancic's avatar
juvancic committed
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Rf_ctfUp(v_diameterRf_ctf);
                    
                    // Start
garciay's avatar
garciay committed
                    v_diameterRf_ctf.start(f_TC_RF_CDF_EC_02());
juvancic's avatar
juvancic committed
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Rf_ctfDown(v_diameterRf_ctf);
                    
garciay's avatar
garciay committed
                } // End of testcase TC_RF_CDF_EC_02
juvancic's avatar
juvancic committed
                
pintar's avatar
pintar committed
            } // End of group ErrorCasses
            
pintar's avatar
pintar committed
        } // End of group TP_RF_CDF_Role
        
        // 5.2.2.2. CTF Role
        group TP_RF_CTF_Role {
            // 5.2.2.2.2 Message Syntax
juvancic's avatar
juvancic committed
            group TP_RF_CTF_MS {
pintar's avatar
pintar committed
                
                /**
                 * @desc    Verify that the IUT can send an AC-Request to indicate a Charging Data Transfer.
                 * <pre>
juvancic's avatar
juvancic committed
                 * Pics Selection: PICS_RF_CTF_IUT
pintar's avatar
pintar committed
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is requested to indicate a request for Charging Data Transfer
                 *         }
                 *         then {
                 *             the IUT sends an AC-Request 
                 *                 containing a Session-ID AVP
                 *                 containing an Origin-Host AVP
                 *                 containing an Origin-Realm AVP
                 *                 containing a Destination-Realm AVP
                 *                 containing an Accounting-Record-Type AVP
                 *                 containing an Accounting-Record-Number AVP
                 *                 containing an Acct-Application-Id AVP
                 *                     indicating the value 3
                 *         }
                 *     }
pintar's avatar
pintar committed
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RF_CTF_MS_01
pintar's avatar
pintar committed
                 */
                testcase TC_RF_CTF_MS_01() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
pintar's avatar
pintar committed
                    var DiameterRfRo v_diameterRf_cdf;
pintar's avatar
pintar committed
                    
                    // Test control
juvancic's avatar
juvancic committed
                    if (not PICS_RF_CTF_IUT) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RF_CTF_IUT' shall be set to true for executing the TC. ***"); 
pintar's avatar
pintar committed
                        stop;
                    }
                    
                    // Test component configuration
pintar's avatar
pintar committed
                    f_cf_1Rf_cdfUp(v_diameterRf_cdf);
pintar's avatar
pintar committed
                    // Start
                    v_diameterRf_cdf.start(f_TC_CTF_MS_01());
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
pintar's avatar
pintar committed
                    f_cf_1Rf_cdfDown(v_diameterRf_cdf)
pintar's avatar
pintar committed
                    
pintar's avatar
pintar committed
                } // End of testcase TC_RF_CTF_MS_01
juvancic's avatar
juvancic committed
                
                /**
                 * @desc    Verify that the IUT can send an AC-Request with correct Diameter-Header parameters to indicate a Charging Data Transfer with valid Diameter-Header parameters.
                 * <pre>
                 * Pics Selection: PICS_RF_CTF_IUT
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is requested to indicate a request for Charging Data Transfer
                 *         }
                 *         then {
                 *             the IUT sends an AC-Request
                 *                 containing a Diameter-Header
                 *                 containing a Version
                 *                     indicating value '1'
                 *                 containing a Command-Flags
                 *                     containing T bit
                 *                         indicating value '0'
                 *                     containing E bit
                 *                         indicating value '0'
                 *                     containing r bits
                 *                         indicating value '0000'
                 *         }
                 *     }
juvancic's avatar
juvancic committed
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RF_CTF_MS_02
juvancic's avatar
juvancic committed
                 */
                testcase TC_RF_CTF_MS_02() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
pintar's avatar
pintar committed
                    var DiameterRfRo v_diameterRf_cdf;
juvancic's avatar
juvancic committed
                    
                    // Test control
                    if (not PICS_RF_CTF_IUT) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RF_CTF_IUT' shall be set to true for executing the TC. ***"); 
juvancic's avatar
juvancic committed
                        stop;
                    }
                    
                    // Test component configuration
pintar's avatar
pintar committed
                    f_cf_1Rf_cdfUp(v_diameterRf_cdf);
juvancic's avatar
juvancic committed
                    
                    // Start
                    v_diameterRf_cdf.start(f_TC_CTF_MS_02());
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
pintar's avatar
pintar committed
                    f_cf_1Rf_cdfDown(v_diameterRf_cdf)
juvancic's avatar
juvancic committed
                    
pintar's avatar
pintar committed
                } // End of testcase TC_RF_CTF_MS_02
juvancic's avatar
juvancic committed
                
            } // End of group TP_RF_CTF_MS_Role
pintar's avatar
pintar committed
            // 5.2.2.2.3 Type of Charging 
juvancic's avatar
juvancic committed
            group TP_RF_CTF_TC {
juvancic's avatar
juvancic committed
                
                /**
                 * @desc    Verify that the IUT can successfully process an AC-Request [Event].
                 * <pre>
pintar's avatar
pintar committed
                 * Pics Selection: PICS_RF_CTF_IUT and PICS_RF_CTF_EVENT_BASED_CHARGING
juvancic's avatar
juvancic committed
                 * Initial conditions: 
                 *     with {
                 *        Preamble action: UE initiates an initial REGISTRATION procedure.
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT sends an AC-Request
                 *                 containing an Accounting-Record-Type AVP
                 *                     indicating EVENT_RECORD
                 *                 containing an Accounting-Record-Number AVP
                 *                 containing an Event-Timestamp AVP 
                 *                 containing Service-Information AVP
                 *                     containing at least one Subscription-ID AVP
                 *                         indicating the identification of the user
                 *                     optionally containing IMS-Information AVP
                 *                         containing Node-Functionality AVP
                 *                             indicating the value 3
                 *                     optionally containing Service-Generic-Information AVP
                 *                         indicating the service specific parameters
                 *                 optionally containing Service-Context-Id AVP
                 *         }
                 *         then {
                 *             the IUT receives an AC-Answer
                 *                 containing a Result-Code AVP
                 *                     indicating DIAMETER_SUCCESS
                 *                 not containing an Experimental-Result AVP
                 *                 containing an Accounting-Record-Type AVP
                 *                     indicating EVENT_RECORD
                 *             and the IUT accepts the message
                 *         }
                 *     }
juvancic's avatar
juvancic committed
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RF_CTF_TC_01
juvancic's avatar
juvancic committed
                 */
                testcase TC_RF_CTF_TC_01() runs on DiameterRfRo system TestAdapter { 
juvancic's avatar
juvancic committed
                    // Local variables
                    var DiameterRfRo v_diameterRf_cdf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
juvancic's avatar
juvancic committed
                    
                    // Test control
pintar's avatar
pintar committed
                    if (not (PICS_RF_CTF_IUT and PICS_RF_CTF_EVENT_BASED_CHARGING)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RF_CTF_IUT and PICS_RF_CTF_EVENT_BASED_CHARGING' shall be set to true for executing the TC. ***"); 
juvancic's avatar
juvancic committed
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Rf_1Gm_1Mw_cdfUp(v_diameterRf_cdf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRf_cdf.start(f_TC_CTF_TC_01());
                    if (PX_SIPsupport) {
                        if (PX_VA == 1){
                            v_imsComponent_ue.start(f_TC_CTF_TC_UE_01_VA1(p_cSeq_s));
                            v_imsComponent_cscf.start(f_TC_CTF_TC_CSCF_01_VA1(p_cSeq_s));
pintar's avatar
pintar committed
                        }
                        else if(PX_VA == 2){
                            v_imsComponent_ue.start(f_TC_CTF_TC_UE_01_VA2(p_cSeq_s));
                            v_imsComponent_cscf.start(f_TC_CTF_TC_CSCF_01_VA2(p_cSeq_s));
pintar's avatar
pintar committed
                        }
                        else if(PX_VA == 3){
                            v_imsComponent_ue.start(f_TC_CTF_TC_UE_01_VA3(p_cSeq_s));
                            v_imsComponent_cscf.start(f_TC_CTF_TC_CSCF_01_VA3(p_cSeq_s));
pintar's avatar
pintar committed
                        }
                        else if(PX_VA == 4){
                            v_imsComponent_ue.start(f_TC_CTF_TC_UE_01_VA4(p_cSeq_s));
                            v_imsComponent_cscf.start(f_TC_CTF_TC_CSCF_01_VA4(p_cSeq_s));
pintar's avatar
pintar committed
                        }
                        else {
                            log("Set correct value of PIXIT: PX_VA due to related test case!");
                        }
juvancic's avatar
juvancic committed
                    }
                    
                    // synchronize PTC on 1 sychronization points
pintar's avatar
pintar committed
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_tbDone, c_poDone});
juvancic's avatar
juvancic committed
                    
                    f_cf_1Rf_1Gm_1Mw_cdfDown(v_diameterRf_cdf, v_imsComponent_ue, v_imsComponent_cscf)
                    
pintar's avatar
pintar committed
                } // End of testcase TC_RF_CTF_TC_01
juvancic's avatar
juvancic committed
                
pintar's avatar
pintar committed
                /**
                 * @desc    Verify that the IUT can successfully process an AC-Request [Start].
                 * <pre>
                 * Pics Selection: PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        Preamble action: UE initiates an INVITE procedure.
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT sends an AC-Request
                 *                 containing an Accounting-Record-Type AVP
                 *                     indicating START_RECORD
                 *                 containing an Accounting-Record-Number AVP
                 *                 containing an Event-Timestamp AVP 
                 *                 containing Service-Information AVP
                 *                     indicating the service specific parameters
                 *         }
                 *         then {
                 *             the IUT receives an AC-Answer
                 *                 containing a Result-Code AVP
                 *                     indicating DIAMETER_SUCCESS
                 *                 not containing an Experimental-Result AVP
                 *                 containing an Accounting-Record-Type AVP
                 *                     indicating START_RECORD
                 *                 optionally containing an Acct-Interim-Interval AVP
                 *                     indicating the desired intermediate charging interval
                 *             and the IUT accepts the message
                 *         }
                 *     }
pintar's avatar
pintar committed
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RF_CTF_TC_02
pintar's avatar
pintar committed
                 */
                testcase TC_RF_CTF_TC_02() runs on DiameterRfRo system TestAdapter { 
pintar's avatar
pintar committed
                    // Local variables
                    var DiameterRfRo v_diameterRf_cdf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
pintar's avatar
pintar committed
                    
                    // Test control
                    if (not (PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Rf_1Gm_1Mw_cdfUp(v_diameterRf_cdf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRf_cdf.start(f_TC_CTF_TC_02());
                    if (PX_SIPsupport) {
                            v_imsComponent_ue.start(f_TC_CTF_TC_UE_02(p_cSeq_s));
                            v_imsComponent_cscf.start(f_TC_CTF_TC_CSCF_02(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_tbDone, c_poDone});
                    
                    f_cf_1Rf_1Gm_1Mw_cdfDown(v_diameterRf_cdf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RF_CTF_TC_02
                
                /**
                 * @desc    Verify that the time between several AC-Requests [Interim] 
                 *          received by the IUT is at least equal to the desired intermediate 
                 *          charging interval.
                 * <pre>
                 * Pics Selection: PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        Preamble action: UE establishes a call.
                 *     }
                 * Expected behaviour:
                 *      Ensure that {
                 *          the IUT sends an AC-Request
pintar's avatar
pintar committed
                 *              containing an Accounting-Record-Type AVP
                 *                  indicating START_RECORD
                 *              containing an Accounting-Record-Number AVP
                 *          the IUT receives an AC-Answer
pintar's avatar
pintar committed
                 *              containing an Accounting-Record-Type AVP
                 *                  indicating START_RECORD
                 *              containing an Accounting-Record-Number AVP
                 *              containing an Acct-Interim-Interval AVP
                 *                  containing the desired intermediate charging interval 
                 *                      indicating a value INTERIM_INTERVAL not equal to 0
                 *          the IUT sends periodically an AC-Request [Interim]
pintar's avatar
pintar committed
                 *              containing an Accounting-Record-Type AVP
                 *                  indicating INTERIM_RECORD
                 *              containing an Accounting-Record-Number AVP
                 *              containing a Service-Information AVP
                 *              containing an Event-Timestamp AVP
                 *          the IUT receives an AC-Answer
pintar's avatar
pintar committed
                 *              containing an Accounting-Record-Type AVP
                 *                  indicating INTERIM_RECORD
                 *              containing an Accounting-Record-Number AVP
                 *          the IUT accepts the message
                 *     }
pintar's avatar
pintar committed
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RF_CTF_TC_03
pintar's avatar
pintar committed
                 */
                testcase TC_RF_CTF_TC_03() runs on DiameterRfRo system TestAdapter { 
pintar's avatar
pintar committed
                    // Local variables
                    var DiameterRfRo v_diameterRf_cdf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
pintar's avatar
pintar committed
                    
                    // Test control
                    if (not (PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Rf_1Gm_1Mw_cdfUp(v_diameterRf_cdf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRf_cdf.start(f_TC_CTF_TC_03());
                    if (PX_SIPsupport) {
                            v_imsComponent_ue.start(f_TC_CTF_TC_UE_03(p_cSeq_s));
                            v_imsComponent_cscf.start(f_TC_CTF_TC_CSCF_03(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_tbDone, c_poDone});
                    
                    f_cf_1Rf_1Gm_1Mw_cdfDown(v_diameterRf_cdf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RF_CTF_TC_03
                
                /**
                 * @desc    Verify that the IUT can successfully process an AC-Request [Interim].
                 * <pre>
                 * Pics Selection: PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        Preamble action: UE establishes a call.
                 *     }
                 * Expected behaviour:
                 *      Ensure that {
                 *          the IUT sends an AC-Request
pintar's avatar
pintar committed
                 *              containing an Accounting-Record-Type AVP
                 *                  indicating START_RECORD
                 *              containing an Accounting-Record-Number AVP
                 *          the IUT receives an AC-Answer
pintar's avatar
pintar committed
                 *              containing a Result-Code AVP
                 *                  indicating DIAMETER_SUCCESS
                 *              not containing an Experimental-Result AVP
                 *              containing an Accounting-Record-Type AVP
                 *                  indicating START_RECORD
                 *              containing an Accounting-Record-Number AVP
                 *          the IUT receives SIP 200 OK (reInvite)
                 *          the IUT sends an AC-Request [Interim]
pintar's avatar
pintar committed
                 *              containing an Accounting-Record-Type AVP
                 *                  indicating INTERIM_RECORD
                 *              containing an Accounting-Record-Number AVP
                 *              containing a Service-Information AVP
                 *              containing an Event-Timestamp AVP
                 *          the IUT receives an AC-Answer
pintar's avatar
pintar committed
                 *              containing a Result-Code AVP
                 *                  indicating DIAMETER_SUCCESS
                 *              not containing an Experimental-Result AVP
                 *              containing an Accounting-Record-Type AVP
                 *                  indicating INTERIM_RECORD
                 *              containing an Accounting-Record-Number AVP
                 *          the IUT accepts the message
                 *     }
pintar's avatar
pintar committed
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RF_CTF_TC_04
pintar's avatar
pintar committed
                 */
                testcase TC_RF_CTF_TC_04() runs on DiameterRfRo system TestAdapter { 
pintar's avatar
pintar committed
                    // Local variables
                    var DiameterRfRo v_diameterRf_cdf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
pintar's avatar
pintar committed
                    
                    // Test control
                    if (not (PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Rf_1Gm_1Mw_cdfUp(v_diameterRf_cdf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRf_cdf.start(f_TC_CTF_TC_04());
                    if (PX_SIPsupport) {
                            v_imsComponent_ue.start(f_TC_CTF_TC_UE_04(p_cSeq_s));
                            v_imsComponent_cscf.start(f_TC_CTF_TC_CSCF_04(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_tbDone, c_poDone});
                    
                    f_cf_1Rf_1Gm_1Mw_cdfDown(v_diameterRf_cdf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RF_CTF_TC_04
                
                /**
                 * @desc    Verify that the IUT can successfully process an AC-Request [Stop].
                 * <pre>
                 * Pics Selection: PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        Preamble action: UE establishes a call.
                 *     }
                 * Expected behaviour:
                 *      Ensure that {
                 *         when {
                 *             the IUT sends an AC-Request
                 *                 containing an Accounting-Record-Type AVP
                 *                     indicating STOP_RECORD
                 *                 containing an Accounting-Record-Number AVP
                 *                 containing an Acct-Application-Id AVP
                 *                     indicating the value 3
                 *         }
                 *         then {
                 *             the IUT receives an AC-Answer
                 *                 containing a Result-Code AVP
                 *                     indicating DIAMETER_SUCCESS
                 *                 not containing an Experimental-Result AVP
                 *                 containing an Accounting-Record-Type AVP
                 *                     indicating STOP_RECORD
                 *             and the IUT accepts the message
                 *         }
                 *     }
pintar's avatar
pintar committed
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RF_CTF_TC_05
pintar's avatar
pintar committed
                 */
                testcase TC_RF_CTF_TC_05() runs on DiameterRfRo system TestAdapter { 
pintar's avatar
pintar committed
                    // Local variables
                    var DiameterRfRo v_diameterRf_cdf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
pintar's avatar
pintar committed
                    
                    // Test control
                    if (not (PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Rf_1Gm_1Mw_cdfUp(v_diameterRf_cdf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRf_cdf.start(f_TC_CTF_TC_05());
                    if (PX_SIPsupport) {
                            v_imsComponent_ue.start(f_TC_CTF_TC_UE_05(p_cSeq_s));
                            v_imsComponent_cscf.start(f_TC_CTF_TC_CSCF_05(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_tbDone, c_poDone});
                    
                    f_cf_1Rf_1Gm_1Mw_cdfDown(v_diameterRf_cdf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RF_CTF_TC_05
                
            } // End of group TP_RF_CTF_TC_Role
pintar's avatar
pintar committed
            // 5.2.2.2.4 Error cases
juvancic's avatar
juvancic committed
            group TP_RF_CTF_EC {
pintar's avatar
pintar committed
                
                /**
                 * @desc    Verify that the IUT sends periodically Device-Watchdog-Request messages to the CDF.
                 * <pre>
                 * Pics Selection: PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        Preamble action: ACR, ACA [Start]
                 *     }
                 * Expected behaviour:
                 *      Ensure that {
                 *         when {
                 *             sends a DW-Request
                 *                 containing a Diameter-Header
                 *                     containing a Hop-by-Hop AVP
                 *                     containing a End-To-End AVP
                 *                 containing an Origin-Host AVP
                 *                 containing an Origin-Realm AVP
                 *         }
                 *         then {
                 *             the IUT receives a DW-Answer
                 *                 containing a Diameter-Header
                 *                     containing a Hop-by-Hop AVP
                 *                     containing a End-To-End AVP
                 *                 containing a Result-Code AVP
                 *                     indicating DIAMETER_SUCCESS
                 *                 containing an Origin-Host AVP
                 *                 containing an Origin-Realm AVP
                 *             and the IUT accepts the message
                 *         }
                 *     }
pintar's avatar
pintar committed
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RF_CTF_EC_01
pintar's avatar
pintar committed
                 */
                testcase TC_RF_CTF_EC_01() runs on DiameterRfRo system TestAdapter { 
pintar's avatar
pintar committed
                    // Local variables
                    var DiameterRfRo v_diameterRf_cdf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
pintar's avatar
pintar committed
                    
                    // Test control
                    if (not (PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Rf_1Gm_1Mw_cdfUp(v_diameterRf_cdf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRf_cdf.start(f_TC_CTF_EC_01());
                    if (PX_SIPsupport) {
                            v_imsComponent_ue.start(f_TC_CTF_EC_UE_01(p_cSeq_s));
                            v_imsComponent_cscf.start(f_TC_CTF_EC_CSCF_01(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_tbDone, c_poDone});
                    
                    f_cf_1Rf_1Gm_1Mw_cdfDown(v_diameterRf_cdf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RF_CTF_EC_01
                
                /**
                 * @desc    Verify that on connection failure with the pimary CDF, the IUT sends an AC-Request [Interim] to the secondary CDF.
                 * <pre>
                 * Pics Selection: PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING and PICS_RF_CTF_CONNECTION_TO_BACKUP_CDF
                 * Initial conditions: 
                 *     with {
                 *        Preamble action:  ACR, ACA [Start] and ACR, ACA [Interim] are exchanged.
                 *     }
                 * Expected behaviour:
                 *      Ensure that {
                 *         when {
                 *             the IUT is requested to indicate the CDF stop 
                 *         }
                 *         then {
                 *             the IUT sends an AC-Request [Interim] to the secondary CDF
                 *                 containing an Accounting-Record-Type AVP
                 *                     indicating INTERIM_RECORD
                 *                 containing an Accounting-Record-Number AVP
                 *                 containing Service-Information AVP
                 *                 containing an Event-Timestamp AVP 
                 *                     indicating a time orderd sequence
                 *             and the IUT receives an AC-Answer
                 *                 containing a Session-ID AVP
                 *                 containing a Result-Code AVP
                 *                     indicating DIAMETER_SUCCESS
                 *                 not containing an Experimental-Result AVP
                 *                 containing an Accounting-Record-Type AVP
                 *                 containing an Accounting-Record-Number AVP
                 *             and the IUT accepts the message
                 *         }
                 *     }
pintar's avatar
pintar committed
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RF_CTF_EC_02
pintar's avatar
pintar committed
                 */
                testcase TC_RF_CTF_EC_02() runs on DiameterRfRo system TestAdapter { 
pintar's avatar
pintar committed
                    // Local variables
                    var DiameterRfRo v_diameterRf_cdf, v_diameterRf_cdf2;
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
pintar's avatar
pintar committed
                    
                    // Test control
                    if (not (PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING and PICS_RF_CTF_CONNECTION_TO_BACKUP_CDF)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING and PICS_RF_CTF_CONNECTION_TO_BACKUP_CDF' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_2Rf_1Gm_1Mw_cdfUp(v_diameterRf_cdf, v_diameterRf_cdf2, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRf_cdf.start(f_TC_CTF_EC_02());
                    v_diameterRf_cdf2.start(f_TC_CTF_EC_02_2ndCDF());
                    if (PX_SIPsupport) {
                            v_imsComponent_ue.start(f_TC_CTF_EC_UE_02(p_cSeq_s));
                            v_imsComponent_cscf.start(f_TC_CTF_EC_CSCF_02(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_tbDone, c_poDone});
                    
                    f_cf_2Rf_1Gm_1Mw_cdfDown(v_diameterRf_cdf, v_diameterRf_cdf2, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RF_CTF_EC_02
                
                /**
                 * @desc    Verify that on connection restored, the IUT sends an AC-Request [Interim] to the primary CDF.
                 * <pre>
                 * Pics Selection: PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING and PICS_RF_CTF_CONNECTION_TO_BACKUP_CDF
                 * Initial conditions: 
                 *     with {
                 *        Preamble action:  ACR, ACA [Start] and ACR, ACA [Interim] are exchanged.
                 *     }
                 * Expected behaviour:
                 *      Ensure that {
                 *         when {
                 *             the IUT sends an AC-Request [Interim] to the primary CDF
                 *                 containing an Accounting-Record-Type AVP
                 *                     indicating INTERIM_RECORD
                 *                 containing an Accounting-Record-Number AVP
                 *                 containing Service-Information AVP
                 *                 containing an Event-Timestamp AVP 
                 *                     indicating a time orderd sequence
                 *         }
                 *         then {
                 *             the IUT receives an AC-Answer
                 *                 containing a Session-ID AVP
                 *                 containing a Result-Code AVP
                 *                     indicating DIAMETER_SUCCESS
                 *                 not containing an Experimental-Result AVP
                 *                 containing an Accounting-Record-Type AVP
                 *                 containing an Accounting-Record-Number AVP
                 *             and the IUT accepts the message
                 *         }
                 *     }
pintar's avatar
pintar committed
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RF_CTF_EC_03
pintar's avatar
pintar committed
                 */
                testcase TC_RF_CTF_EC_03() runs on DiameterRfRo system TestAdapter { 
pintar's avatar
pintar committed
                    // Local variables
                    var DiameterRfRo v_diameterRf_cdf, v_diameterRf_cdf2;
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
pintar's avatar
pintar committed
                    
                    // Test control
                    if (not (PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING and PICS_RF_CTF_CONNECTION_TO_BACKUP_CDF)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING and PICS_RF_CTF_CONNECTION_TO_BACKUP_CDF' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_2Rf_1Gm_1Mw_cdfUp(v_diameterRf_cdf, v_diameterRf_cdf2, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRf_cdf.start(f_TC_CTF_EC_03());
                    v_diameterRf_cdf2.start(f_TC_CTF_EC_03_2ndCDF());
                    if (PX_SIPsupport) {
garciay's avatar
garciay committed
                        v_imsComponent_ue.start(f_TC_CTF_EC_UE_03(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_CTF_EC_CSCF_03(p_cSeq_s));
pintar's avatar
pintar committed
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_tbDone, c_poDone});
                    
                    f_cf_2Rf_1Gm_1Mw_cdfDown(v_diameterRf_cdf, v_diameterRf_cdf2, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RF_CTF_EC_03
                
                /**
                 * @desc    Verify that on communication failure, the IUT stores generated accounting 
                 *          data in a non-volatile memory and, on communication restored, sends them to 
                 *          the CDF, in the order they were stored in the buffer.
                 * <pre>
                 * Pics Selection: PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING and 
                 *                 PICS_RF_CTF_ERROR_CASES_ACR_BUFFERING and NOT PICS_RF_CTF_CONNECTION_TO_BACKUP_CDF
                 * Initial conditions: 
                 *     with {
                 *        Preamble action: ACR, ACA [Start]
                 *     }
                 * Expected behaviour:
                 *      Ensure that {
                 *         when {
                 *             the IUT is requested to indicate the CDF restart
                 *         }
                 *         then {
                 *             sends the buffered AC-Request [Interim]
                 *                 containing an Accounting-Record-Type AVP
                 *                     indicating INTERIM_RECORD
                 *                 containing an Accounting-Record-Number AVP
                 *                 containing a Service-Information AVP
                 *                 containing an Event-Timestamp AVP
                 *                     indicating a time orderd sequence
                 *             and the IUT receives one AC-Answer for each buffered AC-Request [Interim]
                 *                 containing a Session-ID AVP
                 *                 containing a Result-Code AVP
                 *                     indicating DIAMETER_SUCCESS
                 *                 not containing an Experimental-Result AVP
                 *                 containing an Accounting-Record-Type AVP
                 *                 containing an Accounting-Record-Number AVP
                 *        }
                 *     }
pintar's avatar
pintar committed
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RF_CTF_EC_04
pintar's avatar
pintar committed
                 */
                testcase TC_RF_CTF_EC_04() runs on DiameterRfRo system TestAdapter { 
pintar's avatar
pintar committed
                    // Local variables
                    var DiameterRfRo v_diameterRf_cdf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
pintar's avatar
pintar committed
                    
                    // Test control
                    if (not (PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING and 
                             PICS_RF_CTF_ERROR_CASES_ACR_BUFFERING and not PICS_RF_CTF_CONNECTION_TO_BACKUP_CDF)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING and PICS_RF_CTF_ERROR_CASES_ACR_BUFFERING and not PICS_RF_CTF_CONNECTION_TO_BACKUP_CDF' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Rf_1Gm_1Mw_cdfUp(v_diameterRf_cdf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRf_cdf.start(f_TC_CTF_EC_04());
                    if (PX_SIPsupport) {
garciay's avatar
garciay committed
                        v_imsComponent_ue.start(f_TC_CTF_EC_UE_04(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_CTF_EC_CSCF_04(p_cSeq_s));
pintar's avatar
pintar committed
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_tbDone, c_poDone});
                    
                    f_cf_1Rf_1Gm_1Mw_cdfDown(v_diameterRf_cdf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RF_CTF_EC_04
                
                /**
                 * @desc    Verify that the IUT retransmits an unacknowladged AC-Request [Interim] (T-flag).
                 * <pre>
                 * Pics Selection: PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING and 
                 *                 PICS_RF_CTF_ERROR_CASES_ACR_RETRANSMISSION 
                 * Initial conditions: 
                 *     with {
                 *        Preamble action: ACR, ACA [Start] and ACR, ACA [Interim] are exchanged and the 
                 *        CDF stops communication with the IUT.
                 *     }
                 * Expected behaviour:
                 *      Ensure that {
                 *          when {
                 *              the IUT is requested to indicate not having received an AC-Answer [Interim]
                 *          } 
                 *          then {
                 *              send again an AC-Request [Interim]
                 *                  containing a Diameter-Header
                 *                      containing a Command-Flags
                 *                          containing a T-flag
                 *                              indicating value '1'
                 *                  containing an Accounting-Record-Type AVP
                 *                      indicating INTERIM_RECORD
                 *                  containing an Accounting-Record-Number AVP
                 *                  containing a Service-Information AVP
                 *                  containing an Event-Timestamp AVP
                 *                      indicating a time orderd sequence
                 *              and the IUT receives an AC-Answer
                 *                  containing a Session-ID AVP
                 *                  containing a Result-Code AVP
                 *                      indicating DIAMETER_SUCCESS
                 *                  not containing an Experimental-Result AVP
                 *                  containing an Accounting-Record-Type AVP
                 *                  containing an Accounting-Record-Number AVP
                 *          }
                 *     }
pintar's avatar
pintar committed
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RF_CTF_EC_05
pintar's avatar
pintar committed
                 */
                testcase TC_RF_CTF_EC_05() runs on DiameterRfRo system TestAdapter { 
pintar's avatar
pintar committed
                    // Local variables
                    var DiameterRfRo v_diameterRf_cdf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
pintar's avatar
pintar committed
                    
                    // Test control
                    if (not (PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING and 
                             PICS_RF_CTF_ERROR_CASES_ACR_RETRANSMISSION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING and PICS_RF_CTF_ERROR_CASES_ACR_RETRANSMISSION' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Rf_1Gm_1Mw_cdfUp(v_diameterRf_cdf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRf_cdf.start(f_TC_CTF_EC_05());
                    if (PX_SIPsupport) {
garciay's avatar
garciay committed
                        v_imsComponent_ue.start(f_TC_CTF_EC_UE_05(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_CTF_EC_CSCF_05(p_cSeq_s));
pintar's avatar
pintar committed
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_tbDone, c_poDone});
                    
                    f_cf_1Rf_1Gm_1Mw_cdfDown(v_diameterRf_cdf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RF_CTF_EC_05
                
                /**
                 * @desc    Verify that on reaching the maximum of retransmissions of unacknowladged 
                 *          AC-Requests [Interim] (T-flag), the IUT executes the CDF connection failure procedure.
                 * <pre>
                 * Pics Selection: PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING and 
                 *                 PICS_RF_CTF_ERROR_CASES_ACR_BUFFERING 
                 * Initial conditions: 
                 *     with {
                 *        Preamble action: ACR, ACA [Start] and ACR, ACA [Interim] are exchanged and the 
                 *        CDF stops communication with the IUT.
                 *     }
                 * Expected behaviour:
                 *      Ensure that {
                 *          when {
                 *              on maximum retransmission of AC-Request [Interim]
                 *              the IUT is requested to indicate the CDF restart
                 *          }
                 *          then {
                 *              sends the buffered AC-Request [Interim]
                 *                  containing an Accounting-Record-Type AVP
                 *                      indicating INTERIM_RECORD
                 *                  containing an Accounting-Record-Number AVP
                 *                  containing a Service-Information AVP
                 *                  containing an Event-Timestamp AVP
                 *                      indicating a time orderd sequence
                 *              and the IUT receives one AC-Answer for each buffered AC-Request [Interim]
                 *                  containing a Session-ID AVP
                 *                  containing a Result-Code AVP
                 *                      indicating DIAMETER_SUCCESS
                 *                  not containing an Experimental-Result AVP
                 *                  containing an Accounting-Record-Type AVP
                 *                  containing an Accounting-Record-Number AVP
                 *              and the IUT accepts the messages
                 *          }
                 *     }
pintar's avatar
pintar committed
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RF_CTF_EC_06
pintar's avatar
pintar committed
                 */
                testcase TC_RF_CTF_EC_06() runs on DiameterRfRo system TestAdapter { 
pintar's avatar
pintar committed
                    // Local variables
                    var DiameterRfRo v_diameterRf_cdf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
pintar's avatar
pintar committed
                    
                    // Test control
                    if (not (PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING and 
                             PICS_RF_CTF_ERROR_CASES_ACR_BUFFERING)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RF_CTF_IUT and PICS_RF_CTF_SESSION_BASED_CHARGING and PICS_RF_CTF_ERROR_CASES_ACR_BUFFERING' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Rf_1Gm_1Mw_cdfUp(v_diameterRf_cdf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRf_cdf.start(f_TC_CTF_EC_06());
                    if (PX_SIPsupport) {
garciay's avatar
garciay committed
                        v_imsComponent_ue.start(f_TC_CTF_EC_UE_06(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_CTF_EC_CSCF_06(p_cSeq_s));
pintar's avatar
pintar committed
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_tbDone, c_poDone});
                    
                    f_cf_1Rf_1Gm_1Mw_cdfDown(v_diameterRf_cdf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RF_CTF_EC_06
                
            } // End of group TP_RF_CTF_EC_Role
            
pintar's avatar
pintar committed
        } // End of group TP_RF_CTF_Role
        
    } // End of group TP_RFRole
pintar's avatar
pintar committed

    group TP_RO_Role {
juvancic's avatar
juvancic committed
        //5.2.3.1. OCF Role
        group TP_RO_OCF_Role {
juvancic's avatar
juvancic committed
            // 5.2.3.1.2 Message Syntax 
            group TP_RO_OCF_MS {
                
                /**
                 * @desc    Verify that the IUT can successfully process all mandatory AVPs in a CC-Request received due to Charging Data Transfer.
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a Session-ID AVP
                 *                containing an Origin-Host AVP
                 *                containing an Origin-Realm AVP
                 *                containing a Destination-Realm AVP
                 *                containing an Auth-Application-Id AVP
                 *                    indicating the value 4
                 *                containing a Service-Context-Id AVP
                 *                containing a CC-Request-Type AVP
                 *                containing a CC-Request-Number AVP
garciay's avatar
garciay committed
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Session-ID AVP
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing an Origin-Host AVP
                 *                containing an Origin-Realm AVP
                 *                containing an Auth-Application-Id AVP
                 *                containing a CC-Request-Type AVP
                 *                containing a CC-Request-Number AVP.
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_MS_01
                 */
                testcase TC_RO_OCF_MS_01() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not PICS_RO_OCF_IUT) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_MS_01()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_MS_01
                
                /**
                 * @desc    Verify that the IUT can successfully process all mandatory AVPs in a CC-Request received due to Charging Data Transfer and responds with a valid CC-Answer message
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a Session-ID AVP
                 *                containing an Origin-Host AVP
                 *                containing an Origin-Realm AVP
                 *                containing a Destination-Realm AVP
                 *                containing an Auth-Application-Id AVP
                 *                    indicating the value 4
                 *                containing a Service-Context-Id AVP
                 *                containing a CC-Request-Type AVP
                 *                containing a CC-Request-Number AVP
garciay's avatar
garciay committed
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Diameter-Header
                 *                    containing a Version
                 *                        indicating value '1'
                 *                    containing a Command-Flags
                 *                        containing T bit
                 *                            indicating value '0'
                 *                        containing r bits
                 *                            indicating value '0000'.
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_MS_02
                 */
                testcase TC_RO_OCF_MS_02() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not PICS_RO_OCF_IUT) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_MS_02()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_MS_02
                
            } // End of group TP_RO_OCF_MS
            
juvancic's avatar
juvancic committed
            // 5.2.3.1.3 Type of Charging 
            group TP_RO_OCF_TC {
                
                /**
                 * @desc    Verify that the IUT can successfully process a CC-Request [Event] with direct debiting due to Immediate Event Charging
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating DIRECT_DEBITING
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    (containing a Requested-Service-Unit AVP and/or
                 *                    containing a Service-Identifier AVP)
garciay's avatar
garciay committed
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Granted-Service-Unit AVP
                 *                        indicating debites units
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_TC_01
                 */
                testcase TC_RO_OCF_TC_01() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_TC_01()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_TC_01
                
                /**
                 * @desc    Verify that the IUT can successfully process a CC-Request [Event] with price enquiry due to Immediate Event Charging
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating PRICE_ENQUIRY
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Service-Identifier AVP
garciay's avatar
garciay committed
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
garciay's avatar
garciay committed
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a Cost-Information AVP
                 *                    containing a Unit-Value AVP
                 *                        containing a Value-Digits AVP
                 *                    containing a Currency-Code AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_TC_02
                 */
                testcase TC_RO_OCF_TC_02() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_TC_02()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_TC_02
                
                /**
                 * @desc    Verify that the IUT can successfully process a CC-Request [Event] with check balance due to Immediate Event Charging
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating CHECK BALANCE
garciay's avatar
garciay committed
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
garciay's avatar
garciay committed
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a Remaining-Balance AVP
                 *                    containing a Unit-Value AVP
                 *                        containing a Value-Digits AVP
                 *                    containing a Currency-Code AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_TC_03
                 */
                testcase TC_RO_OCF_TC_03() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_TC_03()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_TC_03
                
                /**
                 * @desc    Verify that the IUT can successfully process a CC-Request [Event] with refund account due to Immediate Event Charging
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING
                 * Initial conditions: 
                 *     with {
garciay's avatar
garciay committed
                 *        CCR,CCA [Event] direct debeting action are exchanged
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating REFUND ACCOUNT
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    (containing a Requested-Service-Unit AVP and/or
                 *                    containing a Service-Identifier AVP)
garciay's avatar
garciay committed
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Granted-Service-Unit AVP
                 *                        indicating refunded units
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_TC_04
                 */
                testcase TC_RO_OCF_TC_04() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_TC_04()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_TC_04
                
garciay's avatar
garciay committed
                /**
                 * @desc    Verify that the IUT can successfully process a CC-Request [Initial] to reserve units due to Event Charging with Unit Reservation
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Requested-Service-Unit
garciay's avatar
garciay committed
                 *        }
garciay's avatar
garciay committed
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Granted-Service-Unit AVP
                 *                        indicating reserved units
                 *                optionally containing a Cost-Information AVP
                 *                    containing Unit-Value AVP
                 *                        containing Value-Digits AVP
                 *                    containing Currency-Code AVP
                 *                optionally containing a Remaining-Balance AVP
                 *                    containing Unit-Value AVP
                 *                        containing Value-Digits AVP
                 *                    containing Currency-Code AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_TC_05
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_TC_05() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION' shall be set to true for executing the TC. ***"); 
garciay's avatar
garciay committed
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_TC_05()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_TC_05
                
                /**
                 * @desc    Verify that the IUT can successfully process a CC-Request [Termination] to debit units due to Event Charging with Unit Reservation
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        CCR,CCA [Initial] are exchanged
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
garciay's avatar
garciay committed
                 *                    indicating TERMINATION_REQUEST
garciay's avatar
garciay committed
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Used-Service-Unit
garciay's avatar
garciay committed
                 *        }
garciay's avatar
garciay committed
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
garciay's avatar
garciay committed
                 *                    indicating TERMINATION_REQUEST
garciay's avatar
garciay committed
                 *                optionally containing a Cost-Information AVP
                 *                    containing Unit-Value AVP
                 *                        containing Value-Digits AVP
                 *                    containing Currency-Code AVP
                 *                optionally containing a Remaining-Balance AVP
                 *                    containing Unit-Value AVP
                 *                        containing Value-Digits AVP
                 *                    containing Currency-Code AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_TC_06
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_TC_06() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION' shall be set to true for executing the TC. ***"); 
garciay's avatar
garciay committed
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_TC_06()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_TC_06
                
                /**
                 * @desc    Verify that the IUT can successfully process a CC-Request [Initial] to reserve units due to Session Charging with Unit Reservation
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Requested-Service-Unit
garciay's avatar
garciay committed
                 *        }
garciay's avatar
garciay committed
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Granted-Service-Unit AVP
                 *                        indicating reserved units
                 *                optionally containing a Cost-Information AVP
                 *                    containing Unit-Value AVP
                 *                        containing Value-Digits AVP
                 *                    containing Currency-Code AVP
                 *                optionally containing a Remaining-Balance AVP
                 *                    containing Unit-Value AVP
                 *                        containing Value-Digits AVP
                 *                    containing Currency-Code AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_TC_07
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_TC_07() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION' shall be set to true for executing the TC. ***"); 
garciay's avatar
garciay committed
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_TC_07()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_TC_07
                
                /**
                 * @desc    Verify that the IUT can successfully process a CC-Request [Update] to reserve units and debit units due to Session Charging with Unit Reservation
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        CCR,CCA [Initial] are exchanged
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Used-Service-Unit
garciay's avatar
garciay committed
                 *        }
garciay's avatar
garciay committed
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Granted-Service-Unit AVP
                 *                        indicating reserved units
                 *                optionally containing a Cost-Information AVP
                 *                    containing Unit-Value AVP
                 *                        containing Value-Digits AVP
                 *                    containing Currency-Code AVP
                 *                optionally containing a Remaining-Balance AVP
                 *                    containing Unit-Value AVP
                 *                        containing Value-Digits AVP
                 *                    containing Currency-Code AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_TC_08
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_TC_08() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION' shall be set to true for executing the TC. ***"); 
garciay's avatar
garciay committed
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_TC_08()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_TC_08
                
                /**
                 * @desc    Verify that the IUT can successfully process a CC-Request [Termination] to debit units due to Session Charging with Unit Reservation
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        CCR,CCA [Initial] and CCR,CCA [Update] are exchanged
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating TERMINATION_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Used-Service-Unit
garciay's avatar
garciay committed
                 *        }
garciay's avatar
garciay committed
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating TERMINATION_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Granted-Service-Unit AVP
                 *                        indicating reserved units
                 *                optionally containing a Cost-Information AVP
                 *                    containing Unit-Value AVP
                 *                        containing Value-Digits AVP
                 *                    containing Currency-Code AVP
                 *                optionally containing a Remaining-Balance AVP
                 *                    containing Unit-Value AVP
                 *                        containing Value-Digits AVP
                 *                    containing Currency-Code AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_TC_09
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_TC_09() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION' shall be set to true for executing the TC. ***"); 
garciay's avatar
garciay committed
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_TC_09()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_TC_09
                
            } // End of group TP_RO_OCF_TC
garciay's avatar
garciay committed
            
juvancic's avatar
juvancic committed
            // 5.2.3.1.4 Error Casses 
            group TP_RO_OCF_EC {
garciay's avatar
garciay committed
                
                /**
                 * @desc    Verify that the IUT can successfully process Duplicate Detection due to Immediate Event Charging with Direct Debiting
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing Diameter-Header
                 *                    containing Command-Flags
                 *                        containing T-flag
                 *                            indicating value '1
garciay's avatar
garciay committed
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating DIRECT_DEBITING
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    (containing a Requested-Service-Unit AVP and/or
                 *                    containing a Service-Identifier AVP)
garciay's avatar
garciay committed
                 *        }
garciay's avatar
garciay committed
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Granted-Service-Unit AVP
                 *                        indicating debites units
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_EC_01
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_EC_01() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING' shall be set to true for executing the TC. ***"); 
garciay's avatar
garciay committed
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_EC_RO_OCF_EC_01()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_EC_01
                
garciay's avatar
garciay committed
                /**
                 * @desc    Verify that the IUT can successfully process Duplicate Detection due to Event Charging with Unit Reservation
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing Diameter-Header
                 *                    containing Command-Flags
                 *                        containing T-flag
                 *                            indicating value '1
garciay's avatar
garciay committed
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Requested-Service-Unit
garciay's avatar
garciay committed
                 *        }
garciay's avatar
garciay committed
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Granted-Service-Unit AVP
                 *                        indicating reserved units
                 *                optionally containing a Cost-Information AVP
                 *                    containing Unit-Value AVP
                 *                        containing Value-Digits AVP
                 *                    containing Currency-Code AVP
                 *                optionally containing a Remaining-Balance AVP
                 *                    containing Unit-Value AVP
                 *                        containing Value-Digits AVP
                 *                    containing Currency-Code AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_EC_02
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_EC_02() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION' shall be set to true for executing the TC. ***"); 
garciay's avatar
garciay committed
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_EC_RO_OCF_EC_02()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_EC_02
                
                /**
                 * @desc    Verify that the IUT can successfully process Duplicate Detection due to Event Charging with Unit Reservation
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        CCR,CCA [Initial] are exchanged
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing Diameter-Header
                 *                    containing Command-Flags
                 *                        containing T-flag
                 *                            indicating value '1
garciay's avatar
garciay committed
                 *                containing a CC-Request-Type AVP
                 *                    indicating TERMINATION_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Requested-Service-Unit
garciay's avatar
garciay committed
                 *        }
garciay's avatar
garciay committed
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating TERMINATION_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Granted-Service-Unit AVP
                 *                        indicating reserved units
                 *                optionally containing a Cost-Information AVP
                 *                    containing Unit-Value AVP
                 *                        containing Value-Digits AVP
                 *                    containing Currency-Code AVP
                 *                optionally containing a Remaining-Balance AVP
                 *                    containing Unit-Value AVP
                 *                        containing Value-Digits AVP
                 *                    containing Currency-Code AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_EC_03
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_EC_03() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION' shall be set to true for executing the TC. ***"); 
garciay's avatar
garciay committed
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_EC_RO_OCF_EC_03()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_EC_03
                
                /**
                 * @desc    Verify that the IUT can successfully process Duplicate Detection due to Session Charging with Unit Reservation
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        CCR, CCA [Initial] and CCR, CCA [Update] are exchanged and,
                 *        the OCF stops communication with the IUT
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing Diameter-Header
                 *                    containing Command-Flags
                 *                        containing T-flag
                 *                            indicating value '1
garciay's avatar
garciay committed
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Requested-Service-Unit
garciay's avatar
garciay committed
                 *        }
garciay's avatar
garciay committed
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Granted-Service-Unit AVP
                 *                        indicating reserved units
                 *                optionally containing a Cost-Information AVP
                 *                    containing Unit-Value AVP
                 *                        containing Value-Digits AVP
                 *                    containing Currency-Code AVP
                 *                optionally containing a Remaining-Balance AVP
                 *                    containing Unit-Value AVP
                 *                        containing Value-Digits AVP
                 *                    containing Currency-Code AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_EC_04
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_EC_04() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION' shall be set to true for executing the TC. ***"); 
garciay's avatar
garciay committed
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_EC_RO_OCF_EC_04()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_EC_04
                
            } // End of group TP_RO_OCF_EC
garciay's avatar
garciay committed
            
juvancic's avatar
juvancic committed
            // 5.2.3.1.5 Tariff Changes 
            group TP_RO_OCF_CH {
garciay's avatar
garciay committed
                
                /**
                 * @desc    Verify that the IUT supports Tariff-Change-Usage AVP and,
                 *          that the IUT can successfully process a CC-Request [Event] to perform tariff switch due to Immediate Event Charging and,
                 *          then responds with a CC-Answer with relavant Result-Code AVP and Tariff-Time-Change AVP
garciay's avatar
garciay committed
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating CHECK BALANCE
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing an Used-Service-Unit AVP
                 *                        containing a Tariff-Change-Usage AVP
                 *                            indicating UNIT_BEFORE_TARIFF_CHANGE
garciay's avatar
garciay committed
                 *        }
garciay's avatar
garciay committed
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Granted-Service-Unit AVP
                 *                        containing a Tariff-Time-Change AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_CH_01
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_CH_01() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING' shall be set to true for executing the TC. ***"); 
garciay's avatar
garciay committed
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_CH_RO_OCF_CH_01()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_CH_01
                
                /**
                 * @desc    Verify that the IUT supports Tariff-Change-Usage AVP and IUT can successfully process a CC-Request [Initial] to perform tariff switch due to Event Charging with Unit Reservation and,
                 *          then responds with a CC-Answer with relavant Result-Code AVP and Tariff-Time-Change AVP
garciay's avatar
garciay committed
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Requested-Service-Unit AVP
                 *                    containing an Used-Service-Unit AVP
                 *                        containing a Tariff-Change-Usage AVP
                 *                            indicating UNIT_BEFORE_TARIFF_CHANGE
garciay's avatar
garciay committed
                 *        }
garciay's avatar
garciay committed
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Granted-Service-Unit AVP
                 *                        containing a Tariff-Time-Change AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_CH_02
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_CH_02() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION' shall be set to true for executing the TC. ***"); 
garciay's avatar
garciay committed
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_CH_RO_OCF_CH_02()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_CH_02
                
                /**
                 * @desc    Verify that the IUT supports Tariff-Change-Usage AVP and IUT can successfully process a CC-Request [Initial] to perform tariff switch due to Session Charging with Unit Reservation and,
                 *          then responds with a CC-Answer with relavant Result-Code AVP and Tariff-Time-Change AVP
garciay's avatar
garciay committed
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Requested-Service-Unit AVP
                 *                    containing an Used-Service-Unit AVP
                 *                        containing a Tariff-Change-Usage AVP
                 *                            indicating UNIT_BEFORE_TARIFF_CHANGE
garciay's avatar
garciay committed
                 *        }
garciay's avatar
garciay committed
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Granted-Service-Unit AVP
                 *                        containing a Tariff-Time-Change AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_CH_03
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_CH_03() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION' shall be set to true for executing the TC. ***"); 
garciay's avatar
garciay committed
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_CH_RO_OCF_CH_03()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_CH_03
                
            } // End of group TP_RO_OCF_CH
garciay's avatar
garciay committed
            
juvancic's avatar
juvancic committed
            // 5.2.3.1.6 Re-Authorization 
            group TP_RO_OCF_RE {
garciay's avatar
garciay committed
                
                /**
                 * @desc    Verify that the IUT re-authorizes multiple active quotas during Session Charging with Unit Reservation
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_RE_AUTHORIZATION and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        CCR,CCA [Initial] and CCR,CCA [Update] are exchanged
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT is indicated for a need for re-authorization
garciay's avatar
garciay committed
                 *        }
garciay's avatar
garciay committed
                 *        then {
                 *            the IUT sends an RA-Request
                 *                containing a Session-ID AVP
                 *                containing an Origin-Host AVP
                 *                containing an Origin-Realm AVP
                 *                containing a Destination-Realm AVP
                 *                containing a Destination-Host AVP
                 *                containing an Auth-Application-Id AVP
                 *                    indicating the value 4
                 *                containing a Re-Auth-Request-Type AVP
                 *                    indicating AUTHORIZE_ONLY
                 *            and the IUT receives an RA-Answer
garciay's avatar
garciay committed
                 *                containing a Session-ID AVP
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing an Origin-Host AVP
                 *                    containing an Origin-Realm AVP
                 *            and the IUT accepts the message
garciay's avatar
garciay committed
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_RE_01
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_RE_01() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_RE_AUTHORIZATION and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_RE_AUTHORIZATION and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION' required for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_RE_01()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_RE_01
                
            } // End of group TP_RO_OCF_RE
garciay's avatar
garciay committed
            
juvancic's avatar
juvancic committed
            // 5.2.3.1.7 Failure Handling 
            group TP_RO_OCF_FH {
garciay's avatar
garciay committed
                
                /**
                 * @desc    Verify that the IUT can successfully transmit Credit-Control-Failure-Handling AVP (CCFH) with price enquiry
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating PRICE_ENQUIRY
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Service-Identifier AVP
garciay's avatar
garciay committed
                 *        }
garciay's avatar
garciay committed
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a Credit-Control-Failure-Handling AVP
                 *                    indicating what to do if the IUT has been temporarily prevented
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_FH_01
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_FH_01() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING' required for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_FH_01()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_FH_01
                
garciay's avatar
garciay committed
                /**
                 * @desc    Verify that the IUT can successfully transmit Direct-Debiting-Failure-Handling AVP (DDFH) with direct debiting
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING and PICS_RO_OCF_DDFH_TERMINATE_OR_BUFFER
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating DIRECT_DEBITING
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    (containing a Requested-Service-Unit AVP and/or
                 *                    containing a Service-Identifier AVP)
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a Direct-Debiting-Failure-Handling AVP
                 *                    indicating TERMINATE_OR_BUFFER
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_FH_02
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_FH_02() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING and PICS_RO_OCF_DDFH_TERMINATE_OR_BUFFER)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING and PICS_RO_OCF_DDFH_TERMINATE_OR_BUFFER' required for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_FH_02()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_FH_02
                
                /**
                 * @desc    Verify that the IUT can successfully transmit Direct-Debiting-Failure-Handling AVP (DDFH) with direct debiting
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING and PICS_RO_OCF_DDFH_CONTINUE
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating DIRECT_DEBITING
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    (containing a Requested-Service-Unit AVP and/or
                 *                    containing a Service-Identifier AVP)
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a Direct-Debiting-Failure-Handling AVP
                 *                    indicating CONTINUE
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_FH_03
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_FH_03() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING and PICS_RO_OCF_DDFH_CONTINUE)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_IMMEDIATE_EVENT_CHARGING and PICS_RO_OCF_DDFH_CONTINUE' required for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_FH_03()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_FH_03
                
            } // End of group TP_RO_OCF_FH
garciay's avatar
garciay committed
            
juvancic's avatar
juvancic committed
            // 5.2.3.1.8 Failover 
            group TP_RO_OCF_FA {
garciay's avatar
garciay committed
                
                /**
                 * @desc    Verify that the IUT can successfully transmit CC-Session-Failover AVP
                 * <pre>
garciay's avatar
garciay committed
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_FAILOVER
garciay's avatar
garciay committed
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Requested-Service-Unit AVP 
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a CC-Session-Failover AVP
                 *                    indicating FAILOVER_SUPPORTED
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_FA_01
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_FA_01() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
garciay's avatar
garciay committed
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_FAILOVER)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_FAILOVER' required for executing the TC. ***"); 
garciay's avatar
garciay committed
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_FA_01()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_FA_01
                
                /**
                 * @desc    Verify that the IUT can successfully transmit CC-Session-Failover AVP
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_FAILOVER
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating DIRECT_DEBITING
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    (containing a Requested-Service-Unit AVP and/or
                 *                    containing a Service-Identifier AVP)
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a CC-Session-Failover AVP
                 *                    indicating FAILOVER_SUPPORTED
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_FA_02
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_FA_02() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_FAILOVER)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_FAILOVER' required for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_FA_02()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_FA_02
                
            } // End of group TP_RO_OCF_FA
garciay's avatar
garciay committed
            
juvancic's avatar
juvancic committed
            // 5.2.3.1.9 Credit Pooling 
            group TP_RO_OCF_CP {
garciay's avatar
garciay committed
                
                /**
                 * @desc    Verify that the IUT can successfully process a CC-Request [Initial] to perform credit pooling due to Event Charging with Unit Reservation and then responds with a CC-Answer with related AVPs
                 * <pre>
garciay's avatar
garciay committed
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_CREDIT_POOLING
garciay's avatar
garciay committed
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a Multiple-Services-Indicator AVP
                 *                    indicating MULTIPLE_SERVICES_SUPPORTED
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a G-S-U-.Pool-Reference AVP
                 *                        containing a G-S-U-.Pool-Identifier AVP
                 *                        containing a CC-Unit-Type AVP
                 *                        containing a Unit-Value AVP
                 *                            containing a Value-Digits AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_CP_01
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_CP_01() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
garciay's avatar
garciay committed
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_CREDIT_POOLING)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_CREDIT_POOLING' required for executing the TC. ***"); 
garciay's avatar
garciay committed
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_CP_01()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_CP_01
                
                /**
                 * @desc    Verify that the IUT supports credit pooling and it can successfully process a CC-Request [Initial] to reserve units due to Session Charging with Unit Reservation
                 * <pre>
garciay's avatar
garciay committed
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_CREDIT_POOLING
garciay's avatar
garciay committed
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a Multiple-Services-Indicator AVP
                 *                    indicating MULTIPLE_SERVICES_SUPPORTED
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a G-S-U-.Pool-Reference AVP
                 *                        containing a G-S-U-.Pool-Identifier AVP
                 *                        containing a CC-Unit-Type AVP
                 *                        containing a Unit-Value AVP
                 *                            containing a Value-Digits AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_CP_02
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_CP_02() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
garciay's avatar
garciay committed
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_CREDIT_POOLING)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_CREDIT_POOLING' required for executing the TC. ***"); 
garciay's avatar
garciay committed
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_CP_02()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_CP_02
                
            } // End of group TP_RO_OCF_CP
garciay's avatar
garciay committed
            
juvancic's avatar
juvancic committed
            // 5.2.3.1.10 Other Procedures
            group TP_RO_OCF_OP {
garciay's avatar
garciay committed
                
garciay's avatar
garciay committed
                /**
                 * @desc    Verify that the IUT can specify an idle timeout associated with a granted quota
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_RE_AUTHORIZATION_QUOTA_HOLDING_TIME
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
garciay's avatar
garciay committed
                 *                containing a CC-Request-Number AVP
garciay's avatar
garciay committed
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
garciay's avatar
garciay committed
                 *                    containing a Quota-Holding-Time AVP
                 *                        indicating a non 0 value
garciay's avatar
garciay committed
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_OP_01
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_OP_01() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_RE_AUTHORIZATION_QUOTA_HOLDING_TIME)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_RE_AUTHORIZATION_QUOTA_HOLDING_TIME' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_OP_01()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_OP_01
                
garciay's avatar
garciay committed
                /**
                 * @desc    Verify that the IUT can successfully process a CC-Answer [Update] including various Trigger-Type AVPs and generate a credit re-authorization
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_RE_AUTHORIZATION_TRIGGER
                 * Initial conditions: 
                 *     with {
                 *        CCR,CCA [Initial] are exchanged
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a CC-Request-Number AVP
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Trigger AVP
                 *                        containing a Trigger-Type AVP
                 *                            indicating one of the possible values (7.2.235/236)
                 *             the IUT sends a CC-Request
                 *                containing a Session-ID AVP
                 *                containing an Origin-Host AVP
                 *                containing an Origin-Realm AVP
                 *                containing a Destination-Realm AVP
                 *                containing a Destination-HHost AVP
                 *                containing an Auth-Application-Id AVP
                 *                    indicating the value 4
                 *                containing a Re-Auth-Request-Type AVP
                 *                    indicating AUTHORIZE_ONLY
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_OP_02
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_OP_02() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_RE_AUTHORIZATION_TRIGGER)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_RE_AUTHORIZATION_TRIGGER' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_OP_02()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_OP_02
                
                /**
                 * @desc    Verify that the IUT can successfully reset triggers which were already set
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_RE_AUTHORIZATION_TRIGGER
                 * Initial conditions: 
                 *     with {
                 *        CCR,CCA [Initial] are exchanged
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a CC-Request-Number AVP
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Trigger AVP
                 *                        not containing a Trigger-Type AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_OP_03
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_OP_03() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_RE_AUTHORIZATION_TRIGGER)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_RE_AUTHORIZATION_TRIGGER' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_OP_03()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_OP_03
                
garciay's avatar
garciay committed
                /**
                 * @desc    Verify that the IUT can successfully indicate the remaining quota threshold by sending a CC-Answer with Time-Quota-Threshold AVP and trigger quota re-authorization
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_RE_AUTHORIZATION and PICS_RO_OCF_RE_AUTHORIZATION_QUOTA_HOLDING_TIME
                 * Initial conditions: 
                 *     with {
                 *        CCR,CCA [Initial] are exchanged
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a CC-Request-Number AVP
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Granted-Service-Units AVP
                 *                        containing a CC-Time AVP
                 *                    containing a Time-Quota-Threshold AVP
                 *             and the IUT sends an RA-Request
garciay's avatar
garciay committed
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_OP_04
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_OP_04() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_RE_AUTHORIZATION and PICS_RO_OCF_RE_AUTHORIZATION_QUOTA_HOLDING_TIME)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_RE_AUTHORIZATION and PICS_RO_OCF_RE_AUTHORIZATION_QUOTA_HOLDING_TIME' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_OP_04()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_OP_04
                
                /**
                 * @desc    Verify that the IUT can successfully indicate the remaining quota threshold by sending a CC-Answer with Volume-Quota-Threshold AVP and trigger quota re-authorization
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_RE_AUTHORIZATION and PICS_RO_OCF_RE_AUTHORIZATION_TRIGGER
                 * Initial conditions: 
                 *     with {
                 *        CCR,CCA [Initial] are exchanged
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a CC-Request-Number AVP
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Granted-Service-Units AVP
                 *                        containing a CC-Total-Octets AVP or
                 *                        containing a CC-Input-Octets AVP or
                 *                        containing a CC-Output-Octets AVP
                 *                    containing a Volume-Quota-Threshold AVP
                 *             and the IUT sends an RA-Request
garciay's avatar
garciay committed
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_OP_05
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_OP_05() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_RE_AUTHORIZATION and PICS_RO_OCF_RE_AUTHORIZATION_TRIGGER)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_RE_AUTHORIZATION and PICS_RO_OCF_RE_AUTHORIZATION_TRIGGER' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_OP_05()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_OP_05
                
                /**
                 * @desc    Verify that the IUT can successfully indicate the remaining quota threshold by sending a CC-Answer with Unit-Quota-Threshold AVP and trigger quota re-authorization
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_RE_AUTHORIZATION and PICS_RO_OCF_RE_AUTHORIZATION_TRIGGER
                 * Initial conditions: 
                 *     with {
                 *        CCR,CCA [Initial] are exchanged
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a CC-Request-Number AVP
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Granted-Service-Units AVP
                 *                        containing a CC-Service-Specific-Units AVP
                 *                    containing a Unit-Quota-Threshold AVP
                 *             and the IUT sends an RA-Request
garciay's avatar
garciay committed
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_OP_06
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_OP_06() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_RE_AUTHORIZATION and PICS_RO_OCF_RE_AUTHORIZATION_TRIGGER)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_RE_AUTHORIZATION and PICS_RO_OCF_RE_AUTHORIZATION_TRIGGER' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_OP_06()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_OP_06
                
                /**
                 * @desc    Verify that the IUT can process termination action
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        CCR,CCA [Initial] are exchanged
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT  has consumed Granted credits
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a CC-Request-Number AVP
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Session-ID AVP
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                not containing an Experimental-Result AVP
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Final-Unit-Indication AVP
                 *                        containing a Final-Unit-Action AVP
                 *                            indicating TERMINATE
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_OP_07
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_OP_07() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_OP_07()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_OP_07
                
garciay's avatar
garciay committed
                /**
                 * @desc    Verify that, IUT can process redirection action
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        CCR,CCA [Initial] are exchanged
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT  has consumed Granted credits
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a CC-Request-Number AVP
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Session-ID AVP
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                not containing an Experimental-Result AVP
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Final-Unit-Indication AVP
                 *                        containing a Final-Unit-Action AVP
                 *                            indicating REDIRECT
                 *                        containing Redirect-Server AVP
                 *                            containing Redirect-Address-Type AVP
                 *                            containing Redirect-Server-Address AVP
                 *                        optionally containing Restriction-Filter-Rule AVP
                 *                        optionally containing Filter-Id AVP AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_OP_08
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_OP_08() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_OP_08()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_OP_08
                
                /**
                 * @desc    Verify that, IUT can process quota consumption time
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_QUOTA_CONSUMPTION_TIME
garciay's avatar
garciay committed
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a CC-Request-Number AVP
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Session-ID AVP
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                not containing an Experimental-Result AVP
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Granted-Service-Units AVP
                 *                        containing a CC-Time AVP
                 *                    containing a Quota-Consumption-Time AVP
                 *                        indicating a period equal to the Quota Consumption Time
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_OP_09
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_OP_09() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_QUOTA_CONSUMPTION_TIME)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_QUOTA_CONSUMPTION_TIME' shall be set to true for executing the TC. ***"); 
garciay's avatar
garciay committed
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_OP_09()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_OP_09
                
                /**
                 * @desc    Verify that the IUT can successfully terminate sessions on CCR,CCA [Update] exchange
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_SERVICE_TERMINATION and PICS_RO_OCF_SERVICE_TERMINATION_WITH_CCA
garciay's avatar
garciay committed
                 * Initial conditions: 
                 *     with {
                 *        CCR,CCA [Initial] are exchanged
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Used-Service-Unit AVP
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER-AUTHORIZATION-REJECTED
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_OP_10
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_OP_10() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_SERVICE_TERMINATION and PICS_RO_OCF_SERVICE_TERMINATION_WITH_CCA)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_SERVICE_TERMINATION and PICS_RO_OCF_SERVICE_TERMINATION_WITH_CCA' shall be set to true for executing the TC. ***"); 
garciay's avatar
garciay committed
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_OP_10()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_OP_10
                
                /**
                 * @desc    Verify that the IUT can successfully terminate sessions with ASR,ASA exchange
                 * <pre>
                 * Pics Selection: PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_SERVICE_TERMINATION_WITH_CCA and PICS_RO_OCF_SERVICE_TERMINATION_WITH_ASR
                 * Initial conditions: 
                 *     with {
                 *        CCR,CCA [Initial] and CCR,CCA [Update] are exchanged
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            on service termination request
                 *        }
                 *        then {
                 *            the IUT sends an AS-Request
                 *                containing a Session-ID AVP
                 *                containing an Origin-Host AVP
                 *                containing an Origin-Realm AVP
                 *                containing a Destination-Realm AVP
                 *                containing a Destination-Host AVP
                 *                containing an Auth-Application-Id AVP
                 *            the IUT receives an AS-Answer
                 *                containing a Session-ID AVP
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                not containing an Experimental-Result AVP
                 *                containing an Origin-Host AVP
                 *                containing an Origin-Realm AVP
                 *            the IUT receives a CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating TERMINATE_REQUEST
                 *                containing a CC-Request-Number AVP
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER-AUTHORIZATION-REJECTED
                 *                containing a CC-Request-Type AVP
                 *                    indicating TERMINATE_REQUEST
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_OP_11
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_OP_11() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_SERVICE_TERMINATION_WITH_CCA and PICS_RO_OCF_SERVICE_TERMINATION_WITH_ASR)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_SERVICE_TERMINATION_WITH_CCA and PICS_RO_OCF_SERVICE_TERMINATION_WITH_ASR' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_OP_11()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_OP_11
                
garciay's avatar
garciay committed
                /**
                 * @desc    Verify that the IUT can successfully process Envelope AVP
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_ENVELOPE_REPORTING
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Requested-Service-Unit AVP
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER-SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing an Envelope-Reporting AVP
                 *                indicating REPORT_ENVELOPES_WITH_VOLUME
                 *            the IUT receives a CC-Request
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Granted-Service-Unit AVP
                 *                        indicating reserved units
                 *                    containing an Envelope AVP
                 *                        containing an Envelope-Start-Time AVP
                 *                        optionally containing an Envelope-Stop-Time AVP
                 *                        containing a CC-Total-Octets AVP
                 *                        containing a CC-Input-Octets AVP
                 *                        containing a CC-Output-Octets AVP
                 *                        optionally containing a CC-Service-Specific-Units AVP
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER-SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_OP_12
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_OP_12() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_ENVELOPE_REPORTING)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_ENVELOPE_REPORTING' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_OP_12()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_OP_12
                
                /**
                 * @desc    Verify that the IUT can successfully process combinational quota
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_TIME_QUOTA_MECHANISM
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Requested-Service-Unit AVP
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER-SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Time-Quota-Mechanism AVP
                 *                        containing a Time-Quota-Type AVP
                 *                            indicating value Table 3 
                 *                        containing a Base-Time-Interval AVP
                 *                            indicating the length of the base time interval
                 *                    optionally containing a Multiple-Services-Credit-Control AVP
                 *            the IUT receives a CC-Request
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Granted-Service-Unit AVP
                 *                        indicating reserved units
                 *                    containing an Envelope AVP
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER-SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_OP_13
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_OP_13() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_TIME_QUOTA_MECHANISM)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_TIME_QUOTA_MECHANISM' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_OP_13()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_OP_13
                
                /**
                 * @desc    Verify that the IUT can successfully process control of offline charging information
                 * <pre>
                 * Pics Selection: PICS_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_QUOTA_CONSUMPTION_TIME and PICS_RO_OCF_ENVELOPE_REPORTING and PICS_RO_OCF_OFFLINE_CHARGING_INFORMATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT receives an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Requested-Service-Unit AVP
                 *        }
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER-SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a Service-Information AVP
                 *                    containing a PS-Information AVP
                 *                        containing an Offline-Charging AVP
                 *                            contaning a Quota-Consumption-Time AVP or,
                 *                            contaning a Time-Quota-Mechanism AVP
                 *                            optionally containing an Envelope-Reporting AVP
                 *                                indicating REPORT_ENVELOPES_WITH_VOLUME
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_OCF_OP_14
garciay's avatar
garciay committed
                 */
                testcase TC_RO_OCF_OP_14() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ctf; 
                    
                    // Test control
                    if (not (PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_QUOTA_CONSUMPTION_TIME and PICS_RO_OCF_ENVELOPE_REPORTING and PICS_RO_OCF_OFFLINE_CHARGING_INFORMATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_OCF_QUOTA_CONSUMPTION_TIME and PICS_RO_OCF_ENVELOPE_REPORTING and PICS_RO_OCF_OFFLINE_CHARGING_INFORMATION' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ctfUp(v_diameterRo_ctf);
                    
                    // Start
                    v_diameterRo_ctf.start(f_TC_RO_OCF_OP_14()); 
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ctfDown(v_diameterRo_ctf);
                    
                } // End of testcase TC_RO_OCF_OP_14
                
            } // End of group TP_RO_OCF_OP
garciay's avatar
garciay committed
            
juvancic's avatar
juvancic committed
        }//End of group TP_RO_OCF_Role
        
        //5.2.3.2. CTF Role
        group TP_RO_CTF_Role {
juvancic's avatar
juvancic committed
            // 5.2.3.2.2 Message Syntax 
            group TP_RO_CTF_MS {
                
                /**
                 * @desc    Verify that the IUT can send a CC-Request to indicate a Charging Data Transfer.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is requested to indicate a request for Charging Data Transfer
                 *         }
                 *         then {
                 *             the IUT sends a CC-Request 
                 *                 containing a Session-ID AVP
                 *                 containing an Origin-Host AVP
                 *                 containing an Origin-Realm AVP
                 *                 containing a Destination-Realm AVP
                 *                 containing an Auth-Application-Id AVP
                 *                     indicating the value 4
                 *                 containing a Service-Context-Id AVP
                 *                 containing a CC-Request-Type AVP
                 *                 containing a CC-Request-Number AVP
                 *         }
                 *     }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_MS_01
                 */
                testcase TC_RO_CTF_MS_01() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf;
                    
                    // Test control
                    if (not PICS_RO_CTF_IUT) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ocfUp(v_diameterRo_ocf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_MS_01());
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ocfDown(v_diameterRo_ocf)
                    
                } // End of testcase TC_RO_CTF_MS_01
                 * @desc    Verify that the IUT can send an CC-Request with correct Diameter-Header parameters to indicate a Charging Data Transfer 
                 *          with valid Diameter-Header parameters.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is requested to indicate a request for Charging Data Transfer
                 *         }
                 *         then {
                 *             the IUT sends an CC-Request
                 *                  containing a Diameter-Header
                 *                      containing a Version
                 *                          indicating value '1'
                 *                  containing a Command-Flags
                 *                      containing T bit
                 *                          indicating value '0'
                 *                      containing E bit
                 *                          indicating value '0'
                 *                      containing r bits
                 *                          indicating value '0000'
                 *         }
                 *     }
                 * @version    0.0.22
                 * @see        ETSI TS 103 374-2 V0.0.22 (2015-11) TP_RO_CTF_MS_02
                 */
                testcase TC_RO_CTF_MS_02() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    
                    // Test control
                    if (not PICS_RO_CTF_IUT) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_ocfUp(v_diameterRo_ocf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_MS_02());
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_ocfDown(v_diameterRo_ocf)
                    
                } // End of testcase TC_RO_CTF_MS_02
            } // End of group TP_RO_CTF_MS
juvancic's avatar
juvancic committed
            // 5.2.3.2.3 Type of Charging 
            group TP_RO_CTF_TC {
pintar's avatar
pintar committed
                
                /**
                 * @desc    Verify that the IUT sends a CC-Request [Event] 
                 *          with direct debiting due to Immediate Event Charging.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT receives a SIP message
                 *         }
                 *         then {
                 *             the IUT sends a CC-Request 
                 *                 containing a CC-Request-Type AVP
                 *                     indicating EVENT_REQUEST
                 *                 containing a CC-Request-Number AVP
                 *                 containing a Requested-Action AVP
                 *                     indicating DIRECT_DEBITING
                 *                 containing a Multiple-Services-Credit-Control AVP
                 *                     (containing a Requested-Service-Unit AVP and/or
                 *                     containing a Service-Identifier AVP).
pintar's avatar
pintar committed
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_TC_01
pintar's avatar
pintar committed
                 */
                testcase TC_RO_CTF_TC_01() runs on DiameterRfRo system TestAdapter { 
pintar's avatar
pintar committed
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
pintar's avatar
pintar committed
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
pintar's avatar
pintar committed
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_TC_01());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_01(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_01(p_cSeq_s));
pintar's avatar
pintar committed
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
pintar's avatar
pintar committed
                    
                } // End of testcase TC_RO_CTF_TC_01
                
                /**
                 * @desc    Verify that the IUT sends a CC-Request [Event] 
                 *          with price enquiry due to Immediate Event Charging.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request 
                 *         containing a CC-Request-Type AVP
                 *             indicating EVENT_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Requested-Action AVP
                 *             indicating PRICE_ENQUIRY
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Service-Identifier AVP.
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_TC_02
pintar's avatar
pintar committed
                 */
                testcase TC_RO_CTF_TC_02() runs on DiameterRfRo system TestAdapter { 
pintar's avatar
pintar committed
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
pintar's avatar
pintar committed
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
pintar's avatar
pintar committed
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_TC_02());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_01(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_01(p_cSeq_s));
pintar's avatar
pintar committed
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
pintar's avatar
pintar committed
                    
                } // End of testcase TC_RO_CTF_TC_02
                
                /**
                 * @desc    Verify that the IUT sends a CC-Request [Event] 
                 *          with check balance due to Immediate Event Charging.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request 
                 *         containing a CC-Request-Type AVP
                 *             indicating EVENT_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Requested-Action AVP
                 *             indicating CHECK BALANCE.
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_TC_03
pintar's avatar
pintar committed
                 */
                testcase TC_RO_CTF_TC_03() runs on DiameterRfRo system TestAdapter { 
pintar's avatar
pintar committed
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
pintar's avatar
pintar committed
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
pintar's avatar
pintar committed
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_TC_03());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_01(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_01(p_cSeq_s));
pintar's avatar
pintar committed
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
pintar's avatar
pintar committed
                    
                } // End of testcase TC_RO_CTF_TC_03
                
                /**
                 * @desc    Verify that the IUT sends a CC-Request [Event] 
                 *          with refund account due to Immediate Event Charging.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request 
                 *         containing a CC-Request-Type AVP
                 *             indicating EVENT_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Requested-Action AVP
                 *             indicating REFUND ACCOUNT
                 *         containing a Multiple-Services-Credit-Control AVP
                 *              (containing a Requested-Service-Unit AVP and/or
                 *               containing a Service-Identifier AVP).
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_TC_04
pintar's avatar
pintar committed
                 */
                testcase TC_RO_CTF_TC_04() runs on DiameterRfRo system TestAdapter { 
pintar's avatar
pintar committed
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
pintar's avatar
pintar committed
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
pintar's avatar
pintar committed
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_TC_04());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_01(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_01(p_cSeq_s));
pintar's avatar
pintar committed
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
pintar's avatar
pintar committed
                    
                } // End of testcase TC_RO_CTF_TC_04
                
                /**
                 * @desc    Verify that the IUT sends a second CC-Request [Event] with refund 
                 *          account due to Immediate Event Charging with Refund-Information AVP 
                 *          if it was received in the previous CC-Answer.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating EVENT_REQUEST
                 *         containing a Requested-Action AVP
                 *             indicating DIRECT_DEBITING
                 *     the IUT receives a CC-Answer
pintar's avatar
pintar committed
                 *         containing a Session-ID AVP
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER_SUCCESS
                 *         containing an Origin-Host AVP
                 *         containing an Origin-Realm AVP
                 *         containing an Auth-Application-Id AVP
                 *         containing a CC-Request-Type AVP
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Refund-Information AVP
                 *     the IUT sends a CC-Request
pintar's avatar
pintar committed
                 *         containing a CC-Request-Type AVP
                 *             indicating EVENT_REQUEST
                 *         containing a Requested Action AVP
                 *             indicating REFUND ACCOUNT
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Refund-Information AVP.
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_TC_05
pintar's avatar
pintar committed
                 */
                testcase TC_RO_CTF_TC_05() runs on DiameterRfRo system TestAdapter { 
pintar's avatar
pintar committed
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
pintar's avatar
pintar committed
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
pintar's avatar
pintar committed
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_TC_05());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_01(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_01(p_cSeq_s));
pintar's avatar
pintar committed
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
pintar's avatar
pintar committed
                    
                } // End of testcase TC_RO_CTF_TC_05
                
                /**
                 * @desc    Verify that the IUT sends a CC-Request [Initial] 
                 *          to reserve units due to Event Charging with Unit Reservation.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request 
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Requested-Service-Unit AVP.
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_TC_06
pintar's avatar
pintar committed
                 */
                testcase TC_RO_CTF_TC_06() runs on DiameterRfRo system TestAdapter { 
pintar's avatar
pintar committed
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
pintar's avatar
pintar committed
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION)) {
pintar's avatar
pintar committed
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
pintar's avatar
pintar committed
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_TC_06());
pintar's avatar
pintar committed
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_06(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_06(p_cSeq_s));
pintar's avatar
pintar committed
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
pintar's avatar
pintar committed
                    
                } // End of testcase TC_RO_CTF_TC_06
                
                /**
                 * @desc    Verify that the IUT sends a CC-Request [Termination] 
                 *          to debit units due to Event Charging with Unit Reservation.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request 
                 *         containing a CC-Request-Type AVP
                 *             indicating TERMINATION_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Used-Service-Unit AVP.
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_TC_07
pintar's avatar
pintar committed
                 */
                testcase TC_RO_CTF_TC_07() runs on DiameterRfRo system TestAdapter { 
pintar's avatar
pintar committed
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
pintar's avatar
pintar committed
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
pintar's avatar
pintar committed
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_TC_07());
pintar's avatar
pintar committed
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_06(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_06(p_cSeq_s));
pintar's avatar
pintar committed
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
pintar's avatar
pintar committed
                    
                } // End of testcase TC_RO_CTF_TC_07
                
                /**
                 * @desc    Verify that the IUT sends a CC-Request [Initial] 
                 *          to reserve units due to Session Charging with Unit Reservation.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request 
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Requested-Service-Unit AVP.
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_TC_08
pintar's avatar
pintar committed
                 */
                testcase TC_RO_CTF_TC_08() runs on DiameterRfRo system TestAdapter { 
pintar's avatar
pintar committed
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
pintar's avatar
pintar committed
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
pintar's avatar
pintar committed
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_TC_08());
pintar's avatar
pintar committed
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
pintar's avatar
pintar committed
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
pintar's avatar
pintar committed
                    
                } // End of testcase TC_RO_CTF_TC_08
                
                /**
                 * @desc    Verify that the IUT sends a CC-Request [Update] 
                 *          to debit units due to Session Charging with Unit Reservation.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request 
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Used-Service-Unit AVP.
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_TC_09
pintar's avatar
pintar committed
                 */
                testcase TC_RO_CTF_TC_09() runs on DiameterRfRo system TestAdapter { 
pintar's avatar
pintar committed
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
pintar's avatar
pintar committed
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
pintar's avatar
pintar committed
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_TC_09());
pintar's avatar
pintar committed
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
pintar's avatar
pintar committed
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
pintar's avatar
pintar committed
                    
                } // End of testcase TC_RO_CTF_TC_09
                
                /**
                 * @desc    Verify that the IUT sends a CC-Request [Termination] 
                 *          to debit units due to Session Charging with Unit Reservation.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request 
                 *         containing a CC-Request-Type AVP
                 *             indicating TERMINATION_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Used-Service-Unit AVP.
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_TC_10
pintar's avatar
pintar committed
                 */
                testcase TC_RO_CTF_TC_10() runs on DiameterRfRo system TestAdapter { 
pintar's avatar
pintar committed
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
pintar's avatar
pintar committed
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
pintar's avatar
pintar committed
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_TC_10());
pintar's avatar
pintar committed
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
pintar's avatar
pintar committed
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
pintar's avatar
pintar committed
                    
                } // End of testcase TC_RO_CTF_TC_10
                
            } // End of group TP_RO_CTF_TC
juvancic's avatar
juvancic committed
            // 5.2.3.2.4 Error Casses 
            group TP_RO_CTF_EC {
                
                /**
                 * @desc    Verify that the IUT retransmits an unacknowledged CC-Request (T-flag) with direct debiting.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        OCF is not available
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT sends an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating DIRECT_DEBITING
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    (containing a Requested-Service-Unit AVP and/or
                 *                    containing a Service-Identifier AVP)
                 *             and the IUT does not received the CC-Answer
                 *        }
                 *        then {
                 *            the IUT sends a CC-Request
                 *                containing Diameter-Header
                 *                    containing Command-Flags
                 *                        containing T-flag
                 *                            indicating value '1'
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating DIRECT_DEBITING
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    (containing a Requested-Service-Unit AVP and/or
                 *                    containing a Service-Identifier AVP)
                 *             the IUT receives a CC-Answer
                 *                 containing a Result-Code AVP
                 *                     indicating DIAMETER_SUCCESS
                 *                 containing a CC-Request-Type AVP
                 *                     indicating EVENT_REQUEST
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_EC_01
                testcase TC_RO_CTF_EC_01() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_EC_01());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_01(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_01(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_EC_01
                
                /**
                 * @desc    Verify that the IUT retransmits an unacknowledged CC-Request (T-flag) with price enquiry.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        OCF is not available
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT sends an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating PRICE_ENQUIRY
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    (containing a Requested-Service-Unit AVP and/or
                 *                    containing a Service-Identifier AVP)
                 *             and the IUT does not received the CC-Answer
                 *        }
                 *        then {
                 *            the IUT sends a CC-Request
                 *                containing Diameter-Header
                 *                    containing Command-Flags
                 *                        containing T-flag
                 *                            indicating value '1'
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating PRICE_ENQUIRY
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    (containing a Requested-Service-Unit AVP and/or
                 *                    containing a Service-Identifier AVP)
                 *             the IUT receives a CC-Answer
                 *                 containing a Result-Code AVP
                 *                     indicating DIAMETER_SUCCESS
                 *                 containing a CC-Request-Type AVP
                 *                     indicating EVENT_REQUEST
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_EC_02
                testcase TC_RO_CTF_EC_02() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_EC_02());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_01(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_01(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_EC_02
                
                /**
                 * @desc    Verify that the IUT retransmits an unacknowledged CC-Request (T-flag).
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        OCF is not available
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT sends an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Requested-Service-Unit AVP
                 *             and the IUT does not received the CC-Answer
                 *        }
                 *        then {
                 *            the IUT sends a CC-equest
                 *                containing Diameter-Header
                 *                    containing Command-Flags
                 *                        containing T-flag
                 *                            indicating value '1'
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Requested-Service-Unit AVP
                 *             the IUT receives a CC-Answer
                 *                 containing a Result-Code AVP
                 *                     indicating DIAMETER_SUCCESS
                 *                 containing a CC-Request-Type AVP
                 *                     indicating INITIAL_REQUEST
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_EC_03
                testcase TC_RO_CTF_EC_03() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_EC_03());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_06(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_06(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_EC_03
                
                /**
                 * @desc    Verify that the IUT retransmits an unacknowledged CC-Request (T-flag).
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        OCF is not available
                 *        CCR,CCA [Initial] are exchanged.
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT sends an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating TERMINATION_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Requested-Service-Unit AVP
                 *             and the IUT does not received the CC-Answer
                 *        }
                 *        then {
                 *            the IUT sends a CC-Request
                 *                containing Diameter-Header
                 *                    containing Command-Flags
                 *                        containing T-flag
                 *                            indicating value '1'
                 *                containing a CC-Request-Type AVP
                 *                    indicating TERMINATION_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Requested-Service-Unit AVP
                 *             the IUT receives a CC-Answer
                 *                 containing a Result-Code AVP
                 *                     indicating DIAMETER_SUCCESS
                 *                 containing a CC-Request-Type AVP
                 *                     indicating TERMINATION_REQUEST
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_EC_04
                testcase TC_RO_CTF_EC_04() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_EC_04());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_06(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_06(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_EC_04
                
                /**
                 * @desc    Verify that the IUT retransmits an unacknowledged CC-Request (T-flag).
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        CCR, CCA [Initial] and CCR, CCA [Update] are exchanged and,
                 *        the OCF stops communication with the IUT.
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT sends an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Requested-Service-Unit AVP
                 *             and the IUT does not received the CC-Answer
                 *        }
                 *        then {
                 *            the IUT sends a CC-Request
                 *                containing Diameter-Header
                 *                    containing Command-Flags
                 *                        containing T-flag
                 *                            indicating value '1'
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Requested-Service-Unit AVP
                 *             the IUT receives a CC-Answer
                 *                 containing a Result-Code AVP
                 *                     indicating DIAMETER_SUCCESS
                 *                 containing a CC-Request-Type AVP
                 *                     indicating UPDATE_REQUEST
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_EC_05
                testcase TC_RO_CTF_EC_05() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_EC_05());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_EC_05
                
                /**
                 * @desc    Verify that on communication failure, the IUT stores generated accounting data in a non-volatile memory and, on communication restored, sends them to the OCS, in the order they were stored in the buffer
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_DDFH_TERMINATE_OR_BUFFER and not PICS_RO_CTF_FAILOVER
                 * Initial conditions: 
                 *     with {
                 *        the OCF stops communication with the IUT.
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the OCF restart
                 *             and the IUT does not received the CC-Answer
                 *        }
                 *        then {
                 *            the IUT sends the buffered CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating DIRECT_DEBITING
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    (containing a Requested-Service-Unit AVP and/or
                 *                    containing a Service-Identifier AVP)
                 *             the IUT receives a CC-Answer for each buffered CC-Request
                 *                 containing a Result-Code AVP
                 *                     indicating DIAMETER_SUCCESS
                 *                 containing a CC-Request-Type AVP
                 *                     indicating EVENT_REQUEST
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_EC_06
                testcase TC_RO_CTF_EC_06() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_DDFH_TERMINATE_OR_BUFFER) or PICS_RO_CTF_FAILOVER) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_DDFH_TERMINATE_OR_BUFFER and not PICS_RO_CTF_FAILOVER' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_EC_06());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_EC_06
                
                /**
                 * @desc    Verify that on communication failure, the IUT stores generated accounting data in a non-volatile memory and, on communication restored, sends them to the OCS, in the order they were stored in the buffer
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING and PICS_RO_CTF_DDFH_CONTINUE and not PICS_RO_CTF_FAILOVER
                 * Initial conditions: 
                 *     with {
                 *        the OCF stops communication with the IUT.
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the OCF restart
                 *             and the IUT does not received the CC-Answer
                 *        }
                 *        then {
                 *            the IUT sends the buffered CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating UPDATE_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating REFUND ACCOUNT
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    (containing a Requested-Service-Unit AVP and/or
                 *                    containing a Service-Identifier AVP)
                 *             the IUT receives a CC-Answer for each buffered CC-Request
                 *                 containing a Result-Code AVP
                 *                     indicating DIAMETER_SUCCESS
                 *                 containing a CC-Request-Type AVP
                 *                     indicating EVENT_REQUEST
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_EC_07
                testcase TC_RO_CTF_EC_07() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING and PICS_RO_CTF_DDFH_CONTINUE) or PICS_RO_CTF_FAILOVER) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING and PICS_RO_CTF_DDFH_CONTINUE and not PICS_RO_CTF_FAILOVER' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_EC_07());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_01(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_01(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_EC_07
                
                /**
                 * @desc    Verify that on communication failure, the IUT stores generated accounting data in a non-volatile memory and, on communication restored, sends them to the CDF, in the order they were stored in the buffer
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING and PICS_RO_CTF_DDFH_CONTINUE and not PICS_RO_CTF_FAILOVER
                 * Initial conditions: 
                 *     with {
                 *        the OCF stops communication with the IUT.
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the OCF restart
                 *        }
                 *        then {
                 *            the IUT sends the buffered CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating DIRECT_DEBITING
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    (containing a Requested-Service-Unit AVP and/or
                 *                    containing a Service-Identifier AVP)
                 *             the IUT receives a CC-Answer
                 *                 containing a Result-Code AVP
                 *                     indicating DIAMETER_SUCCESS
                 *                 containing a CC-Request-Type AVP
                 *                     indicating EVENT_REQUEST
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_EC_08
                testcase TC_RO_CTF_EC_08() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING and PICS_RO_CTF_DDFH_CONTINUE) or PICS_RO_CTF_FAILOVER) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING and PICS_RO_CTF_DDFH_CONTINUE and not PICS_RO_CTF_FAILOVER' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_EC_08());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_01(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_01(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_EC_08
                
            } // End of group TP_RO_CTF_EC
juvancic's avatar
juvancic committed
            // 5.2.3.2.5 Tariff Changes 
            group TP_RO_CTF_CH {
                
                /**
                 * @desc    Verify that the IUT sends a CC-Request [Initial] to reserve units due to Event Charging with Unit Reservation and indicates tariff time change.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_TARIFF_CHANGES_DURING_ACTIVE_SESSION
                 * Initial conditions: 
                 *     with {
                 *        the tariff time change
                 *     }
                 *     then {
                 *        the IUT receives a SIP message
                 *        the IUT sends a CC-Request
                 *            containing a CC-Request-Type AVP
                 *                indicating INITIAL_REQUEST
                 *            containing a CC-Request-Number AVP
                 *            containing a Multiple-Services-Credit-Control AVP
                 *                not containing a Tariff-Change-Usage AVP
                 *                containing a Requested-Service-Unit AVP
                 *                containing an Used-Service-Units AVP
                 *                    containing a Tariff-Change-Usage AVP
                 *     }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_CH_01
                testcase TC_RO_CTF_CH_01() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_TARIFF_CHANGES_DURING_ACTIVE_SESSION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_TARIFF_CHANGES_DURING_ACTIVE_SESSION' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_CH_01());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_06(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_06(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_CH_01
                
                /**
                 * @desc    Verify that the IUT sends a CC-Request [Initial] to reserve units due to Event Charging with Unit Reservation and when the IUT receives a CC-Answer with Tariff-Time-Change AVP the IUT accepts it and sends a CC-Request after the SIP session is released.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_TARIFF_CHANGES_DURING_ACTIVE_SESSION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 *     then {
                 *        the IUT receives a SIP message
                 *        the IUT sends a CC-Request
                 *            containing a CC-Request-Type AVP
                 *                indicating INITIAL_REQUEST
                 *            containing a CC-Request-Number AVP
                 *            containing a Multiple-Services-Credit-Control AVP
                 *                not containing a Tariff-Change-Usage AVP
                 *                containing a Requested-Service-Unit AVP
                 *                containing an Used-Service-Units AVP
                 *                    containing a Tariff-Change-Usage AVP
                 *        the IUT receives a CC-Answer
                 *            containing a Result-Code AVP
                 *                indicating DIAMETER_SUCCESS
                 *            containing a CC-Request-Type AVP
                 *                indicating INITIAL_REQUEST
                 *            containing a Multiple-Services-Credit-Control AVP
                 *                containing a Granted-Service-Unit AVP
                 *                    containing a Tariff-Time-Change AVP
                 *        the IUT receives a SIP message
                 *        the IUT sends a CC-Request
                 *            containing a CC-Request-Type AVP
                 *                indicating TERMINATION_REQUEST
                 *            containing a CC-Request-Number AVP
                 *            containing a Multiple-Services-Credit-Control AVP
                 *                containing a Used-Service-Unit AVP
                 *     }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_CH_02
                testcase TC_RO_CTF_CH_02() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_TARIFF_CHANGES_DURING_ACTIVE_SESSION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_TARIFF_CHANGES_DURING_ACTIVE_SESSION' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_CH_02());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_06(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_06(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_CH_02
                
                /**
                 * @desc    Verify that the IUT sends a CC-Request [Initial] to reserve units due to Event Charging with Unit Reservation and when the IUT receives a CC-Answer with Tariff-Time-Change AVP the IUT rejects it and sends a CC-Request with Termination-Cause AVP.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION and not PICS_RO_CTF_TARIFF_CHANGES_DURING_ACTIVE_SESSION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 *     then {
                 *        the IUT receives a SIP message
                 *        the IUT sends a CC-Request
                 *            containing a CC-Request-Type AVP
                 *                indicating INITIAL_REQUEST
                 *            containing a CC-Request-Number AVP
                 *            containing a Multiple-Services-Credit-Control AVP
                 *                containing a Requested-Service-Unit AVP
                 *                containing an Used-Service-Units AVP
                 *                    containing a Tariff-Change-Usage AVP
                 *        the IUT receives a CC-Answer
                 *            containing a Result-Code AVP
                 *                indicating DIAMETER_SUCCESS
                 *            containing a CC-Request-Type AVP
                 *                indicating INITIAL_REQUEST
                 *            containing a Multiple-Services-Credit-Control AVP
                 *                containing a Granted-Service-Unit AVP
                 *                    containing a Tariff-Time-Change AVP
                 *        the IUT receives a SIP message
                 *        the IUT sends a CC-Request
                 *            containing a Termination-Cause AVP
                 *                indicating DIAMETER_BAD_ANSWER
                 *     }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_CH_03
                testcase TC_RO_CTF_CH_03() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION and not(PICS_RO_CTF_TARIFF_CHANGES_DURING_ACTIVE_SESSION))) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION and not PICS_RO_CTF_TARIFF_CHANGES_DURING_ACTIVE_SESSION' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_CH_03());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_06(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_06(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_CH_03
                
                /**
                 * @desc    Verify that the IUT sends a CC-Request [Initial] to reserve units due to Session Charging with Unit Reservation and indicates tariff time change
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_TARIFF_CHANGES_DURING_ACTIVE_SESSION
                 * Initial conditions: 
                 *     with {
                 *        the tariff time change
                 *     }
                 *     then {
                 *        the IUT receives a SIP message
                 *        the IUT sends a CC-Request
                 *            containing a CC-Request-Type AVP
                 *                indicating INITIAL_REQUEST
                 *            containing a CC-Request-Number AVP
                 *            containing a Multiple-Services-Credit-Control AVP
                 *                not containing a Tariff-Change-Usage AVP
                 *                containing a Requested-Service-Unit AVP
                 *                containing an Used-Service-Units AVP
                 *                    containing a Tariff-Change-Usage AVP
                 *     }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_CH_04
                testcase TC_RO_CTF_CH_04() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_TARIFF_CHANGES_DURING_ACTIVE_SESSION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_TARIFF_CHANGES_DURING_ACTIVE_SESSION' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_CH_04());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_CH_04
                
                /**
                 * @desc    Verify that the IUT sends a CC-Request [Initial] to reserve units due to Session Charging with Unit Reservation and when the IUT receives a CC-Answer with Tariff-Time-Change AVP the IUT accepts it and sends a CC-Request after the SIP session is released
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_TARIFF_CHANGES_DURING_ACTIVE_SESSION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 *     then {
                 *        the IUT receives a SIP message
                 *        the IUT sends a CC-Request
                 *            containing a CC-Request-Type AVP
                 *                indicating INITIAL_REQUEST
                 *            containing a CC-Request-Number AVP
                 *            containing a Multiple-Services-Credit-Control AVP
                 *                not containing a Tariff-Change-Usage AVP
                 *                containing a Requested-Service-Unit AVP
                 *                containing an Used-Service-Units AVP
                 *                    containing a Tariff-Change-Usage AVP
                 *        the IUT receives a CC-Answer
                 *            containing a Result-Code AVP
                 *                indicating DIAMETER_SUCCESS
                 *            containing a CC-Request-Type AVP
                 *                indicating INITIAL_REQUEST
                 *            containing a Multiple-Services-Credit-Control AVP
                 *                containing a Granted-Service-Unit AVP
                 *                    containing a Tariff-Time-Change AVP
                 *        the IUT receives a SIP message
                 *        the IUT sends a CC-Request
                 *            containing a CC-Request-Type AVP
                 *                indicating TERMINATION_REQUEST
                 *            containing a CC-Request-Number AVP
                 *            containing a Multiple-Services-Credit-Control AVP
                 *                containing a Used-Service-Unit AVP
                 *     }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_CH_05
                testcase TC_RO_CTF_CH_05() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_TARIFF_CHANGES_DURING_ACTIVE_SESSION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_TARIFF_CHANGES_DURING_ACTIVE_SESSION' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_CH_05());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_CH_05
                
                /**
                 * @desc    Verify that the IUT sends a CC-Request [Initial] to reserve units due to Session Charging with Unit Reservation and when the IUT receives a CC-Answer with Tariff-Time-Change AVP the IUT rejects it and sends a CC-Request  with Termination-Cause AVP
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION and not PICS_RO_CTF_TARIFF_CHANGES_DURING_ACTIVE_SESSION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 *     then {
                 *        the IUT receives a SIP message
                 *        the IUT sends a CC-Request
                 *            containing a CC-Request-Type AVP
                 *                indicating INITIAL_REQUEST
                 *            containing a CC-Request-Number AVP
                 *            containing a Multiple-Services-Credit-Control AVP
                 *                containing a Requested-Service-Unit AVP
                 *                containing an Used-Service-Units AVP
                 *                    containing a Tariff-Change-Usage AVP
                 *        the IUT receives a CC-Answer
                 *            containing a Result-Code AVP
                 *                indicating DIAMETER_SUCCESS
                 *            containing a CC-Request-Type AVP
                 *                indicating INITIAL_REQUEST
                 *            containing a Multiple-Services-Credit-Control AVP
                 *                containing a Granted-Service-Unit AVP
                 *                    containing a Tariff-Time-Change AVP
                 *        the IUT receives a SIP message
                 *        the IUT sends a CC-Request
                 *            containing a Termination-Cause AVP
                 *                indicating DIAMETER_BAD_ANSWER
                 *     }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_CH_06
                testcase TC_RO_CTF_CH_06() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION and not(PICS_RO_CTF_TARIFF_CHANGES_DURING_ACTIVE_SESSION))) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION and not PICS_RO_CTF_TARIFF_CHANGES_DURING_ACTIVE_SESSION' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_CH_06());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_CH_06
                
            } // End of group TP_RO_CTF_CH
juvancic's avatar
juvancic committed
            // 5.2.3.2.6 Re-Authorization 
            group TP_RO_CTF_RE {
                
                /**
                 * @desc    Verify that the IUT sends a CC-Request [Update] to reserve and debit units due to Session Charging with Unit Reservation and when the re-authorization procedure starts the IUT sends appropriate answer after an RA-Request is received
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_RE_AUTHORIZATION
                 * Initial conditions: 
                 *     with {
                 *        CCR,CCA [Initial] are exchanged
                 *     }
                 *     then {
                 *        the IUT receives a SIP message
                 *        the IUT sends a CC-Request
                 *            containing a CC-Request-Type AVP
                 *                indicating UPDATE_REQUEST
                 *            containing a CC-Request-Number AVP
                 *            containing a Multiple-Services-Credit-Control AVP
                 *                containing an Used-Service-Units AVP
                 *        the IUT receives a CC-Answer
                 *        the IUT receives an RA-Request
                 *            containing a Session-ID AVP
                 *            containing an Origin-Host AVP
                 *            containing an Origin-Realm AVP
                 *            containing a Destination-Realm AVP
                 *            containing a Destination-Host AVP
                 *            containing an Auth-Application-Id AVP
                 *                indicating the value 4
                 *            containing a Re-Auth-Request-Type AVP
                 *                indicating AUTHORIZE_ONLY
                 *        the IUT sends an RA-Answer
                 *            containing a Session-ID AVP
                 *            containing a Result-Code AVP
                 *                indicating DIAMETER_SUCCESS
                 *            containing an Origin-Host AVP
                 *            containing an Origin-Realm AVP
                 *     }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_RE_01
                testcase TC_RO_CTF_RE_01() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_RE_AUTHORIZATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_RE_AUTHORIZATION' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_RE_01());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
            } // End of group TP_RO_CTF_RE
juvancic's avatar
juvancic committed
            // 5.2.3.2.7 Failure Handling 
            group TP_RO_CTF_FH {
                
                /**
                 * @desc    Verify that the IUT can successfully override local CCFH values due to Event Charging with Unit Reservation.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_CCFH_CONTINUE
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT sends a CC-Request to the primary OCF
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Requested-Service-Unit AVP
                 *            the IUT receives a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Granted-Service-Unit AVP
                 *                        indicating reserved units
                 *                containing Credit-Control-Failure-Handling AVP
                 *                    indicating CONTINUE
                 *            the primary OCF stops responding
                 *        }
                 *        then {
                 *            the IUT sends a CC-Request to the primary OCF
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Requested-Service-Unit AVP
                 *            the IUT does not receive a CC-Answer
                 *            the IUT sends a CC-Request to the secondary OCF
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a Service-Information AVP
                 *                    containing an IMS-Information AVP
                 *                        containing an Alternate-Charged-Party-Address AVP
                 *                            indicating a different OCF server
                 *                containing a CC-Request-Number AVP
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Requested-Service-Unit AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_FH_01
                testcase TC_RO_CTF_FH_01() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf, v_diameterRo_ocf2; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_CCFH_CONTINUE)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_CCFH_CONTINUE' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_2Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_diameterRo_ocf2, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_FH_01());
                    v_diameterRo_ocf2.start(f_TC_RO_CTF_FH_01_2ndOCF());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_FH_UE_01(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_FH_CSCF_01(p_cSeq_s));
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    f_cf_2Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_diameterRo_ocf2, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_FH_01
                
                /**
                 * @desc    Verify that the IUT can successfully override local DDFH value with Direct Debiting.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING and (PICS_RO_CTF_DDFH_TERMINATE_OR_BUFFER or PICS_RO_CTF_DDFH_CONTINUE)
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT sends a CC-Request to the primary OCF
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating DIRECT_DEBITING
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    (containing a Requested-Service-Unit AVP and/or
                  *                    containing a Service-Identifier AVP)
                 *            the IUT receives a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Granted-Service-Unit AVP
                 *                        indicating reserved units
                 *                containing Direct-Debiting-Failure-Handling AVP
                 *                    indicating TERMINATE_OR_BUFFER
                 *            the primary OCF stops responding
                 *        }
                 *        then {
                 *            the IUT sends a CC-Request to the primary OCF
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Requested-Service-Unit AVP
                 *            the IUT does not receive a CC-Answer
                 *            the IUT sends a CC-Request to the secondary OCF
                 *                containing Diameter-Header
                 *                    containing Command-Flags
                 *                        containing T-flag
                 *                            indicating value '1'
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Requested-Service-Unit AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_FH_02
                testcase TC_RO_CTF_FH_02() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf, v_diameterRo_ocf2; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING and (PICS_RO_CTF_DDFH_TERMINATE_OR_BUFFER or PICS_RO_CTF_DDFH_CONTINUE))) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING and (PICS_RO_CTF_DDFH_TERMINATE_OR_BUFFER or PICS_RO_CTF_DDFH_CONTINUE)' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_2Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_diameterRo_ocf2, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_FH_02());
                    v_diameterRo_ocf2.start(f_TC_RO_CTF_FH_02_2ndOCF());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_FH_UE_02(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_FH_CSCF_02(p_cSeq_s));
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_tbDone, c_poDone});
                    f_cf_2Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_diameterRo_ocf2, v_imsComponent_ue, v_imsComponent_cscf)
            } // End of group TP_RO_CTF_FH
juvancic's avatar
juvancic committed
            // 5.2.3.2.8 Failover 
            group TP_RO_CTF_FA {
                
                /**
                 * @desc    Verify that on connection failure with the pimary OCF, the IUT sends a CC-Request [Event] to the secondary OCF.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING and PICS_RO_CTF_FAILOVER
                 * Initial conditions: 
                 *     with {
                 *        A secondary OCF is available
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT sends an CC-Request
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating PRICE_ENQUIRY
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Service-Identifier AVP
                 *             and the IUT does not received the CC-Answer
                 *        }
                 *        then {
                 *            the sends the CC-Request to the secondary OCF
                 *                containing an CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating PRICE_ENQUIRY
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Service-Identifier AVP
                 *            the IUT receives a CC-Answer
                 *                containing a Session-ID AVP
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                not containing an Experimental-Result AVP
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a Cost-Information AVP
                 *                    containing Unit-Value AVP
                 *                        containing Value-Digits AVP
                 *                    containing Currency-Code AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_FA_01
                 */
                testcase TC_RO_CTF_FA_01() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf, v_diameterRo_ocf2; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING and PICS_RO_CTF_FAILOVER)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING and PICS_RO_CTF_FAILOVER' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_2Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_diameterRo_ocf2, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_FA_01());
                    v_diameterRo_ocf2.start(f_TC_RO_CTF_FA_01_2ndOCF());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_FH_UE_02(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_FH_CSCF_02(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_tbDone, c_poDone});
                    
                    f_cf_2Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_diameterRo_ocf2, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_FA_01
                
                /**
                 * @desc    Verify that on connection restored, the IUT sends a CC-Request [Event] to the primary OCF
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING and PICS_RO_CTF_FAILOVER
                 * Initial conditions: 
                 *     with {
                 *        A secondary OCF is available
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT sends an CC-Request to the primary OCF
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating PRICE_ENQUIRY
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Service-Identifier AVP
                 *            the IUT does not received the CC-Answer
                 *            the sends the CC-Request to the secondary OCF
                 *                containing an CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating PRICE_ENQUIRY
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Service-Identifier AVP
                 *            the IUT receives a CC-Answer
                 *                containing a Session-ID AVP
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                not containing an Experimental-Result AVP
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a Cost-Information AVP
                 *                    containing Unit-Value AVP
                 *                        containing Value-Digits AVP
                 *                    containing Currency-Code AVP
                 *            the IUT receives a WC-Request from the primary OCF
                 *        }
                 *        then {
                 *            the sends the CC-Request to the primary OCF
                 *                containing an CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating PRICE_ENQUIRY
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Service-Identifier AVP
                 *            the IUT receives a CC-Answer
                 *                containing a Session-ID AVP
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                not containing an Experimental-Result AVP
                 *                containing a CC-Request-Type AVP
                 *                    indicating EVENT_REQUEST
                 *                containing a Cost-Information AVP
                 *                    containing Unit-Value AVP
                 *                        containing Value-Digits AVP
                 *                    containing Currency-Code AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_FA_02
                 */
                testcase TC_RO_CTF_FA_02() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf, v_diameterRo_ocf2; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING and PICS_RO_CTF_FAILOVER)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING and PICS_RO_CTF_FAILOVER' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_2Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_diameterRo_ocf2, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_FA_02());
                    v_diameterRo_ocf2.start(f_TC_RO_CTF_FA_02_2ndOCF());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_FA_UE_02(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_FA_CSCF_02(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    
                    f_cf_2Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_diameterRo_ocf2, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_FA_02
                
                /**
                 * @desc    Verify that on connection failure with the pimary OCF, the IUT sends a CC-Request [Initial] to the secondary OCF.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_FAILOVER
                 * Initial conditions: 
                 *     with {
                 *        The primary OCF is unavailable
                 *        A secondary OCF is available
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            
                 *        }
                 *        then {
                 *            the sends the CC-Request to the secondary OCF
                 *                containing an CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating CHECK BALANCE
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Service-Identifier AVP
                 *            the IUT receives a CC-Answer
                 *                containing a Session-ID AVP
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                not containing an Experimental-Result AVP
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a Cost-Information AVP
                 *                    containing Unit-Value AVP
                 *                        containing Value-Digits AVP
                 *                    containing Currency-Code AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_FA_03
                 */
                testcase TC_RO_CTF_FA_03() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf, v_diameterRo_ocf2; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_FAILOVER)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_FAILOVER' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_2Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_diameterRo_ocf2, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_FA_03());
                    v_diameterRo_ocf2.start(f_TC_RO_CTF_FA_03_2ndOCF());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_06(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_06(p_cSeq_s));
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_tbDone, c_poDone});
                    f_cf_2Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_diameterRo_ocf2, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_FA_03
                
                /**
                 * @desc    Verify that, on connection restored, the IUT sends a CC-Request [Initial] to the primary OCF.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_FAILOVER
                 * Initial conditions: 
                 *     with {
                 *        A secondary OCF is available
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            the IUT sends an CC-Request to the primary OCF
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating CHECK_BALANCE
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Service-Identifier AVP
                 *            the IUT does not received the CC-Answer
                 *            the sends the CC-Request to the secondary OCF
                 *                containing an CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating CHECK_BALANCE
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Service-Identifier AVP
                 *            the IUT receives a CC-Answer
                 *                containing a Session-ID AVP
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                not containing an Experimental-Result AVP
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a Cost-Information AVP
                 *                    containing Unit-Value AVP
                 *                        containing Value-Digits AVP
                 *                    containing Currency-Code AVP
                 *            the IUT receives a WC-Request from the primary OCF
                 *        }
                 *        then {
                 *            the sends the CC-Request to the primary OCF
                 *                containing an CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a CC-Request-Number AVP
                 *                containing a Requested-Action AVP
                 *                    indicating CHECK_BALANCE
                 *                containing a Multiple-Services-Credit-Control AVP
                 *                    containing a Service-Identifier AVP
                 *            the IUT receives a CC-Answer
                 *                containing a Session-ID AVP
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                not containing an Experimental-Result AVP
                 *                containing a CC-Request-Type AVP
                 *                    indicating INITIAL_REQUEST
                 *                containing a Cost-Information AVP
                 *                    containing Unit-Value AVP
                 *                        containing Value-Digits AVP
                 *                    containing Currency-Code AVP
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_FA_04
                 */
                testcase TC_RO_CTF_FA_04() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf, v_diameterRo_ocf2; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_FAILOVER)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_EVENT_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_FAILOVER' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_2Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_diameterRo_ocf2, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_FA_04());
                    v_diameterRo_ocf2.start(f_TC_RO_CTF_FA_04_2ndOCF());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_FA_UE_02(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_FA_CSCF_02(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    
                    f_cf_2Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_diameterRo_ocf2, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_FA_04
                
            } // End of group TP_RO_CTF_FA
            
            // 5.2.3.2.9 Credit Pooling 
            group TP_RO_CTF_CP {
                
                /**
                 * @desc    Verify that the IUT sends a CC-Request [Event] with direct debiting due to Immediate Event Charging.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request 
                 *         containing a CC-Request-Type AVP
                 *             indicating EVENT_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Requested-Action AVP
                 *             indicating DIRECT_DEBITING
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             (containing a Requested-Service-Unit AVP and/or
                 *             containing a Service-Identifier AVP).
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_CP_01
                testcase TC_RO_CTF_CP_01() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_IMMEDIATE_EVENT_CHARGING' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_CP_RO_CTF_CP_01());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_06(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_06(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_CP_01
                
                /**
                 * @desc    Verify that the IUT supports independent credit-control of multiple services within a (sub-) session and sends a CC-Request [Initial] to reserve units due to Session Charging with Unit Reservation.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION and PICS_RO_CTF_SUB_SESSION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request 
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Indicator AVP
                 *             indicating MULTIPLE_SERVICES_SUPPORTED
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Requested-Service-Unit AVP
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 V0.0.7 (2015-09) TP_RO_CTF_CP_02
                testcase TC_RO_CTF_CP_02() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' and 'PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_CP_02());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
            } // End of group TP_RO_CTF_CP
juvancic's avatar
juvancic committed
            // 5.2.3.2.10 Other Procedures
            group TP_RO_CTF_OP {
                
                /**
                 * @desc    Verify that, IUT can return the quotas when the traffic ceases.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request 
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Volume-Quota-Threshold AVP
                 *             containing a Granted-Service-Units AVP
                 *                 containing a CC-Total-Octets AVP or,
                 *                 containing a CC-Input-Octets AVP or,
                 *                 containing a CC-Output-Octets AVP
                 *     the IUT receives a CC-Answer
                 *         containing a Session-ID AVP
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER_SUCCESS
                 *         not containing an Experimental-Result AVP
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *     accepts the message.
                 *     
                 *     Preamble action: The IUT receives a CCA [Initial] including Quota-Holding-Time AVP indicating a non 0 value and the IUT exchanges some CCR, CCA [Update].
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 (2015-11) TP_RO_CTF_OP_01
                 */
                testcase TC_RO_CTF_OP_01() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_OP_01());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_OP_01
                
                /**
                 * @desc    Verify that the IUT does not return the quotas when the traffic ceases. 
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request 
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             not containing a Volume-Quota-Threshold AVP
                 *             not containing a Granted-Service-Units AVP
                 *     the IUT receives a CC-Answer
                 *         containing a Session-ID AVP
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER_SUCCESS
                 *         not containing an Experimental-Result AVP
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *     accepts the message.
                 *     
                 *     Preamble action: The IUT receives a CCA [Initial] including Quota-Holding-Time AVP indicating a 0 value and the IUT exchanges some CCR, CCA [Update].
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 (2015-11) TP_RO_CTF_OP_02
                 */
                testcase TC_RO_CTF_OP_02() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_OP_02());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_OP_02
                
                /**
                 * @desc    Verify that, IUT can return the quotas when the traffic ceases - Based on IUT local value.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request 
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Volume-Quota-Threshold AVP
                 *             containing a Granted-Service-Units AVP
                 *                 containing a CC-Total-Octets AVP or,
                 *                 containing a CC-Input-Octets AVP or,
                 *                 containing a CC-Output-Octets AVP
                 *     the IUT receives a CC-Answer
                 *         containing a Session-ID AVP
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER_SUCCESS
                 *         not containing an Experimental-Result AVP
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *     accepts the message.
                 *     
                 *     Preamble action: The IUT receives a CCA [Initial] not including Quota-Holding-Time AVP and the IUT exchanges some CCR, CCA [Update].
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 (2015-11) TP_RO_CTF_OP_03
                 */
                testcase TC_RO_CTF_OP_03() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_OP_03());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_OP_03
                
                /**
                 * @desc    Verify that the IUT supports a credit re-authorization and returns an appropriate RA-Answer.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request 
                 *          containing a CC-Request-Type AVP
                 *              indicating UPDATE_REQUEST
                 *          containing a CC-Request-Number AVP
                 *      sends a CC-Answer
                 *          containing a Result-Code AVP
                 *              indicating DIAMETER_SUCCESS
                 *          containing a CC-Request-Type AVP
                 *              indicating UPDATE_REQUEST
                 *          containing a Multiple-Services-Credit-Control AVP
                 *              containing a Trigger AVP
                 *                  containing a Trigger-Type AVP
                 *      the IUT receives an RA-Request
                 *          containing a Session-ID AVP
                 *          containing an Origin-Host AVP
                 *          containing an Origin-Realm AVP
                 *          containing a Destination-Realm AVP
                 *          containing a Destination-Host AVP
                 *          containing an Auth-Application-Id AVP
                 *              indicating the value 4
                 *          containing a Re-Auth-Request-Type AVP
                 *              indicating AUTHORIZE_ONLY
                 *      the IUT sends an RA-Answer
                 *          containing a Session-ID AVP
                 *          containing a Result-Code AVP
                 *              indicating DIAMETER_SUCCESS
                 *          containing an Origin-Host AVP
                 *          containing an Origin-Realm AVP
                 *     
                 *     Preamble action: CCR, CCA [Initial] and CCR, CCA [Update] are exchanged.
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 (2015-11) TP_RO_CTF_OP_04
                 */
                testcase TC_RO_CTF_OP_04() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_OP_04());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_OP_04
                
                /**
                 * @desc    Verify that the IUT can return the reporting quota usage in a Multiple-Services-Credit-Control AVP (Table 4).
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request 
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Reporting-Reason AVP (Table 4)
                 *     the IUT receives a CC-Answer
                 *         containing a Session-ID AVP
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER_SUCCESS
                 *         not containing an Experimental-Result AVP
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *     accepts the message.
                 *     
                 *     Preamble action: CCR, CCA [Initial] and CCR, CCA [Update] are exchanged.
                 *             
                 *             Table4:
                 *             TP variants  Reporting-Reason AVP values:
                 *             VA_01        QHT (1)
                 *             VA_02        FINAL (2)
                 *             VA_03        VALIDITY_TIME (4)
                 *             VA_04        FORCED_REAUTHORISATION (7)
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 (2015-11) TP_RO_CTF_OP_05
                 */
                testcase TC_RO_CTF_OP_05() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_OP_05());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_OP_05
                
                /**
                 * @desc    Verify that the IUT can return the reporting quota usage in 
                 *          a Multiple-Services-Credit-Control AVP - RATING_CONDITION_CHANGE (6).
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Reporting-Reason AVP
                 *                 indicating RATING_CONDITION_CHANGE
                 *             containing a Trigger AVP
                 *     the IUT receives a CC-Answer
                 *         containing a Session-ID AVP
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER_SUCCESS
                 *         not containing an Experimental-Result AVP
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *     accepts the message.
                 *     
                 *     Preamble action: CCR, CCA [Initial] and CCR, CCA [Update] are exchanged.
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 (2015-11) TP_RO_CTF_OP_06
                 */
                testcase TC_RO_CTF_OP_06() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_OP_06());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_OP_06
                
                /**
                 * @desc    Verify that the IUT can return the reporting quota usage in a Used-Service-Unit AVP (Table 5).
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Used-Service-Unit AVP
                 *                 containing a Reporting-Reason AVP (Table 5)
                 *     the IUT receives a CC-Answer
                 *         containing a Session-ID AVP
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER_SUCCESS
                 *         not containing an Experimental-Result AVP
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *     accepts the message.
                 *     
                 *     Preamble action: CCR, CCA [Initial] and CCR, CCA [Update] are exchanged.
                 *     
                 *     Table 5:
                 *     TP variants  Reporting-Reason AVP values:
                 *     VA_01        THRESHOLD (0)
                 *     VA_02        QUOTA_EXHAUSTED (3)
                 *     VA_03        OTHER_QUOTA_TYPE (5)
                 *     VA_04        POOL_EXHAUSTED (8)
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 (2015-11) TP_RO_CTF_OP_07
                 */
                testcase TC_RO_CTF_OP_07() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_OP_07());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_OP_07
                
                /**
                 * @desc    Verify that the IUT can process termination action.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Used-Service-Unit AVP
                 *     on receipt a CC-Answer
                 *         containing a Session-ID AVP
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER_SUCCESS
                 *         not containing an Experimental-Result AVP
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Final-Unit-Indication AVP
                 *                 containing a Final-Unit-Action AVP
                 *                     indicating TERMINATE
                 *     the IUT sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating TERMINATION_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Used-Service-Unit AVP
                 *     and the IUT receives a CC-Answer
                 *         containing a Session-ID AVP
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER_SUCCESS
                 *         not containing an Experimental-Result AVP
                 *         containing a CC-Request-Type AVP
                 *             indicating TERMINATION_REQUEST
                 *     accepts the message.
                 *     
                 *     Preamble action: CCR, CCA [Initial] are exchanged.
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 (2015-11) TP_RO_CTF_OP_08
                 */
                testcase TC_RO_CTF_OP_08() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_OP_08());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_OP_08
                
                /**
                 * @desc    Verify that the IUT can process termination action after redirection.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Used-Service-Unit AVP
                 *     the IUT receives a CC-Answer
                 *         containing a Session-ID AVP
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER_SUCCESS
                 *         not containing an Experimental-Result AVP
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Final-Unit-Indication AVP
                 *                 containing a Final-Unit-Action AVP
                 *                     indicating REDIRECT
                 *                 containing Redirect-Server AVP
                 *                     containing Redirect-Address-Type AVP
                 *                     containing Redirect-Server-Address AVP
                 *                 optionally containing Restriction-Filter-Rule AVP
                 *                 optionally containing Filter-Id AVP AVP
                 *     the IUT sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating TERMINATION_REQUEST
                 *         containing a CC-Request-Number AVP
                 *             indicatng User B
                 *     and the IUT receives a CC-Answer
                 *         containing a Session-ID AVP
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER_SUCCESS
                 *         not containing an Experimental-Result AVP
                 *         containing a CC-Request-Type AVP
                 *             indicating TERMINATION_REQUEST
                 *         containing a CC-Request-Number AVP
                 *             indicatng User B
                 *     the IUT sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a CC-Request-Number AVP
                 *             indicatng User C
                 *     and the IUT receives a CC-Answer
                 *         containing a Session-ID AVP
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER_SUCCESS
                 *         not containing an Experimental-Result AVP
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a CC-Request-Number AVP
                 *             indicatng User C
                 *     accepts the message.
                 *     
                 *     Preamble action: CCR, CCA [Initial] are exchanged
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 (2015-11) TP_RO_CTF_OP_09
                 */
                testcase TC_RO_CTF_OP_09() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_OP_09());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_OP_09
                
                /**
                 * @desc    Verify that the IUT can process quota consumption time.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request 
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Used-Service-Unit AVP
                 *     the IUT receives a CC-Answer
                 *         containing a Session-ID AVP
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER_SUCCESS
                 *         not containing an Experimental-Result AVP
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Granted-Service-Units AVP
                 *                 containing a CC-Time AVP
                 *             containing a Quota-Consumption-Time AVP
                 *                 indicating a period equal to the Quota Consumption Time
                 *     the IUT sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Used-Service-Unit AVP.
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 (2015-11) TP_RO_CTF_OP_10
                 */
                testcase TC_RO_CTF_OP_10() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_OP_10());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_OP_10
                
                /**
                 * @desc    Verify that the IUT can successfully terminate sessions on a CCR, CCA [Update] exchange.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request 

                 *     the IUT sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Used-Service-Unit AVP
                 *     the IUT receives a CC-Answer
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER-AUTHORIZATION-REJECTED
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *     the IUT sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating TERMINATION_REQUEST
                 *         containing a CC-Request-Number AVP
                 *     and the IUT receives a CC-Answer
                 *         containing a Session-ID AVP
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER_SUCCESS
                 *         not containing an Experimental-Result AVP
                 *         containing a CC-Request-Type AVP
                 *             indicating TERMINATION_REQUEST
                 *         containing a CC-Request-Number AVP
                 *     accepts the message.
                 *     
                 *     Preamble action: CCR,CCA [Initial] are exchanged.
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 (2015-11) TP_RO_CTF_OP_11
                 */
                testcase TC_RO_CTF_OP_11() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_OP_11());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_OP_11
                
                /**
                 * @desc    Verify that the IUT can successfully terminate session on an ASR, ASA exchange.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request 
                 *     the IUT receives an AS-Request
                 *         containing a Session-ID AVP
                 *         containing an Origin-Host AVP
                 *         containing an Origin-Realm AVP
                 *         containing a Destination-Realm AVP
                 *         containing a Destination-Host AVP
                 *         containing an Auth-Application-Id AVP
                 *     the IUT sends an AS-Answer
                 *         containing a Session-ID AVP
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER_SUCCESS
                 *         not containing an Experimental-Result AVP
                 *         containing an Origin-Host AVP
                 *         containing an Origin-Realm AVP
                 *     and sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating TERMINATION_REQUEST
                 *         containing a CC-Request-Number AVP
                 *     the IUT receives a CC-Answer
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER-AUTHORIZATION-REJECTED
                 *         containing a CC-Request-Type AVP
                 *             indicating TERMINATION_REQUEST
                 *     accepts the message.
                 *     
                 *     Preamble action: CCR,CCA [Initial] and CCR,CCA [Update] are exchanged.
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 (2015-11) TP_RO_CTF_OP_12
                 */
                testcase TC_RO_CTF_OP_12() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_OP_12());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_OP_12
                
                /**
                 * @desc    Verify that the IUT can successfully process Envelope-Reporting AVP [DO_NOT_REPORT_ENVELOPES].
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Requested-Service-Unit AVP
                 *     the IUT receives a CC-Answer
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER-SUCCESS
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing an Envelope-Reporting AVP
                 *                 indicating DO_NOT_REPORT_ENVELOPES
                 *     the IUT sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Used-Service-Unit AVP
                 *             not containing an Envelope AVP.
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 (2015-11) TP_RO_CTF_OP_13
                 */
                testcase TC_RO_CTF_OP_13() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_OP_13());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_OP_13
                
                /**
                 * @desc    Verify that the IUT can successfully process Envelope-Reporting AVP [REPORT_ENVELOPES].
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request 
                 *     the IUT sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Requested-Service-Unit AVP
                 *     the IUT receives a CC-Answer
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER-SUCCESS
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing an Envelope-Reporting AVP
                 *                 indicating REPORT_ENVELOPES
                 *     the IUT sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Used-Service-Unit AVP
                 *             containing an Envelope AVP
                 *                 containing an Envelope-Start-Time AVP
                 *                 optionally containing an Envelope-Stop-Time AVP
                 *                 optionally containing a CC-Total-Octets AVP
                 *                 optionally containing a CC-Input-Octets AVP
                 *                 optionally containing a CC-Output-Octets AVP
                 *                 optionally containing a CC-Service-Specific-Units AVP.
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 (2015-11) TP_RO_CTF_OP_14
                 */
                testcase TC_RO_CTF_OP_14() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_OP_14());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_OP_14
                
                /**
                 * @desc    Verify that the IUT can successfully process 
                 *          Envelope-Reporting AVP [REPORT_ENVELOPES_WITH_VOLUME].
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request 
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Requested-Service-Unit AVP
                 *     the IUT receives a CC-Answer
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER-SUCCESS
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing an Envelope-Reporting AVP
                 *                 indicating REPORT_ENVELOPES_WITH_VOLUME
                 *     the IUT sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Used-Service-Unit AVP
                 *             containing an Envelope AVP
                 *                 containing an Envelope-Start-Time AVP
                 *                 optionally containing an Envelope-Stop-Time AVP
                 *                 containing a CC-Total-Octets AVP
                 *                 containing a CC-Input-Octets AVP
                 *                 containing a CC-Output-Octets AVP
                 *                 not containing a CC-Service-Specific-Units AVP.
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 (2015-11) TP_RO_CTF_OP_15
                 */
                testcase TC_RO_CTF_OP_15() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_OP_15());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_OP_15
                
                /**
                 * @desc    Verify that the IUT can successfully process 
                 *          Envelope-Reporting AVP [REPORT_ENVELOPES_WITH_EVENT].
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Requested-Service-Unit AVP
                 *     the IUT receives a CC-Answer
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER-SUCCESS
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing an Envelope-Reporting AVP
                 *                 indicating REPORT_ENVELOPES_WITH_EVENT
                 *     the IUT sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Used-Service-Unit AVP
                 *             containing an Envelope AVP
                 *                 containing an Envelope-Start-Time AVP
                 *                 optionally containing an Envelope-Stop-Time AVP
                 *                 not containing a CC-Total-Octets AVP
                 *                 not containing a CC-Input-Octets AVP
                 *                 not containing a CC-Output-Octets AVP
                 *                 not containing a CC-Service-Specific-Units AVP
                 *                 containing an Event AVP.
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 (2015-11) TP_RO_CTF_OP_16
                 */
                testcase TC_RO_CTF_OP_16() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_OP_16());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_OP_16
                
                /**
                 * @desc    Verify that the IUT can successfully process 
                 *          Envelope-Reporting AVP [REPORT_ENVELOPES_WITH_VOLUME_AND_EVENT].
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Requested-Service-Unit AVP
                 *     the IUT receives a CC-Answer
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER-SUCCESS
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing an Envelope-Reporting AVP
                 *                 indicating REPORT_ENVELOPES_WITH_VOLUME_AND_EVENT
                 *     the IUT sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Used-Service-Unit AVP
                 *             containing an Envelope AVP
                 *                 containing an Envelope-Start-Time AVP
                 *                 optionally containing an Envelope-Stop-Time AVP
                 *                 containing a CC-Total-Octets AVP
                 *                 containing a CC-Input-Octets AVP
                 *                 containing a CC-Output-Octets AVP
                 *                 containing a CC-Service-Specific-Units AVP.
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 (2015-11) TP_RO_CTF_OP_17
                 */
                testcase TC_RO_CTF_OP_17() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_OP_17());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_OP_17
                
                /**
                 * @desc    Verify that the IUT can successfully process combinational quota.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Requested-Service-Unit AVP
                 *     the IUT receives a CC-Answer
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER-SUCCESS
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Time-Quota-Mechanism AVP
                 *                 containing a Time-Quota-Type AVP
                 *                     indicating Table 6
                 *                 containing a Base-Time-Interval AVP
                 *                     indicating the length of the base time interval
                 *             optionally containing a Multiple-Services-Credit-Control AVP
                 *     the IUT sends a CC-Request
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER_SUCCESS
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Granted-Service-Unit AVP
                 *                 indicating reserved units
                 *             containing an Envelope AVP.
                 *             
                 *             TP variants  Reporting-Reason AVP values:
                 *             VA_01        DISCRETE_TIME_PERIOD (0)
                 *             VA_02        CONTINUOUS_TIME_PERIOD (1)
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 (2015-11) TP_RO_CTF_OP_18
                 */
                testcase TC_RO_CTF_OP_18() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_OP_18());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_OP_18
                
                /**
                 * @desc    Verify that the IUT can successfully process combinational quota – DTP algorithm.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Requested-Service-Unit AVP
                 *     the IUT receives a CC-Answer
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER-SUCCESS
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Time-Quota-Mechanism AVP
                 *                 containing a Time-Quota-Type AVP
                 *                     indicating DTP_VALUE
                 *                 containing a Base-Time-Interval AVP
                 *                     indicating the length of the base time interval
                 *             containing a Quota-Consumption-Time AVP
                 *                 indicating a period equal to the Quota Consumption Time
                 *             optionally containing a Multiple-Services-Credit-Control AVP
                 *     the IUT sends a CC-Request
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER_SUCCESS
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Granted-Service-Unit AVP
                 *                 indicating reserved units
                 *             containing an Envelope AVP
                 *                 containing an Envelope-Start-Time AVP
                 *                 containing an Envelope-Stop-Time AVP
                 *                     indicating a delta time equala to DTP_VALUE
                 *                 optionally containing a CC-Total-Octets AVP
                 *                 optionally containing a CC-Input-Octets AVP
                 *                 optionally containing a CC-Output-Octets AVP
                 *                 optionally containing a CC-Service-Specific-Unit AVP.
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 (2015-11) TP_RO_CTF_OP_19
                 */
                testcase TC_RO_CTF_OP_19() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_OP_19());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_OP_19
                
                /**
                 * @desc    Verify that the IUT can successfully process combinational quota – CTP algorithm.
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Requested-Service-Unit AVP
                 *     the IUT receives a CC-Answer
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER-SUCCESS
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Time-Quota-Mechanism AVP
                 *                 containing a Time-Quota-Type AVP
                 *                     indicating CTP_VALUE
                 *                 containing a Base-Time-Interval AVP
                 *                     indicating the length of the base time interval
                 *             containing a Quota-Consumption-Time AVP
                 *                 indicating a period equal to the Quota Consumption Time
                 *             optionally containing a Multiple-Services-Credit-Control AVP
                 *     the IUT sends a CC-Request
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER_SUCCESS
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Granted-Service-Unit AVP
                 *                 indicating reserved units
                 *             containing an Envelope AVP
                 *                 containing an Envelope-Start-Time AVP
                 *                 containing an Envelope-Stop-Time AVP 
                 *                     not indicating a delta time equala to CTP_VALUE
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 (2015-11) TP_RO_CTF_OP_20
                 */
                testcase TC_RO_CTF_OP_20() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_OP_20());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_OP_20
                
                /**
                 * @desc    Verify that the IUT can successfully process combinational 
                 *          quota when Quota-Consumption-Time AVP is present. 
                 * <pre>
                 * Pics Selection: PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that the IUT sends a CC-Request
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a CC-Request-Number AVP
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Requested-Service-Unit AVP
                 *     the IUT receives a CC-Answer
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER-SUCCESS
                 *         containing a CC-Request-Type AVP
                 *             indicating INITIAL_REQUEST
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Time-Quota-Mechanism AVP
                 *                 containing a Time-Quota-Type AVP
                 *                     indicating Table 7
                 *                 containing a Base-Time-Interval AVP
                 *                     indicating the length of the base time interval
                 *             containing a Quota-Consumption-Time AVP
                 *                 indicating a period equal to the Quota Consumption Time
                 *             optionally containing a Multiple-Services-Credit-Control AVP
                 *     the IUT sends a CC-Request
                 *         containing a Result-Code AVP
                 *             indicating DIAMETER_SUCCESS
                 *         containing a CC-Request-Type AVP
                 *             indicating UPDATE_REQUEST
                 *         containing a Multiple-Services-Credit-Control AVP
                 *             containing a Granted-Service-Unit AVP
                 *                 indicating reserved units
                 *             containing an Envelope AVP.
                 *             
                 *             Table 7
                 *             TP variants  Reporting-Reason AVP values:
                 *             VA_01        DISCRETE_TIME_PERIOD (0)
                 *             VA_02        CONTINUOUS_TIME_PERIOD (1)
                 * </pre>
                 * 
                 * @version    0.0.7
                 * @see        ETSI TS 103 374-2 (2015-11) TP_RO_CTF_OP_21
                 */
                testcase TC_RO_CTF_OP_21() runs on DiameterRfRo system TestAdapter { 
                    // Local variables
                    var DiameterRfRo v_diameterRo_ocf; 
                    var ImsComponent v_imsComponent_ue;
                    var ImsComponent v_imsComponent_cscf;
                    var CSeq p_cSeq_s := {fieldName := CSEQ_E, seqNumber := 1000, method := "REGISTER"};
                    
                    // Test control
                    if (not (PICS_RO_CTF_IUT and PICS_RO_CTF_SESSION_CHARGING_WITH_UNIT_RESERVATION)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_CTF_IUT' shall be set to true for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Ro_1Gm_1Mw_ocfUp(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf);
                    
                    // Start
                    v_diameterRo_ocf.start(f_TC_RO_CTF_OP_21());
                    if (PX_SIPsupport) {
                        v_imsComponent_ue.start(f_TC_RO_CTF_TC_UE_08(p_cSeq_s));
                        v_imsComponent_cscf.start(f_TC_RO_CTF_TC_CSCF_08(p_cSeq_s));
                    }
                    
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_sync1, c_sync2, c_tbDone, c_poDone});
                    
                    f_cf_1Ro_1Gm_1Mw_ocfDown(v_diameterRo_ocf, v_imsComponent_ue, v_imsComponent_cscf)
                    
                } // End of testcase TC_RO_CTF_OP_21
            } // End of group TP_RO_CTF_OP
juvancic's avatar
juvancic committed
        }//End of group TP_RO_CTF_Role
    } // End of group TP_RO_Role
    
} // End of module DiameterRfRo_TestCases