module test_LibItsMapemSpatem_TypesAndValues {
    
    // LibCommon
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_DataStrings all;

    // LibIts
    import from ITS_Container language "ASN.1:1997" all;
    import from MAPEM_PDU_Descriptions language "ASN.1:1997" all;
    import from SPATEM_PDU_Descriptions language "ASN.1:1997" all;
    import from DSRC language "ASN.1:1997" all;
    
    // LibItsCommon
    import from LibItsCommon_TypesAndValues all;
    
    // LibItsMapSpat
    import from LibItsMapemSpatem_TypesAndValues all;
    import from LibItsMapemSpatem_Templates all;
    import from LibItsMapemSpatem_TestSystem all;
    
    import from test_CommonCodec all;
    
    group LibItsMapemSpatem_testCases {
        
        group utPrimitives {
            
            testcase tc_UtInitialize() runs on TCType system TCType {
                test_PDU<UtInitialize>(m_mapemSpatemInitialize, false);
            }
            
            testcase tc_UtInitializeResult() runs on TCType system TCType {
                test_decodePDU<UtInitializeResult>(UtInitializeResult:true, '0101'O);
            }
            
            testcase tc_UtMapSpatTrigger_01() runs on TCType system TCType {
                test_PDU<UtMapemSpatemTrigger>(
                    m_utTriggerEvent(
                        startTLMService
                    ), 
                    false
                );
            }
            
            testcase tc_UtMapSpatTrigger_02() runs on TCType system TCType {
                test_PDU<UtMapemSpatemTrigger>(
                    m_utTriggerEvent(
                        spatemNewContent
                    ), 
                    false
                );
            }
            
            testcase tc_UtMapSpatTriggerResult() runs on TCType system TCType {
                test_decodePDU<UtMapemSpatemTriggerResult>(UtMapemSpatemTriggerResult:?, 'A10105'O);
            }
            
        } // End of group utPrimitives 
        
        group testMapSpatPrimitiveMessages {
            
            testcase tc_MapSpatReq_01() runs on TCType system TCType {
                var MapemReq v_mapReq;
                
                v_mapReq := valueof(m_mapemReq(m_mapemPdu(m_defaultMapem)));
                log("v_mapReq=", v_mapReq);
                test_PDU<MapemReq>(
                    v_mapReq, 
                    false
                );
                test_decodePDU<MapemReq>(
                    v_mapReq, 
                    '01050001B2074004800500FFFFFFFFFFFFFFFFFFFFFFFF'O
                )
            }
            
            testcase tc_MapSpatReq_02() runs on TCType system TCType {
                var SpatemReq v_spatReq;
                
                v_spatReq := valueof(
                    m_spatemReq(
                        m_spatemPdu(
                            m_spatem(m_intersections)
                )));
                log("v_spatReq=", v_spatReq);
                test_PDU<SpatemReq>(
                    v_spatReq, 
                    false
                );
                test_decodePDU<SpatemReq>(
                    v_spatReq, 
                    '01040001B2074130000000BB8520000002000080FFFFFFFFFFFFFFFFFFFFFFFF'O
                )
            }
            
            testcase tc_MapSpatInd_01() runs on TCType system TCType {
                
                test_decodePDU<MapemInd>(
                    mw_mapemInd(mw_mapemPdu), 
                    '01050001B2074004800500FFFFFFFFFFFFFFFFFFFFFFFF'O
                );
            }
            
            testcase tc_MapSpatInd_02() runs on TCType system TCType {
                
                test_decodePDU<SpatemInd>(
                    mw_spatemInd(mw_spatemPdu), 
                    '01040001B2074130000000BB8520000002000080FFFFFFFFFFFFFFFFFFFFFFFF'O
                );
            }
            
        } // End of group testMapSpatPrimitiveMessages
        
    } // End of group LibItsMapemSpatem_testCases 
    
} // End of module test_LibItsMapemSpatem_TypesAndValues 