smalltalk
/
osmo-st-all
Archived
1
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
osmo-st-all/Core/Tests/Unit/Buildables/ActionTest.st

32 lines
546 B
Smalltalk

TestCase subclass: ActionTest [
| action |
<comment: nil>
<category: 'Iliad-Tests-Unit-Buildables'>
setUp [
<category: 'running'>
action := Action new
]
testBlock [
<category: 'testing'>
action block: [1 + 1].
self assert: action block value = 2
]
testEvaluate [
<category: 'testing'>
| result |
result := 2.
action block: [:it | it + 1].
action value: result.
result := action evaluate.
self assert: result = 3.
action value: result.
result := action evaluate.
self assert: result = 4
]
]