[Pkg] The Trunk: HelpSystem-Tests-mha.10.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun May 2 15:47:06 UTC 2010
A new version of HelpSystem-Tests was added to project The Trunk:
http://source.squeak.org/trunk/HelpSystem-Tests-mha.10.mcz
==================== Summary ====================
Name: HelpSystem-Tests-mha.10
Author: mha
Time: 2 May 2010, 3:47:31.476 pm
UUID: 55a20130-bf9e-4194-85ff-59b80dabf986
Ancestors: HelpSystem-Tests-tbn.9
installable package for trunk
==================== Snapshot ====================
SystemOrganization addCategory: #'HelpSystem-Tests-Core-Model'!
SystemOrganization addCategory: #'HelpSystem-Tests-Builders'!
SystemOrganization addCategory: #'HelpSystem-Tests-Core-UI'!
TestCase subclass: #ClassAPIHelpBuilderTest
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'HelpSystem-Tests-Builders'!
----- Method: ClassAPIHelpBuilderTest>>testDefaultBuilding (in category 'testing') -----
testDefaultBuilding
|topic|
topic := ClassAPIHelpBuilder
buildHelpTopicFrom: Integer.
self assert: topic subtopics size = 2.
self assert: topic subtopics first title = 'Instance side'.
self assert: topic subtopics last title = 'Class side'
!
----- Method: ClassAPIHelpBuilderTest>>testMethodsButNoSubclasses (in category 'testing') -----
testMethodsButNoSubclasses
|topic|
topic := ClassAPIHelpBuilder
buildHierarchicalHelpTopicFrom: Integer
withSubclasses: false
withMethods: true.
self assert: topic subtopics size = 2.
self assert: topic subtopics first title = 'Instance side'.
self assert: topic subtopics last title = 'Class side'
!
TestCase subclass: #HelpBrowserTest
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'HelpSystem-Tests-Core-UI'!
----- Method: HelpBrowserTest>>defaulTestClass (in category 'accessing') -----
defaulTestClass
^HelpBrowser!
----- Method: HelpBrowserTest>>testOpen (in category 'testing') -----
testOpen
|block|
block := [
|browser|
browser := self defaulTestClass open.
World doOneCycleNow.
browser close ].
self shouldnt: block raise: Exception
!
----- Method: HelpBrowserTest>>testRegistration (in category 'testing') -----
testRegistration
"there is no world menu in 1.1."
HelpBrowser isPharo11 ifTrue: [^self].
TheWorldMenu registeredOpenCommands detect: [:each | each first = 'Help Browser'] ifNone: [self fail].
!
TestCase subclass: #HelpIconsTest
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'HelpSystem-Tests-Core-UI'!
----- Method: HelpIconsTest>>defaultTestClass (in category 'accessing') -----
defaultTestClass
^HelpIcons!
----- Method: HelpIconsTest>>testIconCaching (in category 'testing') -----
testIconCaching
| first second |
#(bookIcon pageIcon refreshIcon) do: [:iconSymbol |
first := self defaultTestClass iconNamed: iconSymbol.
second := self defaultTestClass iconNamed: iconSymbol.
self assert: first notNil.
self assert: first == second.
]
!
TestCase subclass: #HelpTopicListItemWrapperTest
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'HelpSystem-Tests-Core-UI'!
----- Method: HelpTopicListItemWrapperTest>>defaultTestClass (in category 'accessing') -----
defaultTestClass
^HelpTopicListItemWrapper
!
----- Method: HelpTopicListItemWrapperTest>>testDisplayLabel (in category 'testing') -----
testDisplayLabel
|instance|
instance := self defaultTestClass with: (HelpTopic named: 'My Topic').
self assert: instance asString = 'My Topic'
!
TestCase subclass: #HelpTopicTest
instanceVariableNames: 'topic'
classVariableNames: ''
poolDictionaries: ''
category: 'HelpSystem-Tests-Core-Model'!
----- Method: HelpTopicTest>>defaultTestClass (in category 'accessing') -----
defaultTestClass
^HelpTopic !
----- Method: HelpTopicTest>>setUp (in category 'running') -----
setUp
super setUp.
topic := self defaultTestClass new.!
----- Method: HelpTopicTest>>testAddingSubtopic (in category 'testing') -----
testAddingSubtopic
|subtopic returned|
subtopic := self defaultTestClass named: 'Subtopic'.
returned := topic addSubtopic: subtopic.
self assert: returned == subtopic.
self assert: (topic subtopics includes: subtopic) !
----- Method: HelpTopicTest>>testInitialization (in category 'testing') -----
testInitialization
self assert: topic title = 'Unnamed Topic'.
self assert: topic key isEmpty.
self assert: topic contents isEmpty !
----- Method: HelpTopicTest>>testInstanceCreation (in category 'testing') -----
testInstanceCreation
|instance|
instance := self defaultTestClass named: 'My Topic'.
self assert: instance title = 'My Topic'.
!
----- Method: HelpTopicTest>>testSortOrder (in category 'testing') -----
testSortOrder
|a b c sorted |
a := self defaultTestClass named: 'A'.
b := self defaultTestClass named: 'B'.
c := self defaultTestClass named: 'C'.
sorted := (OrderedCollection with: b with: c with: a) asSortedCollection.
self assert: sorted first = a.
self assert: sorted last = c.
!
More information about the Packages
mailing list