summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-05-13 04:25:25 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-05-13 04:25:25 +0200
commit6cec6976563b6f50b39b3577972cbd460b1342c5 (patch)
tree1ed99cea0c934b7ba35257fd8a0e196d7653c870 /test
parent1e181e67e6e1483c2df29cde322e60a6dc1aaac2 (diff)
write: Implement write for the attributes and the body
This will decode and re-create the message. It is the first round-trip test.
Diffstat (limited to 'test')
-rw-r--r--test/SMPPMessageTest.st7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/SMPPMessageTest.st b/test/SMPPMessageTest.st
index 37b93df..e1b1d0e 100644
--- a/test/SMPPMessageTest.st
+++ b/test/SMPPMessageTest.st
@@ -45,6 +45,13 @@ TestCase subclass: SMPPMessageTest [
self assert: msg body addressRange equals: ''.
]
+ testRoundTrip [
+ | msg res |
+ msg := SMPPMessage readFrom: self examplePdu readStream.
+ res := msg toMessage asByteArray.
+ self assert: res equals: self examplePdu
+ ]
+
testWriteMessage [
| data |
data := (SMPPMessage new