Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,9 @@ public override async Task<CommandResponse> ExecuteAsync(CommandContext context,
var subscriptionService = context.GetService<ISubscriptionService>();
var subscriptions = await subscriptionService.GetSubscriptions(options.Tenant, options.RetryPolicy);

context.Response.Results = subscriptions?.Count > 0
? ResponseResult.Create(
context.Response.Results = ResponseResult.Create(
Comment thread
JasonYeMSFT marked this conversation as resolved.
new SubscriptionListCommandResult(subscriptions),
Comment thread
JasonYeMSFT marked this conversation as resolved.
SubscriptionJsonContext.Default.SubscriptionListCommandResult)
: null;
SubscriptionJsonContext.Default.SubscriptionListCommandResult);
}
catch (Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ await _subscriptionService.Received(1).GetSubscriptions(
}

[Fact]
public async Task ExecuteAsync_EmptySubscriptionList_ReturnsNullResults()
public async Task ExecuteAsync_EmptySubscriptionList_ReturnsNotNullResults()
{
// Arrange
_subscriptionService
Expand All @@ -121,7 +121,7 @@ public async Task ExecuteAsync_EmptySubscriptionList_ReturnsNullResults()
// Assert
Assert.NotNull(result);
Assert.Equal(HttpStatusCode.OK, result.Status);
Assert.Null(result.Results);
Assert.NotNull(result.Results);
}

[Fact]
Expand Down
Loading