77using System . Text ;
88using System . Text . Json . Nodes ;
99using System . Threading . Tasks ;
10- using FluentAssertions ;
1110using Microsoft . OpenApi . Reader ;
1211using Microsoft . OpenApi . Reader . V2 ;
1312using Microsoft . OpenApi . Reader . V3 ;
@@ -165,7 +164,7 @@ public void ParseOperationWithBodyShouldSucceed()
165164 var operation = OpenApiV2Deserializer . LoadOperation ( node , new ( ) , new ParsingContext ( new ( ) ) ) ;
166165
167166 // Assert
168- operation . Should ( ) . BeEquivalentTo ( _operationWithBody , options => options . IgnoringCyclicReferences ( ) ) ;
167+ OpenApiTestAssert . Equivalent ( _operationWithBody , operation ) ;
169168 }
170169
171170 [ Fact ]
@@ -183,7 +182,7 @@ public async Task ParseOperationWithBodyTwiceShouldYieldSameObject()
183182 var operation = OpenApiV2Deserializer . LoadOperation ( node , new ( ) , new ParsingContext ( new ( ) ) ) ;
184183
185184 // Assert
186- operation . Should ( ) . BeEquivalentTo ( _operationWithBody , options => options . IgnoringCyclicReferences ( ) ) ;
185+ OpenApiTestAssert . Equivalent ( _operationWithBody , operation ) ;
187186 }
188187
189188 [ Fact ]
@@ -200,7 +199,7 @@ public void ParseOperationWithResponseExamplesShouldSucceed()
200199 var operation = OpenApiV2Deserializer . LoadOperation ( node , new ( ) , new ParsingContext ( new ( ) ) ) ;
201200
202201 // Assert
203- operation . Should ( ) . BeEquivalentTo (
202+ OpenApiTestAssert . Equivalent (
204203 new OpenApiOperation ( )
205204 {
206205 Responses = new OpenApiResponses ( )
@@ -243,13 +242,7 @@ public void ParseOperationWithResponseExamplesShouldSucceed()
243242 }
244243 } }
245244 }
246- } , options => options . IgnoringCyclicReferences ( )
247- . Excluding ( o => o . Responses [ "200" ] . Content [ "application/json" ] . Example [ 0 ] . Parent )
248- . Excluding ( o => o . Responses [ "200" ] . Content [ "application/json" ] . Example [ 0 ] . Root )
249- . Excluding ( o => o . Responses [ "200" ] . Content [ "application/json" ] . Example [ 1 ] . Parent )
250- . Excluding ( o => o . Responses [ "200" ] . Content [ "application/json" ] . Example [ 1 ] . Root )
251- . Excluding ( o => o . Responses [ "200" ] . Content [ "application/json" ] . Example [ 2 ] . Parent )
252- . Excluding ( o => o . Responses [ "200" ] . Content [ "application/json" ] . Example [ 2 ] . Root ) ) ;
245+ } , operation , "Parent" , "Root" ) ;
253246 }
254247
255248 [ Fact ]
@@ -300,7 +293,7 @@ public void ParseOperationWithBodyAndEmptyConsumesSetsRequestBodySchemaIfExists(
300293 var operation = OpenApiV2Deserializer . LoadOperation ( node , new ( ) , new ParsingContext ( new ( ) ) ) ;
301294
302295 // Assert
303- operation . Should ( ) . BeEquivalentTo ( _operationWithBody , options => options . IgnoringCyclicReferences ( ) ) ;
296+ OpenApiTestAssert . Equivalent ( _operationWithBody , operation ) ;
304297 }
305298
306299 [ Fact ]
0 commit comments