File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
test/Microsoft.OpenApi.Tests/Models Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -2249,6 +2249,8 @@ public async Task SerializeDocWithoutOperationSecurityWorks()
22492249 doc ! . SerializeAsV3 ( new OpenApiYamlWriter ( stringWriter , new OpenApiWriterSettings { InlineLocalReferences = true } ) ) ;
22502250 var actual = stringWriter . ToString ( ) ;
22512251 Assert . Equal ( expected . MakeLineBreaksEnvironmentNeutral ( ) , actual . MakeLineBreaksEnvironmentNeutral ( ) ) ;
2252+ var actualOperation = doc . Paths [ "/repairs" ] ! . Operations ! [ HttpMethod . Get ] ;
2253+ Assert . Null ( actualOperation . Security ) ;
22522254 }
22532255
22542256 [ Fact ]
@@ -2282,6 +2284,9 @@ public async Task SerializeDocWithEmptyOperationSecurityWorks()
22822284 doc ! . SerializeAsV3 ( new OpenApiYamlWriter ( stringWriter , new OpenApiWriterSettings { InlineLocalReferences = true } ) ) ;
22832285 var actual = stringWriter . ToString ( ) ;
22842286 Assert . Equal ( expected . MakeLineBreaksEnvironmentNeutral ( ) , actual . MakeLineBreaksEnvironmentNeutral ( ) ) ;
2287+ var actualOperation = doc . Paths [ "/repairs" ] ! . Operations ! [ HttpMethod . Get ] ;
2288+ Assert . NotNull ( actualOperation . Security ) ;
2289+ Assert . Empty ( actualOperation . Security ) ;
22852290 }
22862291 }
22872292}
You can’t perform that action at this time.
0 commit comments