diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-05-13 04:25:25 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-05-13 04:25:25 +0200 |
commit | 6cec6976563b6f50b39b3577972cbd460b1342c5 (patch) | |
tree | 1ed99cea0c934b7ba35257fd8a0e196d7653c870 /test | |
parent | 1e181e67e6e1483c2df29cde322e60a6dc1aaac2 (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.st | 7 |
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 |