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:
parent
43c5a43e80
commit
b9d70c018f
23
Tests.st
23
Tests.st
|
@ -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 [
|
||||
|
|
|
@ -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]].
|
||||
]
|
||||
]
|
||||
|
|
Reference in New Issue