Test fixes: fixes various class name references here and there
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 12 Jun 2015 21:16:24 +0100
changeset 832 59c248fc74f0
parent 831 27e4c603dd8b
child 833 297eb38e4eee
Test fixes: fixes various class name references here and there as classes were moved to SmallSense namespace. Now all tests pass when run from an IDE.
SmallSense__CustomCodeGeneratorClassGenerator.st
SmallSense__CustomCodeGeneratorClassGeneratorTests.st
SmallSense__CustomMenuBuilderTests.st
SmallSense__CustomNewClassGeneratorTests.st
SmallSense__CustomNewSystemBrowserTests.st
SmallSense__CustomRefactoringClassGenerator.st
SmallSense__CustomRefactoringClassGeneratorTests.st
SmallSense__CustomSourceCodeGeneratorTests.st
SmallSense__CustomSourceCodeSelectionTests.st
SmallSense__CustomTestCaseCodeGenerator.st
SmallSense__CustomTestCaseSetUpCodeGenerator.st
SmallSense__CustomTestCaseSetUpCodeGeneratorTests.st
SmallSense__CustomTestCaseTearDownCodeGenerator.st
SmallSense__CustomTestCaseTearDownCodeGeneratorTests.st
SmallSense__CustomUpdateTestCaseCategoryRefactoring.st
extensions.st
--- a/SmallSense__CustomCodeGeneratorClassGenerator.st	Fri May 15 08:14:14 2015 +0100
+++ b/SmallSense__CustomCodeGeneratorClassGenerator.st	Fri Jun 12 21:16:24 2015 +0100
@@ -106,10 +106,11 @@
 buildForClass: aClass
 
     aClass
-        superclassName: #CustomCodeGenerator;
+        superclassName: #'SmallSense::CustomCodeGenerator';
         category: self class category.
 
     "Created: / 09-11-2014 / 01:15:04 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 12-06-2015 / 20:55:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !CustomCodeGeneratorClassGenerator class methodsFor:'documentation'!
--- a/SmallSense__CustomCodeGeneratorClassGeneratorTests.st	Fri May 15 08:14:14 2015 +0100
+++ b/SmallSense__CustomCodeGeneratorClassGeneratorTests.st	Fri Jun 12 21:16:24 2015 +0100
@@ -68,7 +68,7 @@
 
     | newGenerator testClassName |
 
-    testClassName := #CustomCodeGeneratorForTestCase.
+    testClassName := #SmallSense::CustomCodeGeneratorForTestCase.
 
     self assertClassNotExists: testClassName.
 
@@ -86,6 +86,7 @@
 
     "Created: / 31-03-2014 / 23:20:33 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
     "Modified: / 12-11-2014 / 23:22:59 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 12-06-2015 / 20:49:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !CustomCodeGeneratorClassGeneratorTests class methodsFor:'documentation'!
--- a/SmallSense__CustomMenuBuilderTests.st	Fri May 15 08:14:14 2015 +0100
+++ b/SmallSense__CustomMenuBuilderTests.st	Fri Jun 12 21:16:24 2015 +0100
@@ -223,7 +223,7 @@
     "Create some methods which actually uses context and perspective to be sure that they are correctly created"
     provider last
         compileMockMethod: 'availableInPerspective: perspective ^ perspective isClassPerspective';
-        compileMockMethod: 'availableInContext: context ^ context selectedClasses first name == #CustomMenuBuilderTests'.
+        compileMockMethod: 'availableInContext: context ^ context selectedClasses first name == CustomMenuBuilderTests name'.
 
     navigationState := Tools::NavigationState new.
     navigationState selectedClasses value: {CustomMenuBuilderTests}.
@@ -248,6 +248,7 @@
 
     "Created: / 28-12-2014 / 22:48:24 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
     "Modified: / 04-01-2015 / 15:08:14 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 12-06-2015 / 21:09:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 test_build_menu_two_generators_empty_builder
@@ -459,7 +460,7 @@
     "Create some methods which actually uses context and perspective to be sure that they are correctly created"
     provider last
         compileMockMethod: 'availableInPerspective: perspective ^ perspective isClassPerspective';
-        compileMockMethod: 'availableInContext: context ^ context selectedClasses first name == #CustomMenuBuilderTests'.
+        compileMockMethod: 'availableInContext: context ^ context selectedClasses first name == CustomMenuBuilderTests name'.
 
     navigationState := Tools::NavigationState new.
     navigationState selectedClasses value: {CustomMenuBuilderTests}.
