File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
test/Microsoft.OpenApi.Tests/Models Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -177,9 +177,7 @@ public async Task SerializeOAuthFlowsWithDeviceAuthorizationAsV32JsonWorks()
177177 var actual = await OAuthFlowsWithDeviceAuthorization . SerializeAsJsonAsync ( OpenApiSpecVersion . OpenApi3_2 ) ;
178178
179179 // Assert
180- actual = actual . MakeLineBreaksEnvironmentNeutral ( ) ;
181- expected = expected . MakeLineBreaksEnvironmentNeutral ( ) ;
182- Assert . Equal ( expected , actual ) ;
180+ Assert . True ( JsonNode . DeepEquals ( JsonNode . Parse ( expected ) , JsonNode . Parse ( actual ) ) ) ;
183181 }
184182
185183 [ Fact ]
@@ -204,9 +202,7 @@ public async Task SerializeOAuthFlowsWithDeviceAuthorizationAsV31JsonWorks()
204202 var actual = await OAuthFlowsWithDeviceAuthorization . SerializeAsJsonAsync ( OpenApiSpecVersion . OpenApi3_1 ) ;
205203
206204 // Assert
207- actual = actual . MakeLineBreaksEnvironmentNeutral ( ) ;
208- expected = expected . MakeLineBreaksEnvironmentNeutral ( ) ;
209- Assert . Equal ( expected , actual ) ;
205+ Assert . True ( JsonNode . DeepEquals ( JsonNode . Parse ( expected ) , JsonNode . Parse ( actual ) ) ) ;
210206 }
211207
212208 [ Fact ]
@@ -231,9 +227,7 @@ public async Task SerializeOAuthFlowsWithDeviceAuthorizationAsV3JsonWorks()
231227 var actual = await OAuthFlowsWithDeviceAuthorization . SerializeAsJsonAsync ( OpenApiSpecVersion . OpenApi3_0 ) ;
232228
233229 // Assert
234- actual = actual . MakeLineBreaksEnvironmentNeutral ( ) ;
235- expected = expected . MakeLineBreaksEnvironmentNeutral ( ) ;
236- Assert . Equal ( expected , actual ) ;
230+ Assert . True ( JsonNode . DeepEquals ( JsonNode . Parse ( expected ) , JsonNode . Parse ( actual ) ) ) ;
237231 }
238232 }
239233}
You can’t perform that action at this time.
0 commit comments