smalltalk
/
osmo-st-smpp
Archived
1
0
Fork 0

submit: Implement round-trip handling

Fix the variable name and test round-trip handling.
This commit is contained in:
Holger Hans Peter Freyther 2014-05-13 19:12:16 +02:00
parent 9f539f1c13
commit fbc0861df9
2 changed files with 6 additions and 2 deletions

View File

@ -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);

View File

@ -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.
]
]