test_LibItsMapSpat_TypesAndValues.ttcn3 4 KB
Newer Older
garciay's avatar
garciay committed
1
module test_LibItsMapemSpatem_TypesAndValues {
2 3 4 5 6 7 8
    
    // LibCommon
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_DataStrings all;

    // LibIts
    import from ITS_Container language "ASN.1:1997" all;
garciay's avatar
garciay committed
9 10
    import from MAPEM_PDU_Descriptions language "ASN.1:1997" all;
    import from SPATEM_PDU_Descriptions language "ASN.1:1997" all;
11 12 13 14 15 16
    import from DSRC language "ASN.1:1997" all;
    
    // LibItsCommon
    import from LibItsCommon_TypesAndValues all;
    
    // LibItsMapSpat
garciay's avatar
garciay committed
17 18 19
    import from LibItsMapemSpatem_TypesAndValues all;
    import from LibItsMapemSpatem_Templates all;
    import from LibItsMapemSpatem_TestSystem all;
20 21 22
    
    import from test_CommonCodec all;
    
garciay's avatar
garciay committed
23
    group LibItsMapemSpatem_testCases {
24 25 26 27
        
        group utPrimitives {
            
            testcase tc_UtInitialize() runs on TCType system TCType {
garciay's avatar
garciay committed
28
                test_PDU<UtInitialize>(m_mapemSpatemInitialize, false);
29 30 31 32 33 34 35
            }
            
            testcase tc_UtInitializeResult() runs on TCType system TCType {
                test_decodePDU<UtInitializeResult>(UtInitializeResult:true, '0101'O);
            }
            
            testcase tc_UtMapSpatTrigger_01() runs on TCType system TCType {
garciay's avatar
garciay committed
36
                test_PDU<UtMapemSpatemTrigger>(
37
                    m_utTriggerEvent(
garciay's avatar
garciay committed
38
                        startTLMService
39 40 41 42 43 44
                    ), 
                    false
                );
            }
            
            testcase tc_UtMapSpatTrigger_02() runs on TCType system TCType {
garciay's avatar
garciay committed
45
                test_PDU<UtMapemSpatemTrigger>(
46
                    m_utTriggerEvent(
garciay's avatar
garciay committed
47
                        spatemNewContent
48 49 50 51 52 53
                    ), 
                    false
                );
            }
            
            testcase tc_UtMapSpatTriggerResult() runs on TCType system TCType {
garciay's avatar
garciay committed
54
                test_decodePDU<UtMapemSpatemTriggerResult>(UtMapemSpatemTriggerResult:?, 'A10105'O);
55 56 57 58 59 60 61
            }
            
        } // End of group utPrimitives 
        
        group testMapSpatPrimitiveMessages {
            
            testcase tc_MapSpatReq_01() runs on TCType system TCType {
garciay's avatar
garciay committed
62
                var MapemReq v_mapReq;
63
                
garciay's avatar
garciay committed
64
                v_mapReq := valueof(m_mapemReq(m_mapemPdu(m_defaultMapem)));
65
                log("v_mapReq=", v_mapReq);
garciay's avatar
garciay committed
66
                test_PDU<MapemReq>(
67 68 69
                    v_mapReq, 
                    false
                );
garciay's avatar
garciay committed
70
                test_decodePDU<MapemReq>(
71 72 73 74 75 76
                    v_mapReq, 
                    '01050001B2074004800500FFFFFFFFFFFFFFFFFFFFFFFF'O
                )
            }
            
            testcase tc_MapSpatReq_02() runs on TCType system TCType {
garciay's avatar
garciay committed
77
                var SpatemReq v_spatReq;
78 79
                
                v_spatReq := valueof(
garciay's avatar
garciay committed
80 81
                    m_spatemReq(
                        m_spatemPdu(
82
                            m_spatem(m_intersections)
83 84
                )));
                log("v_spatReq=", v_spatReq);
garciay's avatar
garciay committed
85
                test_PDU<SpatemReq>(
86 87 88
                    v_spatReq, 
                    false
                );
garciay's avatar
garciay committed
89
                test_decodePDU<SpatemReq>(
90 91 92 93 94 95 96
                    v_spatReq, 
                    '01040001B2074130000000BB8520000002000080FFFFFFFFFFFFFFFFFFFFFFFF'O
                )
            }
            
            testcase tc_MapSpatInd_01() runs on TCType system TCType {
                
garciay's avatar
garciay committed
97 98
                test_decodePDU<MapemInd>(
                    mw_mapemInd(mw_mapemPdu), 
99 100 101 102 103 104
                    '01050001B2074004800500FFFFFFFFFFFFFFFFFFFFFFFF'O
                );
            }
            
            testcase tc_MapSpatInd_02() runs on TCType system TCType {
                
garciay's avatar
garciay committed
105 106
                test_decodePDU<SpatemInd>(
                    mw_spatemInd(mw_spatemPdu), 
107 108 109 110 111 112
                    '01040001B2074130000000BB8520000002000080FFFFFFFFFFFFFFFFFFFFFFFF'O
                );
            }
            
        } // End of group testMapSpatPrimitiveMessages
        
garciay's avatar
garciay committed
113
    } // End of group LibItsMapemSpatem_testCases 
114
    
garciay's avatar
garciay committed
115
} // End of module test_LibItsMapemSpatem_TypesAndValues