@@ -60,7 +60,27 @@ import { TEST_OUTPUT_CHANNEL } from './constants';
6060import { ITestingService } from './types' ;
6161
6262@injectable ( )
63- export class UnitTestManagementService implements ITestingService , ITestManagementService , Disposable {
63+ export class TestingService implements ITestingService {
64+ constructor ( @inject ( IServiceContainer ) private serviceContainer : IServiceContainer ) { }
65+
66+ public async activate ( symbolProvider : DocumentSymbolProvider ) : Promise < void > {
67+ const mgmt = this . serviceContainer . get < ITestManagementService > ( ITestManagementService ) ;
68+ return ( ( mgmt as unknown ) as ITestingService ) . activate ( symbolProvider ) ;
69+ }
70+
71+ public register ( ) : void {
72+ const context = this . serviceContainer . get < ITestContextService > ( ITestContextService ) ;
73+ context . register ( ) ;
74+ }
75+
76+ public getSettingsPropertyNames ( product : Product ) : TestSettingsPropertyNames {
77+ const helper = this . serviceContainer . get < ITestsHelper > ( ITestsHelper ) ;
78+ return helper . getSettingsPropertyNames ( product ) ;
79+ }
80+ }
81+
82+ @injectable ( )
83+ export class UnitTestManagementService implements ITestManagementService , Disposable {
6484 private readonly outputChannel : OutputChannel ;
6585 private activatedOnce : boolean = false ;
6686 private readonly disposableRegistry : Disposable [ ] ;
@@ -97,10 +117,6 @@ export class UnitTestManagementService implements ITestingService, ITestManageme
97117 public get onDidStatusChange ( ) : Event < WorkspaceTestStatus > {
98118 return this . _onDidStatusChange . event ;
99119 }
100- public register ( ) : void {
101- const context = this . serviceContainer . get < ITestContextService > ( ITestContextService ) ;
102- context . register ( ) ;
103- }
104120 public async activate ( symbolProvider : DocumentSymbolProvider ) : Promise < void > {
105121 if ( this . activatedOnce ) {
106122 return ;
@@ -118,10 +134,6 @@ export class UnitTestManagementService implements ITestingService, ITestManageme
118134 ) ;
119135 await this . registerSymbolProvider ( symbolProvider ) ;
120136 }
121- public getSettingsPropertyNames ( product : Product ) : TestSettingsPropertyNames {
122- const helper = this . serviceContainer . get < ITestsHelper > ( ITestsHelper ) ;
123- return helper . getSettingsPropertyNames ( product ) ;
124- }
125137 public checkExperiments ( ) {
126138 const experiments = this . serviceContainer . get < IExperimentsManager > ( IExperimentsManager ) ;
127139 if ( experiments . inExperiment ( AlwaysDisplayTestExplorerGroups . experiment ) ) {
0 commit comments