Brea/repository/Brea-Tests/BreaQueryTest.class.st

22 lines
560 B
Smalltalk
Raw Permalink Normal View History

"
A BreaQueryTest is a test class for testing the behavior of BreaQuery
"
Class {
#name : #BreaQueryTest,
#superclass : #TestCase,
#category : #'Brea-Tests'
}
{ #category : #tests }
BreaQueryTest >> testSTONSerialization [
| original store deserialized |
original := BreaQuery new
name: 'plus';
inputs: {'a' -> 3. 'b' -> 4} asDictionary;
codeBlock: [ :x :y | x + y ].
store := STON toString: original.
deserialized := (STONReader on: store readStream) next.
self assert: original execute equals: deserialized execute
]