@@ -141,7 +141,7 @@ public async Task ShowCommandGeneratesMermaidMarkdownFileWithMermaidDiagram()
141
141
Output = new FileInfo ( "sample.md" )
142
142
} ;
143
143
144
- await OpenApiService . ShowOpenApiDocument ( options , _logger , new CancellationToken ( ) ) ;
144
+ await OpenApiService . ShowOpenApiDocument ( options , _logger ) ;
145
145
146
146
var output = await File . ReadAllTextAsync ( options . Output . FullName ) ;
147
147
Assert . Contains ( "graph LR" , output , StringComparison . Ordinal ) ;
@@ -154,7 +154,7 @@ public async Task ShowCommandGeneratesMermaidHtmlFileWithMermaidDiagram()
154
154
{
155
155
OpenApi = Path . Combine ( "UtilityFiles" , "SampleOpenApi.yml" )
156
156
} ;
157
- var filePath = await OpenApiService . ShowOpenApiDocument ( options , _logger , new CancellationToken ( ) ) ;
157
+ var filePath = await OpenApiService . ShowOpenApiDocument ( options , _logger ) ;
158
158
Assert . True ( File . Exists ( filePath ) ) ;
159
159
}
160
160
@@ -169,7 +169,7 @@ public async Task ShowCommandGeneratesMermaidMarkdownFileFromCsdlWithMermaidDiag
169
169
} ;
170
170
171
171
// create a dummy ILogger instance for testing
172
- await OpenApiService . ShowOpenApiDocument ( options , _logger , new CancellationToken ( ) ) ;
172
+ await OpenApiService . ShowOpenApiDocument ( options , _logger ) ;
173
173
174
174
var output = await File . ReadAllTextAsync ( options . Output . FullName ) ;
175
175
Assert . Contains ( "graph LR" , output , StringComparison . Ordinal ) ;
@@ -179,29 +179,29 @@ public async Task ShowCommandGeneratesMermaidMarkdownFileFromCsdlWithMermaidDiag
179
179
public async Task ThrowIfOpenApiUrlIsNotProvidedWhenValidating ( )
180
180
{
181
181
await Assert . ThrowsAsync < ArgumentNullException > ( async ( ) =>
182
- await OpenApiService . ValidateOpenApiDocument ( "" , _logger , new CancellationToken ( ) ) ) ;
182
+ await OpenApiService . ValidateOpenApiDocument ( "" , _logger ) ) ;
183
183
}
184
184
185
185
186
186
[ Fact ]
187
187
public async Task ThrowIfURLIsNotResolvableWhenValidating ( )
188
188
{
189
189
await Assert . ThrowsAsync < InvalidOperationException > ( async ( ) =>
190
- await OpenApiService . ValidateOpenApiDocument ( "https://example.org/itdoesnmatter" , _logger , new CancellationToken ( ) ) ) ;
190
+ await OpenApiService . ValidateOpenApiDocument ( "https://example.org/itdoesnmatter" , _logger ) ) ;
191
191
}
192
192
193
193
[ Fact ]
194
194
public async Task ThrowIfFileDoesNotExistWhenValidating ( )
195
195
{
196
196
await Assert . ThrowsAsync < InvalidOperationException > ( async ( ) =>
197
- await OpenApiService . ValidateOpenApiDocument ( "aFileThatBetterNotExist.fake" , _logger , new CancellationToken ( ) ) ) ;
197
+ await OpenApiService . ValidateOpenApiDocument ( "aFileThatBetterNotExist.fake" , _logger ) ) ;
198
198
}
199
199
200
200
[ Fact ]
201
201
public async Task ValidateCommandProcessesOpenApi ( )
202
202
{
203
203
// create a dummy ILogger instance for testing
204
- await OpenApiService . ValidateOpenApiDocument ( Path . Combine ( "UtilityFiles" , "SampleOpenApi.yml" ) , _logger , new CancellationToken ( ) ) ;
204
+ await OpenApiService . ValidateOpenApiDocument ( Path . Combine ( "UtilityFiles" , "SampleOpenApi.yml" ) , _logger ) ;
205
205
206
206
Assert . True ( true ) ;
207
207
}
@@ -220,7 +220,7 @@ public async Task TransformCommandConvertsOpenApi()
220
220
InlineExternal = false ,
221
221
} ;
222
222
// create a dummy ILogger instance for testing
223
- await OpenApiService . TransformOpenApiDocument ( options , _logger , new CancellationToken ( ) ) ;
223
+ await OpenApiService . TransformOpenApiDocument ( options , _logger ) ;
224
224
225
225
var output = await File . ReadAllTextAsync ( "sample.json" ) ;
226
226
Assert . NotEmpty ( output ) ;
@@ -239,7 +239,7 @@ public async Task TransformCommandConvertsOpenApiWithDefaultOutputName()
239
239
InlineExternal = false ,
240
240
} ;
241
241
// create a dummy ILogger instance for testing
242
- await OpenApiService . TransformOpenApiDocument ( options , _logger , new CancellationToken ( ) ) ;
242
+ await OpenApiService . TransformOpenApiDocument ( options , _logger ) ;
243
243
244
244
var output = await File . ReadAllTextAsync ( "output.yml" ) ;
245
245
Assert . NotEmpty ( output ) ;
@@ -257,7 +257,7 @@ public async Task TransformCommandConvertsCsdlWithDefaultOutputName()
257
257
InlineExternal = false ,
258
258
} ;
259
259
// create a dummy ILogger instance for testing
260
- await OpenApiService . TransformOpenApiDocument ( options , _logger , new CancellationToken ( ) ) ;
260
+ await OpenApiService . TransformOpenApiDocument ( options , _logger ) ;
261
261
262
262
var output = await File . ReadAllTextAsync ( "output.yml" ) ;
263
263
Assert . NotEmpty ( output ) ;
@@ -277,7 +277,7 @@ public async Task TransformCommandConvertsOpenApiWithDefaultOutputNameAndSwitchF
277
277
InlineExternal = false ,
278
278
} ;
279
279
// create a dummy ILogger instance for testing
280
- await OpenApiService . TransformOpenApiDocument ( options , _logger , new CancellationToken ( ) ) ;
280
+ await OpenApiService . TransformOpenApiDocument ( options , _logger ) ;
281
281
282
282
var output = await File . ReadAllTextAsync ( "output.yml" ) ;
283
283
Assert . NotEmpty ( output ) ;
@@ -294,7 +294,7 @@ public async Task ThrowTransformCommandIfOpenApiAndCsdlAreEmpty()
294
294
InlineExternal = false ,
295
295
} ;
296
296
await Assert . ThrowsAsync < ArgumentException > ( async ( ) =>
297
- await OpenApiService . TransformOpenApiDocument ( options , _logger , new CancellationToken ( ) ) ) ;
297
+ await OpenApiService . TransformOpenApiDocument ( options , _logger ) ) ;
298
298
299
299
}
300
300
@@ -314,7 +314,7 @@ public async Task TransformToPowerShellCompliantOpenApi()
314
314
SettingsConfig = SettingsUtilities . GetConfiguration ( settingsPath )
315
315
} ;
316
316
// create a dummy ILogger instance for testing
317
- await OpenApiService . TransformOpenApiDocument ( options , _logger , new CancellationToken ( ) ) ;
317
+ await OpenApiService . TransformOpenApiDocument ( options , _logger ) ;
318
318
319
319
var output = await File . ReadAllTextAsync ( "output.yml" ) ;
320
320
Assert . NotEmpty ( output ) ;
0 commit comments