DiameterRfRo_TestCases.ttcn 109 KB
Newer Older
garciay's avatar
garciay committed
                 * @version    0.0.18
                 * @see        ETSI DTS/INT 00121-2 V0.0.18 (2015-10) 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' 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_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
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a Cost-Information AVP
                 *                    containing a Unit-Value AVP
                 *                        containing a Value-Digits AVP
                 *                    containing a Currency-Code AVP
                 *        }
                 *    }
                 * </pre>
                 * 
garciay's avatar
garciay committed
                 * @version    0.0.18
                 * @see        ETSI DTS/INT 00121-2 V0.0.18 (2015-10) 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' 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_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
                 *        then {
                 *            the IUT sends a CC-Answer
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_SUCCESS
                 *                containing a Remaining-Balance AVP
                 *                    containing a Unit-Value AVP
                 *                        containing a Value-Digits AVP
                 *                    containing a Currency-Code AVP
                 *        }
                 *    }
                 * </pre>
                 * 
garciay's avatar
garciay committed
                 * @version    0.0.18
                 * @see        ETSI DTS/INT 00121-2 V0.0.18 (2015-10) 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' 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_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)
                 *        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>
                 * 
garciay's avatar
garciay committed
                 * @version    0.0.18
                 * @see        ETSI DTS/INT 00121-2 V0.0.18 (2015-10) 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' 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_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
                 *        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.18
                 * @see        ETSI DTS/INT 00121-2 V0.0.18 (2015-10) TP_RO_OCF_TC_05
                 */
                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)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_EVENT_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_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
                 *        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.18
                 * @see        ETSI DTS/INT 00121-2 V0.0.18 (2015-10) TP_RO_OCF_TC_06
                 */
                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)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_EVENT_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_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
                 *        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.18
                 * @see        ETSI DTS/INT 00121-2 V0.0.18 (2015-10) TP_RO_OCF_TC_07
                 */
                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)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT 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_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
                 *        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.18
                 * @see        ETSI DTS/INT 00121-2 V0.0.18 (2015-10) TP_RO_OCF_TC_08
                 */
                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)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT 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_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
                 *        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.18
                 * @see        ETSI DTS/INT 00121-2 V0.0.18 (2015-10) TP_RO_OCF_TC_09
                 */
                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)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT 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_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
                 *                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 Multiple-Services-Credit-Control AVP
                 *                    containing a Granted-Service-Unit AVP
                 *                        indicating debites units
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @version    0.0.18
                 * @see        ETSI DTS/INT 00121-2 V0.0.18 (2015-10) TP_RO_OCF_EC_01
                 */
                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)) {
                        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_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
                 *                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
                 *        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.18
                 * @see        ETSI DTS/INT 00121-2 V0.0.18 (2015-10) TP_RO_OCF_EC_02
                 */
                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)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT 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_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
                 *                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
                 *        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.18
                 * @see        ETSI DTS/INT 00121-2 V0.0.18 (2015-10) TP_RO_OCF_EC_03
                 */
                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)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT 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_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
                 *                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
                 *        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.18
                 * @see        ETSI DTS/INT 00121-2 V0.0.18 (2015-10) TP_RO_OCF_EC_04
                 */
                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)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT 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_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
                 * <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
                 *        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.18
                 * @see        ETSI DTS/INT 00121-2 V0.0.18 (2015-10) TP_RO_OCF_CH_01
                 */
                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)) {
                        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_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
                 * <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
                 *        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.18
                 * @see        ETSI DTS/INT 00121-2 V0.0.18 (2015-10) TP_RO_OCF_CH_02
                 */
                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)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT and PICS_RO_OCF_EVENT_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_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
                 * <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
                 *        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.18
                 * @see        ETSI DTS/INT 00121-2 V0.0.18 (2015-10) TP_RO_OCF_CH_03
                 */
                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)) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_RO_OCF_IUT 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_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 {
            } // End of group TP_RO_OCF_RE
juvancic's avatar
juvancic committed
            // 5.2.3.1.7 Failure Handling 
            group TP_RO_OCF_FH {
            } // End of group TP_RO_OCF_FH
juvancic's avatar
juvancic committed
            // 5.2.3.1.8 Failover 
            group TP_RO_OCF_FA {
            } // End of group TP_RO_OCF_FA
juvancic's avatar
juvancic committed
            // 5.2.3.1.9 Credit Pooling 
            group TP_RO_OCF_CP {
            } // End of group TP_RO_OCF_CP
juvancic's avatar
juvancic committed
            // 5.2.3.1.10 Other Procedures
            group TP_RO_OCF_OP {
            } // End of group TP_RO_OCF_OP
juvancic's avatar
juvancic committed
        }//End of group TP_RO_OCF_Role
        
        //5.2.3.2. CTF Role
        group TP_RO_CTF_Role {
            // 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 {
                 *        
                 *     }