|
| 1 | +Class { |
| 2 | + #name : 'ConfigurationForPillarTest', |
| 3 | + #superclass : 'TestCase', |
| 4 | + #category : 'Pillar-Chrysal', |
| 5 | + #package : 'Pillar-Chrysal' |
| 6 | +} |
| 7 | + |
| 8 | +{ #category : 'as yet unclassified' } |
| 9 | +ConfigurationForPillarTest >> configurationDictionary [ |
| 10 | + |
| 11 | +^ STONJSON fromString: '{ |
| 12 | + "language" : "en-UK", |
| 13 | + "base_url" : "", |
| 14 | + "attribution" : "Stéphane Ducasse and Guillermo Polito", |
| 15 | + "keywords" : "Interpreters, languages, Pharo, Smalltalk", |
| 16 | + "title" : "Fun with Interpreters in Pharo", |
| 17 | + "series" : "The Pharo Booklet Collection — edited by S. Ducasse", |
| 18 | + "htmlWriter" : "html", |
| 19 | + "latexWriter" : "miclatex:sbabook", |
| 20 | + "bibFile" : "others.bib", |
| 21 | + "checkers" : [ "Vocabulary" , "EnglishTypography" ], |
| 22 | + "checkerConfigurations" : |
| 23 | + [ |
| 24 | + "Vocabulary" : |
| 25 | + [ |
| 26 | + [ |
| 27 | + "sub-presenter", |
| 28 | + "subpresenter" |
| 29 | + ], |
| 30 | + [ |
| 31 | + "sub presenter", |
| 32 | + "subpresenter" |
| 33 | + ], |
| 34 | + [ |
| 35 | + "meta object", |
| 36 | + "metaobject" |
| 37 | + ] |
| 38 | + ] |
| 39 | + ] |
| 40 | +}' |
| 41 | + |
| 42 | +] |
| 43 | + |
| 44 | +{ #category : 'as yet unclassified' } |
| 45 | +ConfigurationForPillarTest >> testCheckers [ |
| 46 | + |
| 47 | + | configuration | |
| 48 | + |
| 49 | + configuration := ConfigurationForPillar newFromSTONDictionary: self configurationDictionary. |
| 50 | + self |
| 51 | + assert: (configuration at: 'checkers') |
| 52 | + equals: #('Vocabulary' 'EnglishTypography') |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | +] |
| 59 | + |
| 60 | +{ #category : 'as yet unclassified' } |
| 61 | +ConfigurationForPillarTest >> testCheckersConfiguration [ |
| 62 | + |
| 63 | + | configuration | |
| 64 | + |
| 65 | + configuration := ConfigurationForPillar newFromSTONDictionary: self configurationDictionary. |
| 66 | + self |
| 67 | + assert: (configuration at: 'checkerConfigurations') |
| 68 | + equals: {'Vocabulary'->#(#('sub-presenter' 'subpresenter') #('sub presenter' 'subpresenter') #('meta object' 'metaobject'))} |
| 69 | + |
| 70 | + |
| 71 | +] |
0 commit comments