@@ -129,7 +129,7 @@ export class MockFactory {
129
129
return functions ;
130
130
}
131
131
132
- public static createTestFunction ( name : string = "TestFunction" ) {
132
+ public static createTestFunction ( name = "TestFunction" ) {
133
133
return {
134
134
properties : {
135
135
name,
@@ -153,7 +153,7 @@ export class MockFactory {
153
153
return credentials ;
154
154
}
155
155
156
- public static createTestTokenCacheEntries ( count : number = 1 ) : TokenResponse [ ] {
156
+ public static createTestTokenCacheEntries ( count = 1 ) : TokenResponse [ ] {
157
157
const token : TokenResponse = {
158
158
tokenType : "Bearer" ,
159
159
accessToken : "ABC123" ,
@@ -164,7 +164,7 @@ export class MockFactory {
164
164
return result ;
165
165
}
166
166
167
- public static createTestSubscriptions ( count : number = 1 ) : any [ ] {
167
+ public static createTestSubscriptions ( count = 1 ) : any [ ] {
168
168
const sub = {
169
169
id : "abc-1234-5678" ,
170
170
state : "Enabled" ,
@@ -182,7 +182,7 @@ export class MockFactory {
182
182
return "1562184492" ;
183
183
}
184
184
185
- public static createTestDeployments ( count : number = 5 , includeTimestamp = false ) : DeploymentsListByResourceGroupResponse {
185
+ public static createTestDeployments ( count = 5 , includeTimestamp = false ) : DeploymentsListByResourceGroupResponse {
186
186
const result = [ ] ;
187
187
const originalTimestamp = + MockFactory . createTestTimestamp ( ) ;
188
188
for ( let i = 0 ; i < count ; i ++ ) {
@@ -201,7 +201,7 @@ export class MockFactory {
201
201
}
202
202
}
203
203
204
- public static createTestDeployment ( name ?: string , second : number = 0 ) : DeploymentExtended {
204
+ public static createTestDeployment ( name ?: string , second = 0 ) : DeploymentExtended {
205
205
return {
206
206
name : name || `${ constants . naming . suffix . deployment } 1-t${ MockFactory . createTestTimestamp ( ) } ` ,
207
207
properties : {
@@ -215,7 +215,7 @@ export class MockFactory {
215
215
public static createTestAxiosResponse < T > (
216
216
config : AxiosRequestConfig ,
217
217
responseJson : T ,
218
- statusCode : number = 200 ,
218
+ statusCode = 200 ,
219
219
) : Promise < AxiosResponse > {
220
220
let statusText ;
221
221
switch ( statusCode ) {
@@ -240,7 +240,7 @@ export class MockFactory {
240
240
return Promise . resolve ( response ) ;
241
241
}
242
242
243
- public static createTestAzureContainers ( count : number = 5 ) : ServiceListContainersSegmentResponse {
243
+ public static createTestAzureContainers ( count = 5 ) : ServiceListContainersSegmentResponse {
244
244
const result = [ ] ;
245
245
for ( let i = 0 ; i < count ; i ++ ) {
246
246
result . push ( {
@@ -251,7 +251,7 @@ export class MockFactory {
251
251
return { containerItems : result } as ServiceListContainersSegmentResponse ;
252
252
}
253
253
254
- public static createTestBlockBlobUrl ( containerName : string , blobName : string , contents : string = "test" ) {
254
+ public static createTestBlockBlobUrl ( containerName : string , blobName : string , contents = "test" ) {
255
255
return {
256
256
containerName,
257
257
blobName,
@@ -263,21 +263,21 @@ export class MockFactory {
263
263
}
264
264
}
265
265
266
- public static createTestAzureBlobItems ( id : number = 1 , count : number = 5 ) {
266
+ public static createTestAzureBlobItems ( id = 1 , count = 5 ) {
267
267
const result = [ ] ;
268
268
for ( let i = 0 ; i < count ; i ++ ) {
269
269
result . push ( MockFactory . createTestAzureBlobItem ( id , i ) ) ;
270
270
}
271
271
return { segment : { blobItems : result } } ;
272
272
}
273
273
274
- public static createTestAzureBlobItem ( id : number = 1 , index : number = 1 , ext : string = ".zip" ) {
274
+ public static createTestAzureBlobItem ( id = 1 , index = 1 , ext = ".zip" ) {
275
275
return {
276
276
name : `blob-${ id } -${ index } ${ ext } `
277
277
}
278
278
}
279
279
280
- public static createTestAzureClientResponse < T > ( responseJson : T , statusCode : number = 200 ) : Promise < HttpOperationResponse > {
280
+ public static createTestAzureClientResponse < T > ( responseJson : T , statusCode = 200 ) : Promise < HttpOperationResponse > {
281
281
const response : HttpOperationResponse = {
282
282
request : new WebResource ( ) ,
283
283
parsedBody : responseJson ,
@@ -303,7 +303,7 @@ export class MockFactory {
303
303
return ( asYaml ) ? yaml . dump ( data ) : data ;
304
304
}
305
305
306
- public static createTestApimConfig ( generateName : boolean = false ) : ApiManagementConfig {
306
+ public static createTestApimConfig ( generateName = false ) : ApiManagementConfig {
307
307
return {
308
308
name : generateName ? null : "test-apim-resource" ,
309
309
apis : [ {
@@ -332,7 +332,7 @@ export class MockFactory {
332
332
} ;
333
333
}
334
334
335
- public static createTestKeyVaultConfig ( name : string = "testVault" ) {
335
+ public static createTestKeyVaultConfig ( name = "testVault" ) {
336
336
return {
337
337
name : name ,
338
338
resourceGroup : "testGroup" ,
@@ -422,7 +422,7 @@ export class MockFactory {
422
422
}
423
423
}
424
424
425
- public static createTestSite ( name : string = "Test" ) : Site {
425
+ public static createTestSite ( name = "Test" ) : Site {
426
426
return {
427
427
id : "appId" ,
428
428
name : name ,
@@ -435,7 +435,7 @@ export class MockFactory {
435
435
} ;
436
436
}
437
437
438
- public static createTestFunctionEnvelope ( name : string = "TestFunction" ) : FunctionEnvelope {
438
+ public static createTestFunctionEnvelope ( name = "TestFunction" ) : FunctionEnvelope {
439
439
return {
440
440
name,
441
441
config : {
@@ -520,7 +520,7 @@ export class MockFactory {
520
520
}
521
521
}
522
522
523
- public static createTestEventHubBinding ( direction : string = "in" ) {
523
+ public static createTestEventHubBinding ( direction = "in" ) {
524
524
return {
525
525
event : "eventHubTrigger" ,
526
526
direction,
@@ -530,7 +530,7 @@ export class MockFactory {
530
530
connection : "EventHubsConnection"
531
531
}
532
532
}
533
- public static createTestBindingsObject ( name : string = "index.js" ) {
533
+ public static createTestBindingsObject ( name = "index.js" ) {
534
534
return {
535
535
scriptFile : name ,
536
536
entryPoint : "handler" ,
@@ -578,7 +578,7 @@ export class MockFactory {
578
578
return apis ;
579
579
}
580
580
581
- public static createTestApimApi ( index : number = 1 ) : ApiContract {
581
+ public static createTestApimApi ( index = 1 ) : ApiContract {
582
582
return {
583
583
displayName : `API ${ index } ` ,
584
584
description : `Description for API ${ index } ` ,
@@ -597,7 +597,7 @@ export class MockFactory {
597
597
return backends ;
598
598
}
599
599
600
- public static createTestApimBackend ( index : number = 1 ) : BackendContract {
600
+ public static createTestApimBackend ( index = 1 ) : BackendContract {
601
601
return {
602
602
name : `backend-${ index } ` ,
603
603
description : `Description for Backend ${ index } ` ,
0 commit comments