Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
marschall committed Oct 20, 2024
1 parent 2f53e95 commit f6be4f2
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ handling
handle: aRequestContext
"Resume processing of a request. To ensure valid application state restore all registered states."

self states restore.
self restoreState.
self withUnregisteredHandlerDo: [ super handle: aRequestContext ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
processing
restoreState

self states restore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ testing
testClear
cache at: 1 put: 'one'.
cache clear.
self assert: (cache at: 1 ifAbsent: [ 'two' ]) = 'two'.
self assert: (cache at: 1 ifAbsent: [ 'two' ]) equals: 'two'.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
testing
testKeyAtValue
cache at: 1 put: 'one'.
self assert: (cache keyAtValue: 'one' ifAbsent: [ 2 ]) = 1.
self assert: (cache keyAtValue: 'two' ifAbsent: [ 2 ]) = 2.
self assert: (cache keyAtValue: 'one' ifAbsent: [ 2 ]) equals: 1.
self assert: (cache keyAtValue: 'two' ifAbsent: [ 2 ]) equals: 2.
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ testKeysAndValuesDo
cache keysAndValuesDo: [ :key :value |
readBack at: key put: value ].

self assert: readBack = reference
self assert: readBack equals: reference
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
testing
testSize
self assert: cache size = 0.
self assert: cache size equals: 0.
cache at: 1 put: 'one'.
self assert: cache size = 1.
self assert: cache size equals: 1.
cache at: 2 put: 'two'.
self assert: cache size = 1.
self assert: cache size equals: 1.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ testStore
WAKeyGenerator
use: generator
during: [
self assert: (cache store: 'key1') = 1.
self assert: (cache store: 'key2') = 2.
self assert: (cache store: 'key3') = 3 ]
self assert: (cache store: 'key1') equals: 1.
self assert: (cache store: 'key2') equals: 2.
self assert: (cache store: 'key3') equals: 3 ]

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
processing
restoreState
"don't restore states"

Check warning on line 3 in repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/restoreState.st

View check run for this annotation

Codecov / codecov/patch

repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/restoreState.st#L1-L3

Added lines #L1 - L3 were not covered by tests
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
initialization
initialize
(WAAdmin register: self asApplicationAt: 'examples/web-components')
| application |
"register such that we do not have the developer tools"
application := WAAdmin register: WAApplication at: 'examples/web-components' in: WAAdmin defaultDispatcher.
application configuration addParent: WARenderLoopConfiguration instance.
application
rootClass: self;
scriptGeneratorClass: WANullScriptGenerator

0 comments on commit f6be4f2

Please sign in to comment.