This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
2010-10-16 17:28:35 +00:00
|
|
|
"Test Case for Osmo-Network"
|
|
|
|
|
|
|
|
TestCase subclass: SCCPTests [
|
|
|
|
SCCPTests class >> packageNamesUnderTest [
|
|
|
|
<category: 'accessing'>
|
|
|
|
^ #('OsmoNetwork')
|
|
|
|
]
|
|
|
|
|
|
|
|
testReleasedFormat [
|
|
|
|
| rlsd msg |
|
|
|
|
rlsd := SCCPConnectionReleased initWith: 16r1F0A01 dest: 16r401 cause: 16rFE.
|
|
|
|
msg := rlsd toMessage toByteArray.
|
|
|
|
|
|
|
|
self assert: msg = #(4 1 4 0 1 16r0A 16r1F 16rFE 1 0) asByteArray
|
|
|
|
]
|
2010-10-16 18:08:47 +00:00
|
|
|
|
|
|
|
testDT1 [
|
|
|
|
| dt1 msg |
|
|
|
|
dt1 := SCCPConnectionData initWith: 16r401 data: '1234' asByteArray.
|
|
|
|
msg := dt1 toMessage toByteArray.
|
|
|
|
|
|
|
|
self assert: msg = #(6 1 4 0 0 1 4 49 50 51 52) asByteArray.
|
|
|
|
]
|
2010-11-15 18:07:37 +00:00
|
|
|
|
|
|
|
testCR [
|
|
|
|
| cr msg |
|
|
|
|
cr := SCCPConnectionRequest
|
|
|
|
initWith: 16r0300BF
|
|
|
|
dest: (SCCPAddress createWith: 254)
|
|
|
|
data: '1234' asByteArray.
|
|
|
|
msg := cr toMessage toByteArray.
|
|
|
|
msg printNl.
|
|
|
|
|
|
|
|
self assert: msg = #(1 191 0 3 2 2 4 2 66 254 15 4 49 50 51 52 0) asByteArray
|
|
|
|
]
|
2010-10-16 17:28:35 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
TestCase subclass: IPATests [
|
|
|
|
IPATests class >> packageNamesUnderTest [
|
|
|
|
<category: 'accessing'>
|
|
|
|
^ #('OsmoNetwork')
|
|
|
|
]
|
|
|
|
|
|
|
|
testSize [
|
2010-10-19 08:06:11 +00:00
|
|
|
self assert: IPASCCPState sizeof = 25.
|
2010-10-16 17:28:35 +00:00
|
|
|
]
|
|
|
|
]
|