@@ -3,19 +3,26 @@ import { assert } from 'chai';
33import { DeepnoteActivationService } from './deepnoteActivationService' ;
44import { DeepnoteNotebookManager } from './deepnoteNotebookManager' ;
55import { IExtensionContext } from '../../platform/common/types' ;
6+ import { IIntegrationManager } from './integrations/types' ;
67
78suite ( 'DeepnoteActivationService' , ( ) => {
89 let activationService : DeepnoteActivationService ;
910 let mockExtensionContext : IExtensionContext ;
1011 let manager : DeepnoteNotebookManager ;
12+ let mockIntegrationManager : IIntegrationManager ;
1113
1214 setup ( ( ) => {
1315 mockExtensionContext = {
1416 subscriptions : [ ]
1517 } as any ;
1618
1719 manager = new DeepnoteNotebookManager ( ) ;
18- activationService = new DeepnoteActivationService ( mockExtensionContext , manager ) ;
20+ mockIntegrationManager = {
21+ activate : ( ) => {
22+ return ;
23+ }
24+ } ;
25+ activationService = new DeepnoteActivationService ( mockExtensionContext , manager , mockIntegrationManager ) ;
1926 } ) ;
2027
2128 suite ( 'constructor' , ( ) => {
@@ -75,8 +82,18 @@ suite('DeepnoteActivationService', () => {
7582
7683 const manager1 = new DeepnoteNotebookManager ( ) ;
7784 const manager2 = new DeepnoteNotebookManager ( ) ;
78- const service1 = new DeepnoteActivationService ( context1 , manager1 ) ;
79- const service2 = new DeepnoteActivationService ( context2 , manager2 ) ;
85+ const mockIntegrationManager1 : IIntegrationManager = {
86+ activate : ( ) => {
87+ return ;
88+ }
89+ } ;
90+ const mockIntegrationManager2 : IIntegrationManager = {
91+ activate : ( ) => {
92+ return ;
93+ }
94+ } ;
95+ const service1 = new DeepnoteActivationService ( context1 , manager1 , mockIntegrationManager1 ) ;
96+ const service2 = new DeepnoteActivationService ( context2 , manager2 , mockIntegrationManager2 ) ;
8097
8198 // Verify each service has its own context
8299 assert . strictEqual ( ( service1 as any ) . extensionContext , context1 ) ;
@@ -101,8 +118,18 @@ suite('DeepnoteActivationService', () => {
101118
102119 const manager1 = new DeepnoteNotebookManager ( ) ;
103120 const manager2 = new DeepnoteNotebookManager ( ) ;
104- new DeepnoteActivationService ( context1 , manager1 ) ;
105- new DeepnoteActivationService ( context2 , manager2 ) ;
121+ const mockIntegrationManager1 : IIntegrationManager = {
122+ activate : ( ) => {
123+ return ;
124+ }
125+ } ;
126+ const mockIntegrationManager2 : IIntegrationManager = {
127+ activate : ( ) => {
128+ return ;
129+ }
130+ } ;
131+ new DeepnoteActivationService ( context1 , manager1 , mockIntegrationManager1 ) ;
132+ new DeepnoteActivationService ( context2 , manager2 , mockIntegrationManager2 ) ;
106133
107134 assert . strictEqual ( context1 . subscriptions . length , 0 ) ;
108135 assert . strictEqual ( context2 . subscriptions . length , 1 ) ;
0 commit comments