submit: Implement round-trip handling
Fix the variable name and test round-trip handling.
This commit is contained in:
parent
9f539f1c13
commit
fbc0861df9
|
@ -65,7 +65,7 @@ SMPPBodyBase subclass: SMPPSubmitSM [
|
|||
add: (SMPPValueHolder for: #source_port tag: 16r020A);
|
||||
add: (SMPPValueHolder for: #source_addr_subunit tag: 16r000D);
|
||||
add: (SMPPValueHolder for: #destination_port tag: 16r020B);
|
||||
add: (SMPPValueHolder for: #dest_addr_submit tag: 16r0005);
|
||||
add: (SMPPValueHolder for: #dest_addr_subunit tag: 16r0005);
|
||||
add: (SMPPValueHolder for: #sar_msg_ref_num tag: 16r020C);
|
||||
add: (SMPPValueHolder for: #sar_total_segments tag: 16r020E);
|
||||
add: (SMPPValueHolder for: #sar_segment_seqnum tag: 16r020F);
|
||||
|
|
|
@ -130,11 +130,15 @@ TestCase subclass: SMPPMessageTest [
|
|||
]
|
||||
|
||||
testSubmitSM [
|
||||
| msg |
|
||||
| msg res |
|
||||
msg := SMPPMessage readFrom: self exampleSubmitSM readStream.
|
||||
self assert: msg body class equals:SMPPSubmitSM.
|
||||
self assert: msg body shortMessage equals: 'Dies ist eine Testnachricht! 2014-03-01_16.40.42'.
|
||||
self assert: msg body sourceAddress equals: '9225001'.
|
||||
self assert: msg body destinationAddress equals: '40099916'.
|
||||
|
||||
"Do round trip test"
|
||||
res := msg toMessage asByteArray.
|
||||
self assert: res equals: self exampleSubmitSM.
|
||||
]
|
||||
]
|
||||
|
|
Reference in New Issue