-
-
Notifications
You must be signed in to change notification settings - Fork 434
fix feedback to user when something goes wrong in insert superclass/subclass refactor #19994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: Pharo14
Are you sure you want to change the base?
Changes from 2 commits
f257ddf
951973e
b5267cf
d693e95
ba8e8e6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| " | ||
| ""Handles command !<anInteger> and return (if it exists) the command related to the number | ||
| ex : !-2 returns the second last command | ||
| !2 returns the second command "" | ||
| " | ||
| Class { | ||
| #name : 'NumericHistoryHandler', | ||
| #superclass : 'DebuggerHistoryHandler', | ||
| #category : 'Debugger-CLI', | ||
| #package : 'Debugger-CLI' | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -245,13 +245,14 @@ RBBrowserEnvironmentTest >> testBrowserEnvironment [ | |
|
|
||
| { #category : 'tests - environments' } | ||
| RBBrowserEnvironmentTest >> testClassEnvironment [ | ||
|
|
||
| | aClassEnvironment | | ||
| aClassEnvironment := RBClassEnvironment onEnvironment: universalEnvironment classes: (Array with: Object with: Object class). | ||
| aClassEnvironment := RBClassEnvironment | ||
| onEnvironment: universalEnvironment | ||
| classes: (Array with: Object with: Object class). | ||
| self universalTestFor: aClassEnvironment. | ||
| self deny: universalEnvironment isClassEnvironment. | ||
| self assert: aClassEnvironment isClassEnvironment. | ||
| self assert: aClassEnvironment packages size equals: 1. | ||
| self deny: (universalEnvironment isClassEnvironment). | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We do not need the parentheses. |
||
| self assert: (aClassEnvironment isClassEnvironment). | ||
| self assert: (aClassEnvironment packages size) equals: 1. | ||
| self assert: (aClassEnvironment implementorsOf: #printString) numberSelectors equals: 1. | ||
|
|
||
| self assert: (RBClassEnvironment class: Class) selectors size | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| " | ||
| A mock application used by refactoring driver tests. | ||
|
|
||
| It records the last message received through #inform: so tests can assert the feedback reported to the user without opening any dialog. It is installed on a driver through the #application: hook. | ||
| " | ||
| Class { | ||
| #name : 'StApplicationForRefactorDriverMock', | ||
| #superclass : 'Object', | ||
| #instVars : [ | ||
| 'shownMessage' | ||
| ], | ||
| #category : 'Refactoring-UI-Tests', | ||
| #package : 'Refactoring-UI-Tests' | ||
| } | ||
|
|
||
| { #category : 'interaction' } | ||
| StApplicationForRefactorDriverMock >> inform: aString [ | ||
|
|
||
| shownMessage := aString | ||
| ] | ||
|
|
||
| { #category : 'accessing' } | ||
| StApplicationForRefactorDriverMock >> shownMessage [ | ||
|
|
||
| ^ shownMessage | ||
| ] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,15 @@ StRefactoringAddClassPresenterTest >> newPresenter [ | |
| yourself) | ||
| ] | ||
|
|
||
| { #category : 'tests' } | ||
| StRefactoringAddClassPresenterTest >> testClassNameInputIsRecordedInDriver [ | ||
| | driver | | ||
|
|
||
| driver := presenter instVarNamed: 'driver'. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not using an accessor?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. indeed. It was not me who did that ! |
||
| (presenter instVarNamed: 'textInput') text: 'Object'. | ||
| self assert: driver subclass equals: 'Object' | ||
| ] | ||
|
|
||
| { #category : 'tests' } | ||
| StRefactoringAddClassPresenterTest >> testCommentTemplateActivationFillsComment [ | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Esteban I do not know if this changes is wished or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crap, not... that sneaked in when commiting :P