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