@@ -483,6 +484,7 @@
 
     "Created: / 29-12-2014 / 09:33:20 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
     "Modified: / 04-01-2015 / 15:08:20 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 12-06-2015 / 21:09:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 test_groups_sort_block
--- a/SmallSense__CustomNewClassGeneratorTests.st	Fri May 15 08:14:14 2015 +0100
+++ b/SmallSense__CustomNewClassGeneratorTests.st	Fri Jun 12 21:16:24 2015 +0100
@@ -111,7 +111,7 @@
         ^ anAnswer. '.
 
     generatorOrRefactoring
-        compileMockMethod: 'buildForClass: aClass ^ aClass superclassName: #CustomCodeGenerator';
+        compileMockMethod: 'buildForClass: aClass ^ aClass superclassName: CustomCodeGenerator name';
         compileMockMethod: 'newClassNameLabel ^ ''some label''. ';
         compileMockMethod: 'defaultClassName ^ ''DummyClass01''. ';
         dialog: dialog.
@@ -124,13 +124,14 @@
 
     "Created: / 09-11-2014 / 00:48:03 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
     "Modified: / 12-11-2014 / 23:41:08 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 12-06-2015 / 21:06:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 test_new_class_generated_with_subclass_responsibility
     | expectedSource |
 
     generatorOrRefactoring
-        compileMockMethod: 'buildForClass: aClass ^ aClass superclassName: #CustomCodeGenerator';
+        compileMockMethod: 'buildForClass: aClass ^ aClass superclassName: CustomCodeGenerator name';
         newClassName: #DummyClass01.
 
     generatorOrRefactoring executeInContext: context.  
@@ -143,5 +144,6 @@
     self assertMethodSource: expectedSource atSelector: #buildInContext: forClass: (Smalltalk at: #DummyClass01).
 
     "Created: / 09-11-2014 / 00:41:09 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 12-06-2015 / 21:06:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
--- a/SmallSense__CustomNewSystemBrowserTests.st	Fri May 15 08:14:14 2015 +0100
+++ b/SmallSense__CustomNewSystemBrowserTests.st	Fri Jun 12 21:16:24 2015 +0100
@@ -217,7 +217,7 @@
 test_class_menu_extension_navigate_to_test_case_not_found
     | expectedInformation actualInformation |
 
-    expectedInformation := 'Test Case named CustomNewSystemBrowserTestsTests not found'.
+    expectedInformation := 'Test Case named SmallSense::CustomNewSystemBrowserTestsTests not found'.
     browser theSingleSelectedClass: CustomNewSystemBrowserTests.
     browser classMenuExtensionNavigateToTestCase: menu.
     menu lastItem itemValue value. "Call menu item action block"
@@ -226,6 +226,7 @@
     self assert: expectedInformation = actualInformation
 
     "Created: / 26-12-2014 / 18:32:23 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 12-06-2015 / 21:00:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 test_class_menu_extension_navigate_to_test_case_placed_after_generate
--- a/SmallSense__CustomRefactoringClassGenerator.st	Fri May 15 08:14:14 2015 +0100
+++ b/SmallSense__CustomRefactoringClassGenerator.st	Fri Jun 12 21:16:24 2015 +0100
@@ -96,9 +96,10 @@
 buildForClass: aClass
 
     aClass
-        superclassName: #CustomRefactoring;
+        superclassName: CustomRefactoring name;
         category: CustomRefactoring category
 
     "Created: / 08-11-2014 / 17:15:10 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 12-06-2015 / 21:05:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
--- a/SmallSense__CustomRefactoringClassGeneratorTests.st	Fri May 15 08:14:14 2015 +0100
+++ b/SmallSense__CustomRefactoringClassGeneratorTests.st	Fri Jun 12 21:16:24 2015 +0100
@@ -75,8 +75,9 @@
     class := Smalltalk at: #DummyClass01.
 
     self assertMethodSource:expectedSource atSelector:#buildInContext: forClass: class.  
-    self assert: (class superclass name) = #CustomRefactoring.
+    self assert: (class superclass name) = #SmallSense::CustomRefactoring.
 
     "Created: / 09-11-2014 / 01:04:37 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 12-06-2015 / 21:03:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
--- a/SmallSense__CustomSourceCodeGeneratorTests.st	Fri May 15 08:14:14 2015 +0100
+++ b/SmallSense__CustomSourceCodeGeneratorTests.st	Fri Jun 12 21:16:24 2015 +0100
@@ -171,3 +171,10 @@
     "Created: / 19-09-2014 / 22:50:29 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 ! !
 
+!CustomSourceCodeGeneratorTests class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/SmallSense__CustomSourceCodeSelectionTests.st	Fri May 15 08:14:14 2015 +0100
+++ b/SmallSense__CustomSourceCodeSelectionTests.st	Fri Jun 12 21:16:24 2015 +0100
@@ -145,10 +145,10 @@
 
     method := (self class compiledMethodAt: #test_print_on_all_filled).
 
-    expectedString := 'a CustomSourceCodeSelection (selectedInterval: 2 to:5; ',
+    expectedString := 'a SmallSense::CustomSourceCodeSelection (selectedInterval: 2 to:5; ',
         'currentSourceCode: test_print_on_all_filled ^ 265; ',
         'selectedMethod: ', method asString, '; ',
-        'selectedClass: CustomSourceCodeSelectionTests; selectedSelector: test_print_on_all_filled)'.
+        'selectedClass: SmallSense::CustomSourceCodeSelectionTests; selectedSelector: test_print_on_all_filled)'.
 
     stream := WriteStream on:(String new).
 
@@ -166,6 +166,7 @@
     self assert: expectedString = actualString.
 
     "Modified: / 25-01-2015 / 14:36:11 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 12-06-2015 / 21:07:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 test_selected_selector_from_method
--- a/SmallSense__CustomTestCaseCodeGenerator.st	Fri May 15 08:14:14 2015 +0100
+++ b/SmallSense__CustomTestCaseCodeGenerator.st	Fri Jun 12 21:16:24 2015 +0100
@@ -89,9 +89,9 @@
     | classes |
 
     classes := aCustomContext selectedClasses.
-    ^ classes isEmptyOrNil or:[ classes noneSatisfy: [:cls | cls inheritsFrom: TestCase ] ].
+    ^ classes isEmptyOrNil or:[ classes noneSatisfy: [:cls | cls inheritsFrom: Smalltalk::TestCase ] ].
 
-    "Modified: / 15-09-2014 / 18:23:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 12-06-2015 / 20:45:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 availableInPerspective:aCustomPerspective 
--- a/SmallSense__CustomTestCaseSetUpCodeGenerator.st	Fri May 15 08:14:14 2015 +0100
+++ b/SmallSense__CustomTestCaseSetUpCodeGenerator.st	Fri Jun 12 21:16:24 2015 +0100
@@ -82,9 +82,9 @@
 !CustomTestCaseSetUpCodeGenerator class methodsFor:'queries'!
 
 availableInContext:aCustomContext
-    ^ aCustomContext selectedClasses anySatisfy: [:cls | cls isMetaclass not and:[ cls inheritsFrom: TestCase ] ]
+    ^ aCustomContext selectedClasses anySatisfy: [:cls | cls isMetaclass not and:[ cls inheritsFrom: Smalltalk::TestCase ] ]
 
-    "Modified: / 05-08-2014 / 14:24:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 12-06-2015 / 20:46:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 availableInPerspective:aCustomPerspective
@@ -148,7 +148,7 @@
 
     "Add your own code here..."
 '.
-        category := (TestCase compiledMethodAt: #setUp) category.
+        category := (Smalltalk::TestCase compiledMethodAt: #setUp) category.
     ].
 
     package := PackageId noProjectID.
@@ -165,15 +165,16 @@
 
     "Created: / 05-08-2014 / 14:17:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 31-01-2015 / 18:32:53 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 12-06-2015 / 20:46:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 buildInContext:aCustomContext
     aCustomContext selectedClasses do:[:cls |  
-        (cls isMetaclass not and:[ cls inheritsFrom: TestCase ]) ifTrue:[ 
+        (cls isMetaclass not and:[ cls inheritsFrom: Smalltalk::TestCase ]) ifTrue:[ 
             self buildForClass: cls.
         ].
     ]
 
-    "Modified: / 05-08-2014 / 14:24:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 12-06-2015 / 20:46:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
--- a/SmallSense__CustomTestCaseSetUpCodeGeneratorTests.st	Fri May 15 08:14:14 2015 +0100
+++ b/SmallSense__CustomTestCaseSetUpCodeGeneratorTests.st	Fri Jun 12 21:16:24 2015 +0100
@@ -112,12 +112,13 @@
 
     context selectedClasses: {class}.  
 
-    expectedCategory := (TestCase compiledMethodAt: #setUp) category.
+    expectedCategory := (Smalltalk::TestCase compiledMethodAt: #setUp) category.
     generatorOrRefactoring executeInContext: context.
     actualCategory := ((Smalltalk at: #DummyTestCase01) compiledMethodAt: #setUp) category.
     self assert: expectedCategory = actualCategory
 
     "Created: / 31-01-2015 / 21:36:48 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 12-06-2015 / 20:46:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 test_set_up_method_generated_same_package
--- a/SmallSense__CustomTestCaseTearDownCodeGenerator.st	Fri May 15 08:14:14 2015 +0100
+++ b/SmallSense__CustomTestCaseTearDownCodeGenerator.st	Fri Jun 12 21:16:24 2015 +0100
@@ -82,9 +82,9 @@
 !CustomTestCaseTearDownCodeGenerator class methodsFor:'queries'!
 
 availableInContext:aCustomContext
-    ^ aCustomContext selectedClasses anySatisfy: [:cls | cls isMetaclass not and:[ cls inheritsFrom: TestCase ] ]
+    ^ aCustomContext selectedClasses anySatisfy: [:cls | cls isMetaclass not and:[ cls inheritsFrom: Smalltalk::TestCase ] ]
 
-    "Modified: / 05-08-2014 / 14:24:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 12-06-2015 / 20:46:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 availableInPerspective:aCustomPerspective
@@ -149,7 +149,7 @@
 
     "/ super tearDown.
 '.
-        category := (TestCase compiledMethodAt: #tearDown ) category.
+        category := (Smalltalk::TestCase compiledMethodAt: #tearDown ) category.
     ].
 
     package := PackageId noProjectID.
@@ -166,15 +166,16 @@
 
     "Created: / 05-08-2014 / 14:17:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 31-01-2015 / 18:34:32 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 12-06-2015 / 20:46:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 buildInContext:aCustomContext
     aCustomContext selectedClasses do:[:cls |  
-        (cls isMetaclass not and:[ cls inheritsFrom: TestCase ]) ifTrue:[ 
+        (cls isMetaclass not and:[ cls inheritsFrom: Smalltalk::TestCase ]) ifTrue:[ 
             self buildForClass: cls.
         ].
     ]
 
-    "Modified: / 05-08-2014 / 14:24:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 12-06-2015 / 20:44:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
--- a/SmallSense__CustomTestCaseTearDownCodeGeneratorTests.st	Fri May 15 08:14:14 2015 +0100
+++ b/SmallSense__CustomTestCaseTearDownCodeGeneratorTests.st	Fri Jun 12 21:16:24 2015 +0100
@@ -112,12 +112,13 @@
 
     context selectedClasses: {class}.  
 
-    expectedCategory := (TestCase compiledMethodAt: #tearDown) category.
+    expectedCategory := (Smalltalk::TestCase compiledMethodAt: #tearDown) category.
     generatorOrRefactoring executeInContext: context.
     actualCategory := ((Smalltalk at: #DummyTestCase01) compiledMethodAt: #tearDown) category.
     self assert: expectedCategory = actualCategory
 
     "Created: / 31-01-2015 / 21:42:23 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 12-06-2015 / 20:47:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 test_tear_down_method_generated_same_package
--- a/SmallSense__CustomUpdateTestCaseCategoryRefactoring.st	Fri May 15 08:14:14 2015 +0100
+++ b/SmallSense__CustomUpdateTestCaseCategoryRefactoring.st	Fri Jun 12 21:16:24 2015 +0100
@@ -72,11 +72,12 @@
 
 availableForClass:aClass
 
-    ^ (aClass isSubclassOf: TestCase) and: [ 
+    ^ (aClass isSubclassOf: Smalltalk::TestCase) and: [ 
         aClass theNonMetaclass name endsWith: 'Tests'  
     ]
 
     "Created: / 08-11-2014 / 19:03:20 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 12-06-2015 / 20:43:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 availableInContext:aCustomContext 
--- a/extensions.st	Fri May 15 08:14:14 2015 +0100
+++ b/extensions.st	Fri Jun 12 21:16:24 2015 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "{ Package: 'jn:refactoring_custom' }"!
 
 !AddClassChange methodsFor:'private'!
@@ -877,7 +875,7 @@
                 | extensionTestClassName |
 
                 "Small hack for my extension test cases"
-                extensionTestClassName := ('Custom', className, 'Tests') asSymbol.
+                extensionTestClassName := ('SmallSense::Custom', className, 'Tests') asSymbol.
                 testClass := environment at: extensionTestClassName ifAbsent: [ nil ].
             ].
 
@@ -904,7 +902,7 @@
 
     "Created: / 26-12-2014 / 16:54:30 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
     "Modified: / 27-12-2014 / 19:01:25 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-    "Modified: / 11-05-2015 / 09:18:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 12-06-2015 / 20:58:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !Tools::NewSystemBrowser methodsFor:'menus extensions-custom refactorings'!