ItsMapem_TestCases.ttcn 48.8 KB
Newer Older
//        * Pics Selection: PICS_RSU
//        * Initial conditions: 
//        *    with {
//        *        the IUT being in the "initial state"
//        *    }
//        * Expected behaviour:
//        *    ensure that {
//        *        when { 
garciay's avatar
garciay committed
//        *            a SPATEM is generated
garciay's avatar
garciay committed
//        *            the IUT sends a valid SPATEM encapsulated into a GN SHB message
//        *        }
//        *    }
//        * </pre>
//        *
//        * @version     0.0.1
//        * @see         ETSI TS 103 191-2 V0.0.1 TP/MAPEM-SPATEM/MSD//BV-16
//        * @reference No clause – Implicit to use in ITS
//        */
//        testcase TC_IS_RLT_MSD_BV_16 () runs on ItsMapemSpatem system ItsMapemSpatemSystem {
//                
//            // Local variables
//            var SpatemInd        v_message;
//            const UInt8 c_gnHtTsb := 5;
//            const UInt8 c_gnHstShb := 0;
//                
//            // Test component configuration
//            f_cfUp();
//                
//            // Preamble
//            f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
//                
//            // Test Body
//            f_utTriggerEvent ( m_utTriggerEvent ( spateMsg ) );
//            
//            tc_ac.start;
//            alt {
//                [] mapemSpatemPort.receive ( mw_spatemIndWithGnParameters ( mw_spatemPdu ( mw_itsPduHeaderSpatem , mw_spatSubId1 ), -, c_gnHtTsb, c_gnHstShb ) ) -> value v_message { 
//                    tc_ac.stop;
//                    log("*** " & testcasename() & ": PASS: Successfully received SPATEM. ***");
//                    f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
//                }
//                [] mapemSpatemPort.receive ( mw_spatemInd ( mw_spatemPdu ( mw_itsPduHeaderSpatem , mw_defaultSpatem ) ) ) { 
//                    tc_ac.stop;
//                    log("*** " & testcasename() & ": FAIL: Received an incorrect MAPEM message. ***");
//                    f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
//                }
//                []    tc_ac.timeout {
//                    log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
//                    f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
//                }
//            }
//                
//            // Postamble
//            f_poDefault();
//            f_cfDown();
//                
//        } // End of testcase TC_IS_RLT_MSD_BV-16
//
//    } // End of group MapemSpatemMessageDissemination
//
//    group MapemSpatemMessageProcessing { 
//
//        /**
//        * @desc Verify  that: when the IUT receives a GN SHB message encapsulating a MapData message, it pass the message to the application layer.
//        * <pre>
//        * Pics Selection: PICS_VEHICLE
//        * Initial conditions: 
//        *    with {
//        *        the IUT being in the "initial state"
//        *    }
//        * Expected behaviour:
//        *    ensure that {
//        *        when { 
//        *            the IUT receives a valid MapData message encapsulated into a GN SHB message
//            *    }
//        *        then {
//        *            the IUT forwards the MapData message content to upper layers
//        *        }
//        *    }
//        * </pre>
//        *
//        * @version   0.0.1
//        * @see         ETSI TS 103 191-2 V0.0.1 TP/MAPEM-SPATEM/MSP//BV-01
//        * @reference No clause – Implicit to use in ITS
//        */
//        testcase TC_IS_RLT_MSP_BV_01 () runs on ItsMapemSpatem system ItsMapemSpatemSystem {
//                
//            // Local variables
//            var MapReq        v_mapReq;
//            var integer        i;
//                
//            // Test component configuration
//            f_cfUp();
//                
//            // Preamble
//            f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
//                
//            // Test Body
//            v_mapReq := valueof (  m_mapemReq ( m_mapemPdu ( m_map ) ) );
//            mapemSpatemPort.send( v_mapReq ) ;
//            
//            f_sleep(PX_TAC);
//            for ( i:=0 ; i < lengthof ( vc_utMapEvents ) and not match ( v_mapReq.msgOut, vc_utMapEvents[i].mapeMsg ) ; i := i+1 ) {
//                // empty on purpose 
//            }
//            if ( i < lengthof ( vc_utMapEvents ) ) {
//                log("*** " & testcasename() & ": PASS: MAPEM was transmitted to upper layer ***");
//                f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
//            }
//            else {
//                log("*** " & testcasename() & ": FAIL: MAPEM was not transmitted to upper layer ***");
//                f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
//            }
//                
//            // Postamble
//            f_poDefault();
//            f_cfDown();
//                
//        } // End of testcase TC_IS_RLT_MSP_BV_01
//
//        /**
//        * @desc Verify  that: when the IUT receives a GN SHB message encapsulating a SPATEM message, it pass the message to the application layer.
//        * <pre>
//        * Pics Selection: PICS_VEHICLE
//        * Initial conditions: 
//        *    with {
//        *        the IUT being in the "initial state"
//        *    }
//        * Expected behaviour:
//        *    ensure that {
//        *        when { 
garciay's avatar
garciay committed
//        *            the IUT receives a valid SPATEM encapsulated into a GN SHB message
garciay's avatar
garciay committed
//        *            the IUT forwards the SPATEM content to upper layers
//        *        }
//        *    }
//        * </pre>
//        *
//        * @version   0.0.1
//        * @see         ETSI TS 103 191-2 V0.0.1 TP/MAPEM-SPATEM/MSP//BV-02
//        * @reference No clause – Implicit to use in ITS
//        */
//        testcase TC_IS_RLT_MSP_BV_02 () runs on ItsMapemSpatem system ItsMapemSpatemSystem {
//                
//            // Local variables
//            var SpatemReq        v_spatReq;
//            var integer        i;
//                
//            // Test component configuration
//            f_cfUp();
//                
//            // Preamble
//            f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
//                
//            // Test Body
//            v_spatReq := valueof (  m_spatemReq ( m_spatemPdu ( m_spat ) ) );
//            mapemSpatemPort.send ( v_spatReq ) ;
//            
//            f_sleep(PX_TAC);
//            for ( i:=0 ; i < lengthof ( vc_utSpatemEvents ) and not match ( v_spatReq.msgOut , vc_utSpatemEvents[i].spateMsg ) ; i:=i+1 ) {
//                // empty on purpose 
//            }
//            if ( i < lengthof ( vc_utSpatemEvents ) ) {
//                log("*** " & testcasename() & ": PASS: SPATEM was transmitted to upper layer ***");
//                f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
//            }
//            else {
//                log("*** " & testcasename() & ": FAIL: SPATEM was not transmitted to upper layer ***");
//                f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
//            }
//                
//            // Postamble
//            f_poDefault();
//            f_cfDown();
//                
//        } // End of testcase TC_IS_RLT_MSP_BV_02
//
//    } // End of group MapemSpatemMessageProcessing
//    
} // End of module ItsMapem_TestCases