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

22 lines
548 B
Smalltalk
Raw Permalink Normal View History

"
A BreaQueryTest is a test class for testing the behavior of BreaQuery
"
Class {
2020-12-19 16:24:21 +00:00
#name : #BreaOperatorTest,
#superclass : #TestCase,
#category : #'Brea-Tests'
}
{ #category : #tests }
2020-12-19 16:24:21 +00:00
BreaOperatorTest >> testSTONSerialization [
| original store deserialized |
2020-12-19 16:24:21 +00:00
original := BreaOperator 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
]