forked from PolyMathOrg/PolyMath
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPMAccuracyFindKeyTest.class.st
More file actions
47 lines (39 loc) · 1.13 KB
/
PMAccuracyFindKeyTest.class.st
File metadata and controls
47 lines (39 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
"
This test case exercises the findKey: message with some regression tests.
"
Class {
#name : 'PMAccuracyFindKeyTest',
#superclass : 'TestCase',
#instVars : [
'accuracy'
],
#category : 'Math-Tests-Accuracy',
#package : 'Math-Tests-Accuracy'
}
{ #category : 'tests' }
PMAccuracyFindKeyTest >> assertKeyFor: selector equals: expected [
self assert: (accuracy findKey: selector) equals: expected
]
{ #category : 'running' }
PMAccuracyFindKeyTest >> setUp [
super setUp.
accuracy := PMAccuracyTestExample new
]
{ #category : 'tests' }
PMAccuracyFindKeyTest >> testFindKeyReturnsAllTheRestStringWhenSelectorCorrespondsToNonExistentProperty [
| selector |
selector := 'NonExistent'.
self assertKeyFor: selector equals: 'AllTheRest'
]
{ #category : 'tests' }
PMAccuracyFindKeyTest >> testFindKeyReturnsAllTheRestStringWhenSelectorIsInitialize [
| selector |
selector := 'initialize'.
self assertKeyFor: selector equals: 'AllTheRest'
]
{ #category : 'tests' }
PMAccuracyFindKeyTest >> testFindKeyReturnsPropertyWhenSelectorIsSuffixOfInitializePropertyMessage [
| selector |
selector := 'Aaa'.
self assertKeyFor: selector equals: 'Aaa'
]