diff --git a/source/Launchpad-Commands-Tests/LaunchpadCommandLineHandlerTest.class.st b/source/Launchpad-Commands-Tests/LaunchpadCommandLineHandlerTest.class.st index 73c79c7..0186b7f 100644 --- a/source/Launchpad-Commands-Tests/LaunchpadCommandLineHandlerTest.class.st +++ b/source/Launchpad-Commands-Tests/LaunchpadCommandLineHandlerTest.class.st @@ -15,13 +15,18 @@ LaunchpadCommandLineHandlerTest >> testApplicationConfiguration [ self assert: runningApplication configuration name equals: 'John'; - assert: runningApplication configuration title isEmpty. + assert: runningApplication configuration title isEmpty; + assert: ( runningApplication configuration valueAt: #name ) equals: 'John'; + assert: ( runningApplication configuration valueAt: #title ) isEmpty. self dryRun: LaunchpadGreeterApplication withAll: #( '--name=John' '--title=Dr.' ). self assert: runningApplication configuration name equals: 'John'; - assert: runningApplication configuration title equals: 'Dr.' + assert: runningApplication configuration title equals: 'Dr.'; + assert: ( runningApplication configuration valueAt: #name ) equals: 'John'; + assert: ( runningApplication configuration valueAt: #title ) equals: 'Dr.'; + should: [ runningApplication configuration valueAt: #unknown ] raise: Error ] { #category : 'tests' } diff --git a/source/Launchpad-Commands-Tests/LaunchpadDryRunProcessingContextTest.class.st b/source/Launchpad-Commands-Tests/LaunchpadDryRunProcessingContextTest.class.st new file mode 100644 index 0000000..90e8344 --- /dev/null +++ b/source/Launchpad-Commands-Tests/LaunchpadDryRunProcessingContextTest.class.st @@ -0,0 +1,19 @@ +" +A LaunchpadDryRunProcessingContextTest is a test class for testing the behavior of LaunchpadDryRunProcessingContext +" +Class { + #name : 'LaunchpadDryRunProcessingContextTest', + #superclass : 'TestCase', + #category : 'Launchpad-Commands-Tests', + #package : 'Launchpad-Commands-Tests' +} + +{ #category : 'tests' } +LaunchpadDryRunProcessingContextTest >> testConverting [ + + | context | + + context := LaunchpadDryRunProcessingContext handling: ( CommandLineArguments withArguments: #( ) ). + + self assert: context asDryRunContext equals: context +] diff --git a/source/Launchpad-Commands/LaunchpadCommandLineHandler.class.st b/source/Launchpad-Commands/LaunchpadCommandLineHandler.class.st index 2d9b58a..0935fa8 100644 --- a/source/Launchpad-Commands/LaunchpadCommandLineHandler.class.st +++ b/source/Launchpad-Commands/LaunchpadCommandLineHandler.class.st @@ -44,9 +44,9 @@ LaunchpadCommandLineHandler class >> description [ { #category : 'activation' } LaunchpadCommandLineHandler >> activate [ - "shouldn't really be called anymore, divert to #activateWithContext:" - - self activateWithContext: (self class defaultContextForCommandLine: self commandLine) + + + self shouldNotImplement ] { #category : 'activation' } diff --git a/source/Launchpad-Configuration/ApplicationConfiguration.class.st b/source/Launchpad-Configuration/ApplicationConfiguration.class.st index eb0b623..83a0dc5 100644 --- a/source/Launchpad-Configuration/ApplicationConfiguration.class.st +++ b/source/Launchpad-Configuration/ApplicationConfiguration.class.st @@ -201,10 +201,8 @@ ApplicationConfiguration >> synchronizeValuesWith: resolvedValues [ { #category : 'accessing' } ApplicationConfiguration >> valueAt: aKey [ - "For configuration access without DNU handling, provide standard Dictionary api. - With normal configuration parameters, there should never be an absent value, so use default Dictionary error handling for an absent key" - - ^values at: aKey + + ^ self valueAt: aKey ifAbsent: [ KeyNotFound signalFor: aKey ] ] { #category : 'accessing' }