Patrick Rein uploaded a new version of HelpSystem-Tests to project The Trunk:
http://source.squeak.org/trunk/HelpSystem-Tests-pre.21.mcz ==================== Summary ==================== Name: HelpSystem-Tests-pre.21 Author: pre Time: 13 December 2018, 12:22:53.399468 pm UUID: 34bfe3d0-cae7-40ed-a82a-0ab59110965a Ancestors: HelpSystem-Tests-dtl.20 Categorizes uncategorized methods in the HelpSystem tests package. =============== Diff against HelpSystem-Tests-dtl.20 =============== Item was changed: + ----- Method: AdvancedHelpBrowserDummy>>model (in category 'accessing') ----- - ----- Method: AdvancedHelpBrowserDummy>>model (in category 'testing') ----- model ^self! Item was changed: + ----- Method: AdvancedHelpBrowserDummy>>showFirstTopic (in category 'mocking') ----- - ----- Method: AdvancedHelpBrowserDummy>>showFirstTopic (in category 'testing') ----- showFirstTopic ^rootTopic! Item was changed: + ----- Method: ClassAPIHelpBuilderTest>>testDefaultBuilding (in category 'tests') ----- - ----- Method: ClassAPIHelpBuilderTest>>testDefaultBuilding (in category 'testing') ----- testDefaultBuilding |topic| topic := CurrentReadOnlySourceFiles cacheDuring: [ 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' ! Item was changed: + ----- Method: ClassAPIHelpBuilderTest>>testMethodsButNoSubclasses (in category 'tests') ----- - ----- Method: ClassAPIHelpBuilderTest>>testMethodsButNoSubclasses (in category 'testing') ----- testMethodsButNoSubclasses |topic| topic := CurrentReadOnlySourceFiles cacheDuring: [ 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' ! Item was changed: + ----- Method: HelpBrowserTest>>testDefaultHelpBrowser (in category 'tests') ----- - ----- Method: HelpBrowserTest>>testDefaultHelpBrowser (in category 'testing') ----- testDefaultHelpBrowser | current replacement instance | current := self defaultTestClass defaultHelpBrowser. replacement := AdvancedHelpBrowserDummy. [ self defaultTestClass defaultHelpBrowser: replacement. self assert: self defaultTestClass defaultHelpBrowser == replacement. instance := self defaultTestClass open. self assert: instance rootTopic notNil. self assert: instance isOpen. ] ensure: [ self defaultTestClass defaultHelpBrowser: current ] ! Item was changed: + ----- Method: HelpBrowserTest>>testDefaultHelpBrowserIsReplacable (in category 'tests') ----- - ----- Method: HelpBrowserTest>>testDefaultHelpBrowserIsReplacable (in category 'testing') ----- testDefaultHelpBrowserIsReplacable | current replacement instance | "save the one that is registered" current := self defaultTestClass defaultHelpBrowser. replacement := AdvancedHelpBrowserDummy. [ self defaultTestClass defaultHelpBrowser: replacement. self assert: self defaultTestClass defaultHelpBrowser == replacement. instance := self defaultTestClass open. ] ensure: [ self defaultTestClass defaultHelpBrowser: current ] ! Item was changed: + ----- Method: HelpBrowserTest>>testLazyDefaultHelpBrowser (in category 'tests') ----- - ----- Method: HelpBrowserTest>>testLazyDefaultHelpBrowser (in category 'testing') ----- testLazyDefaultHelpBrowser self assert: self defaultTestClass defaultHelpBrowser notNil! Item was changed: + ----- Method: HelpBrowserTest>>testOpen (in category 'tests') ----- - ----- Method: HelpBrowserTest>>testOpen (in category 'testing') ----- testOpen | browser | [ "This should not throw an exception." browser := self defaultTestClass open. Project current world doOneCycleNow ] ensure: [ browser ifNotNil: [ browser delete ] ]! Item was changed: + ----- Method: HelpBrowserTest>>testRegistration (in category 'tests') ----- - ----- Method: HelpBrowserTest>>testRegistration (in category 'testing') ----- testRegistration TheWorldMenu registeredOpenCommands detect: [:each | each first = 'Help Browser'] ifNone: [self fail]. ! Item was changed: + ----- Method: HelpIconsTest>>testIconCaching (in category 'tests') ----- - ----- 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. ] ! Item was changed: + ----- Method: HelpTopicListItemWrapperTest>>testDisplayLabel (in category 'tests') ----- - ----- Method: HelpTopicListItemWrapperTest>>testDisplayLabel (in category 'testing') ----- testDisplayLabel |instance| instance := self defaultTestClass with: (HelpTopic named: 'My Topic'). self assert: instance asString = 'My Topic' ! Item was changed: + ----- Method: HelpTopicTest>>testAddingSubtopic (in category 'tests') ----- - ----- 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) ! Item was changed: + ----- Method: HelpTopicTest>>testInitialization (in category 'tests') ----- - ----- Method: HelpTopicTest>>testInitialization (in category 'testing') ----- testInitialization self assert: topic title = 'Unnamed Topic'. self assert: topic contents isEmpty ! Item was changed: + ----- Method: HelpTopicTest>>testInstanceCreation (in category 'tests') ----- - ----- Method: HelpTopicTest>>testInstanceCreation (in category 'testing') ----- testInstanceCreation |instance| instance := self defaultTestClass named: 'My Topic'. self assert: instance title = 'My Topic'. ! Item was changed: + ----- Method: HelpTopicTest>>testSortOrder (in category 'tests') ----- - ----- 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) sort. self assert: sorted first = a. self assert: sorted last = c. ! |
Free forum by Nabble | Edit this page |