1
0
Fork 0

misc: Improve the test coverage of the OsmoNetwork

Get the >>#parameterName/>>#spec out of the uncovered methods, this
is done by just finding the right classes and calling the selectors.
Add some simple tests for a MessageBuffer method that was not covered
yet.
This commit is contained in:
Holger Hans Peter Freyther 2013-05-14 14:18:33 +02:00
parent 43c5a43e80
commit b9d70c018f
2 changed files with 32 additions and 0 deletions

View File

@ -236,6 +236,29 @@ TestCase subclass: MessageBufferTest [
self assert: msg size = 0.
self assert: msg toByteArray = #() asByteArray.
]
testPrependByteArray [
| msg |
msg := MessageBuffer new.
msg putByteArray: #(3 4 5) asByteArray.
msg prependByteArray: #(1 2) asByteArray.
self assert: msg toByteArray = #(1 2 3 4 5) asByteArray.
msg := MessageBuffer new.
msg prependByteArray: #(1 2) asByteArray.
msg putByteArray: #(3 4 5) asByteArray.
self assert: msg toByteArray = #(1 2 3 4 5) asByteArray.
msg := MessageBuffer new.
msg prependByteArray: #(1 2) asByteArray.
self assert: msg toByteArray = #(1 2) asByteArray.
]
testIdentity [
| msg |
msg := MessageBuffer new.
self assert: msg toMessage == msg.
]
]
TestCase subclass: M2UAMSGTests [

View File

@ -66,4 +66,13 @@ TestCase subclass: ISUPGeneratedTest [
testClassCount [
self assert: ISUPMessage allSubclasses size = 46.
]
testSpecParmameterNameSmokeTest [
MSGField allSubclassesDo: [:class |
class category = 'OsmoNetwork-ISUP'
ifTrue: [
self
assert: class parameterName isString;
assert: class spec isString]].
]
]