Skip to content

Commit

Permalink
[Bug Fix] Methods in ResourceGroupContainer.cs in Azure.ResourceManag…
Browse files Browse the repository at this point in the history
…er.Core passes in null params (#22551)

* [BugFix] Methods in ResourceGroupContainer.cs in Azure.ResourceManager.Core passes in null params
  • Loading branch information
ShivangiReja authored Jul 8, 2021
1 parent 5e281c5 commit 2d444a1
Show file tree
Hide file tree
Showing 4 changed files with 4,423 additions and 6 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,23 @@ public async Task List()
Assert.GreaterOrEqual(count, 2);
}

[TestCase]
[RecordedTest]
public async Task ListWithParameters()
{
var tags = new Dictionary<string, string>();
tags.Add("MyKey", "MyValue");
_ = await Client.DefaultSubscription.GetResourceGroups().Construct(LocationData.WestUS2, tags).CreateOrUpdateAsync(Recording.GenerateAssetName("test1-"));
_ = await Client.DefaultSubscription.GetResourceGroups().Construct(LocationData.WestUS2, tags).CreateOrUpdateAsync(Recording.GenerateAssetName("test2-"));
_ = await Client.DefaultSubscription.GetResourceGroups().Construct(LocationData.WestUS2).CreateOrUpdateAsync(Recording.GenerateAssetName("test4-"));
int count = 0;
await foreach (var rg in Client.DefaultSubscription.GetResourceGroups().ListAsync("tagName eq 'MyKey' and tagValue eq 'MyValue'", 2))
{
count++;
}
Assert.GreaterOrEqual(count, 2);
}

[TestCase]
[RecordedTest]
public async Task CreateOrUpdate()
Expand Down
Loading

0 comments on commit 2d444a1

Please sign in to comment.