Skip to content

Commit

Permalink
.Net: Fix unit tests to check for security property (#9635)
Browse files Browse the repository at this point in the history
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
  • Loading branch information
markwallace-microsoft authored Nov 11, 2024
1 parent 14bc62a commit f7dc526
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ public async Task ItShouldReplicateMetadataToOperationAsync(string documentFileN
Assert.Equal(["https://my-key-vault.vault.azure.net"], serverUrls);
var info = additionalProperties["info"] as RestApiInfo;
Assert.NotNull(info);
var security = additionalProperties["info"] as List<RestApiSecurityRequirement>;
Assert.Null(security);
var security = additionalProperties["security"] as List<RestApiSecurityRequirement>;
Assert.NotNull(security);

// Assert Operation Extension keys
var operationExtensions = additionalProperties["operation-extensions"] as Dictionary<string, object?>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ public async Task ItShouldReplicateMetadataToOperationAsync(string documentFileN
Assert.Equal(["https://my-key-vault.vault.azure.net"], serverUrls);
var info = additionalProperties["info"] as RestApiInfo;
Assert.NotNull(info);
var security = additionalProperties["info"] as List<RestApiSecurityRequirement>;
Assert.Null(security);
var security = additionalProperties["security"] as List<RestApiSecurityRequirement>;
Assert.NotNull(security);

// Assert Operation Extension keys
var operationExtensions = additionalProperties["operation-extensions"] as Dictionary<string, object?>;
Expand Down

0 comments on commit f7dc526

Please sign in to comment.