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/grease/Tests/Core/GROrderedMultiMapTest.st

45 lines
1.0 KiB
Smalltalk

GRSmallDictionaryTest subclass: GROrderedMultiMapTest [
<comment: nil>
<category: 'Grease-Tests-Core'>
GROrderedMultiMapTest class >> shouldInheritSelectors [
<category: 'testing'>
^true
]
allowsDuplicateKeys [
<category: 'configuration'>
^true
]
collectionClass [
<category: 'configuration'>
^GROrderedMultiMap
]
testAllAt [
<category: 'tests-accessing'>
self assert: (collection allAt: '1') = #().
collection at: '1' add: 'foo'.
collection at: '1' add: 'bar'.
self assert: (collection allAt: '1') = #('foo' 'bar')
]
testAllAtIfAbsent [
<category: 'tests-accessing'>
self assert: (collection allAt: '1' ifAbsent: ['absent']) = 'absent'.
collection at: '1' add: 'foo'.
collection at: '1' add: 'bar'.
self assert: (collection allAt: '1' ifAbsent: ['absent']) = #('foo' 'bar')
]
testAtAdd [
<category: 'tests-accessing'>
collection at: '1' add: 'foo'.
collection at: '1' add: 'bar'.
self assertAssociations: (Array with: '1' -> 'foo' with: '1' -> 'bar')
]
]