-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[issue-154] Corrected the behaviour of findKey, making it more testab…
…le in the subclass to mitigate risk.
- Loading branch information
1 parent
644e8f9
commit e54af6f
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
" | ||
This test case exercises the findKey: message with some regression tests. | ||
" | ||
Class { | ||
#name : #PMAccuracyFindKeyTest, | ||
#superclass : #TestCase, | ||
#category : #'Math-Tests-Accuracy' | ||
} | ||
|
||
{ #category : #tests } | ||
PMAccuracyFindKeyTest >> testFindKeyReturnsAllTheRestStringWhenSelectorCorrespondsToNonExistentProperty [ | ||
| accuracy | | ||
accuracy := PMAccuracyTestExample new. | ||
|
||
self assert: (accuracy findKey: 'NonExistent') equals: 'AllTheRest' | ||
] | ||
|
||
{ #category : #tests } | ||
PMAccuracyFindKeyTest >> testFindKeyReturnsAllTheRestStringWhenSelectorIsInitialize [ | ||
| accuracy selector | | ||
accuracy := PMAccuracyTestExample new. | ||
selector := 'initialize'. | ||
|
||
self assert: (accuracy findKey: selector) equals: 'AllTheRest' | ||
] | ||
|
||
{ #category : #tests } | ||
PMAccuracyFindKeyTest >> testFindKeyReturnsPropertyWhenSelectorIsSuffixOfInitializePropertyMessage [ | ||
| accuracy | | ||
accuracy := PMAccuracyTestExample new. | ||
|
||
self assert: (accuracy findKey: 'Aaa') equals: 'Aaa' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters