diff --git a/src/NewTools-Debugger-Tests/StDebuggerExtensionGeneratorForTests.class.st b/src/NewTools-Debugger-Tests/StDebuggerExtensionGeneratorForTests.class.st deleted file mode 100644 index d4421af13..000000000 --- a/src/NewTools-Debugger-Tests/StDebuggerExtensionGeneratorForTests.class.st +++ /dev/null @@ -1,40 +0,0 @@ -" -I just provide helper methods to generate and remove classes that use the `TStDebuggerExtension` trait. -These classes are used exclusively in tests, and should be part of the system (remove them in your `tearDown`). -" -Class { - #name : 'StDebuggerExtensionGeneratorForTests', - #superclass : 'Object', - #category : 'NewTools-Debugger-Tests-Utils', - #package : 'NewTools-Debugger-Tests', - #tag : 'Utils' -} - -{ #category : 'running' } -StDebuggerExtensionGeneratorForTests class >> generateTestClass [ - - self classInstaller make: [ :builder | - builder - name: #TStDebuggerExtensionTestClass; - traitComposition: TStDebuggerExtension; - superclass: SpPresenter; - category: 'NewTools-Debugger-Tests-Model'. ]. - - self testClass class compile: 'defaultLayout ^ SpBoxLayout newVertical'. - self testClass class compile: 'isOnlyForTests ^ true'. - self testClass compile: 'debuggerExtensionToolName ^ ''TStDebuggerExtensionTestClass'''. -] - -{ #category : 'running' } -StDebuggerExtensionGeneratorForTests class >> removeTestClass [ - - Smalltalk - at: #TStDebuggerExtensionTestClass - ifPresent: [ :class | class removeFromSystem ] -] - -{ #category : 'running' } -StDebuggerExtensionGeneratorForTests class >> testClass [ - - ^ Smalltalk at: #TStDebuggerExtensionTestClass -] diff --git a/src/NewTools-Debugger-Tests/StDebuggerExtensionMechanismTest.class.st b/src/NewTools-Debugger-Tests/StDebuggerExtensionMechanismTest.class.st index f7dc4107d..fc3f2bb6f 100644 --- a/src/NewTools-Debugger-Tests/StDebuggerExtensionMechanismTest.class.st +++ b/src/NewTools-Debugger-Tests/StDebuggerExtensionMechanismTest.class.st @@ -47,15 +47,14 @@ StDebuggerExtensionMechanismTest >> setUp [ { #category : 'running' } StDebuggerExtensionMechanismTest >> tearDown [ - | allDebuggerExtensions testClass | - testClass := StDebuggerExtensionGeneratorForTests testClass. + | allDebuggerExtensions | allDebuggerExtensions := StDebugger extensionToolsClasses. allDebuggerExtensions do: [ :extension | | wasActivated | wasActivated := oldActivatedExtensions includes: extension. extension showInDebugger = wasActivated ifFalse: [ extension showInDebugger: wasActivated ] ]. - testClass showInDebugger: false. + TStDebuggerExtensionTestClass showInDebugger: false. StDummyDebuggerPresenter showInDebugger: false. self disableTStDebuggerExtensionTestClassAsExtension. super tearDown @@ -117,13 +116,9 @@ StDebuggerExtensionMechanismTest >> testExtensionToolsClasses [ { #category : 'tests - extensions' } StDebuggerExtensionMechanismTest >> testHasAnyActivatedExtensions [ - | testClass | - testClass := StDebuggerExtensionGeneratorForTests testClass. - self deny: - (self debuggerClass hasAnyActivatedExtension: { testClass }). - testClass showInDebugger: true. - self assert: - (self debuggerClass hasAnyActivatedExtension: { testClass }) + self deny: (self debuggerClass hasAnyActivatedExtension: { TStDebuggerExtensionTestClass }). + TStDebuggerExtensionTestClass showInDebugger: true. + self assert: (self debuggerClass hasAnyActivatedExtension: { TStDebuggerExtensionTestClass }) ] { #category : 'tests - extensions' } @@ -152,8 +147,7 @@ StDebuggerExtensionMechanismTest >> testRegisterExtensionTool [ { #category : 'tests - extensions' } StDebuggerExtensionMechanismTest >> testUsesExtensions [ - | testClass extensionClasses activatedExtension | - testClass := StDebuggerExtensionGeneratorForTests testClass. + | extensionClasses activatedExtension | "In case there are no available extensions in the system, we add a test extension to the system. We then assume that there is always one extension in the extension collection of the system." diff --git a/src/NewTools-Debugger-Tests/TStDebuggerExtensionTest.class.st b/src/NewTools-Debugger-Tests/TStDebuggerExtensionTest.class.st index 3a5aafa6e..937919cf0 100644 --- a/src/NewTools-Debugger-Tests/TStDebuggerExtensionTest.class.st +++ b/src/NewTools-Debugger-Tests/TStDebuggerExtensionTest.class.st @@ -12,7 +12,7 @@ Class { { #category : 'running' } TStDebuggerExtensionTest >> setUp [ super setUp. - traitUser := StDebuggerExtensionGeneratorForTests testClass new + traitUser := TStDebuggerExtensionTestClass new ] { #category : 'running' } @@ -20,7 +20,7 @@ TStDebuggerExtensionTest >> tearDown [ traitUser class displayOrder: 1. traitUser := nil. - StDebuggerExtensionGeneratorForTests testClass showInDebugger: false. + TStDebuggerExtensionTestClass showInDebugger: false. super tearDown ]