| 1 |
/****************************************************************************** |
| 2 |
* Copyright (c) 2000-2021 Ericsson Telecom AB |
| 3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v2.0 |
| 5 |
* which accompanies this distribution, and is available at |
| 6 |
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html |
| 7 |
* |
| 8 |
* Contributors: |
| 9 |
* Balasko, Jeno |
| 10 |
* Lovassy, Arpad |
| 11 |
* Raduly, Csaba |
| 12 |
* |
| 13 |
******************************************************************************/ |
| 14 |
|
| 15 |
module NAS_EPS_Test |
| 16 |
{ |
| 17 |
|
| 18 |
import from NAS_EPS_v970 all; |
| 19 |
import from General_Types all; |
| 20 |
|
| 21 |
type component NAS_EPS_Test_CT { } |
| 22 |
|
| 23 |
const PDU_NAS_EPS c1_PNA := { |
| 24 |
protocolDiscriminator := '0111'B, |
| 25 |
ePS_messages := { |
| 26 |
ePS_MobilityManagement := { |
| 27 |
pDU_NAS_EPS_Uplink_Generic_NAS_Transport := { |
| 28 |
securityHeaderType := '0000'B, |
| 29 |
messageType := '01101001'B, |
| 30 |
generic_MessageContainerType := '11111111'B |
| 31 |
} |
| 32 |
} |
| 33 |
} |
| 34 |
}; |
| 35 |
|
| 36 |
const EPS_MobilityManagement c2_NAS_EPS_Test := { |
| 37 |
pDU_NAS_EPS_Uplink_Generic_NAS_Transport := { |
| 38 |
securityHeaderType := '1010'B, |
| 39 |
messageType := '10101010'B, |
| 40 |
generic_MessageContainerType := '00000000'B |
| 41 |
} |
| 42 |
}; |
| 43 |
|
| 44 |
testcase tc_NAS_EPS_Uplink_Generic_NAS_Transport() runs on NAS_EPS_Test_CT |
| 45 |
{ |
| 46 |
var octetstring v_Encoded_msg; |
| 47 |
v_Encoded_msg := enc_PDU_NAS_EPS( c1_PNA ); |
| 48 |
log("ENCODE: ",v_Encoded_msg); |
| 49 |
|
| 50 |
var PDU_NAS_EPS v_EPSM_msg; |
| 51 |
v_EPSM_msg := dec_PDU_NAS_EPS( v_Encoded_msg ); |
| 52 |
log("DECODE: ",v_EPSM_msg); |
| 53 |
|
| 54 |
if ( c1_PNA == v_EPSM_msg ) {setverdict(pass);} |
| 55 |
else {setverdict(fail);} |
| 56 |
|
| 57 |
} |
| 58 |
|
| 59 |
control |
| 60 |
{ |
| 61 |
execute( tc_NAS_EPS_Uplink_Generic_NAS_Transport() ); |
| 62 |
} |
| 63 |
|
| 64 |
} // end of module |